Question / Help Intermittent OBS Stuttering and lag with OBS v23 (NVNEC SDK, and NVNEC FFMPEG)

Gianluca Leal

New Member
TL;DR
Since upgrading to OBS v23, I've started to encounter variably lengthed stutters and have not been able to find a solution.
These issues are visible in both the new AND old implementation of NVENC.
These issues were NOT present in OBS v22's NVNEC.
(Skip to "the problem" for more details)

Introduction:
Hello, I've been streaming on and off for the last 9 years and have been using OBS for maybe 7.5 of those years; XSplit prior to that.
Initially I used x264 but I'm a quality/performance addict so I frequently mess with settings to find the best results.
x264 made my games drop frames so I've been using NVENC for almost the entirety of OBS' life.
Even when I was streaming with my GTX 680 back in 2012, I would be streaming at 1080p@60FPS and had little issue.
There was a period of time last year where I was using QuickSync and would send an RMTP stream from my computer to a server to encode with FFMPEG directly on a Linux Server VM but I got tired of messing with FFMPEG flags. After having gone back to NVENC, I tried a dual-card setup where my games would be played on my GTX 1080, and the stream would be encoded on my second card, a GTX 750TI. This actually worked very well but I had been curious about the quality gains from the newer NVENC chip on the GTX 1080; so for the last 6 months, I've been back to a one card setup.

The Problem:
OBS v22 had been working amazingly; only dropping frames when my games were using 99% of my GPU. Though the performance gains mentioned in the OBS v23 released were very tempting so I had been keeping a keen eye on the forums for almost 2 months now. I was hesitant to upgrade to v23 upon release and waited a week or two for any hotfixes. I've since upgraded and have regretted my decision.
OBS v23 stutters and lags with both the new NVNEC SDK Encoder, and the old NVNEC FFMPEG Encoder. The stutters still happen but are less frequent when using the old implementation so I've reverted to NVNEC FFMPEG for the time being.
Below you can see a Twitch Clip of the aforementioned stuttering.
  • "Encoder Overload" will sometimes pop up very briefly and quickly disappear but the message is not always followed by a stutter.
  • The dropped frames counter rarely goes up during a stutter also.
  • The stutters are visibly noticeable both on the OBS preview window and Twitch.
  • That said, I will even get "overloaded" warnings and stutters without "overloaded" warnings when I'm sitting on JUST my webcam with NO other programs open aside from Chatty (Twitch IRC), Discord and OBS.
Failed "Solutions":
  • Updated to the latest version of NVIDIA drivers (I saw in the release notes that there were improvements to the NVNEC SDK)
  • I've used the OBS Log Analysis to parse my recent logs and have not come up with anything concrete.
  • DreadWingKnight, who is a common forum poster, had noticed that having both my GTX750TI and GTX1080 caused the 1080's PCI-E lane to be x8 rather than x16. I had decided to keep both cards in as it's rare to fully utilize a x8 lane with a GPU but removed it to test. It did not improve results.
  • Disabling/enabling the "Look-Ahead" flag.
  • Lowering the bitrate to 6000kbps, 5000kbps.
  • I noticed the SSD that OBS resides on was rather full (30gigs left). SSDs lose performance while full so I deleted games (140gigs free). Did not help.
  • I've used both the OBS Forums and the Discord but haven't found a viable solution. There are others complaining about similar issues but none with a solution.
Plugins:
  • NewTek NDI™ (v4.5.3)
  • Elgato StreamDeck (v??)
Attachments:
Below I have attached images of things that may help with the investigation of this issue.
The log file of my last stream has also been attached.
(Please note that I was have connectivity issues during the later parts of this stream which are NOT related to this issue. I've had perfect connection during other streams and the problem persists. Prior to starting every stream I use a tool that lets me see the ms, round-time, and quality of the Twitch ingest server to choose the best beforehand as Toronto,ca is sometimes horrible)
Scenes:
SCENES.PNG
Profiles:
PROFILES.png

Encoder Settings:
NVENC NEW (SDK)
SETTINGS NEW.PNG
NVENC OLD (FFMPEG)
PROFILES.png
VIDEO:
VIDEO.PNG
If there are any other images I can provide that can help, please let me know.

Below is a Twitch clip that shows one of the regularly long stutters:
https://clips.twitch.tv/EmpathicSpikyTaroKreygasm

End:
These stutters have been detrimental to the quality and presentation of my stream. I strive for crisp visuals while maintaining framerate and this is diminishing this.
If you are also having this issue or have any questions as to the reasoning of my current settings or setup, feel free to post.
I hope we are able to work together to solve this issue for me and anyone else having this issue.
 

Attachments

  • 2019-03-07 08-19-37.txt
    158.4 KB · Views: 38
  • SETTINGS.PNG
    SETTINGS.PNG
    63.5 KB · Views: 96
I updated vlc and uninstalled Reaplugs. Reset to new nvenc and all seems good so far. I've since added reaplugs back and so far no issues
 
No, I seemed to have the same issues you had and someone mentioned 3rd party plugins. The 2 plugins I had was reaplugs and vlc. Vlc had an update so I updated and that seems to have made the difference. Soooo, are you running ANY 3rd party plugins that need updating?
 
This is exactly what i'm experiencing as well! Had no issues before the v. 23, now I get encoding overload, even though the CPU usage is at a maximum of 20%...

It is quite anoying to say the least.
Tried the old NVENC setting, but that was just as bad.
 

Gianluca Leal

New Member
No, I seemed to have the same issues you had and someone mentioned 3rd party plugins. The 2 plugins I had was reaplugs and vlc. Vlc had an update so I updated and that seems to have made the difference. Soooo, are you running ANY 3rd party plugins that need updating?
Ah, I see what you're saying.
I'm using the Elgato StreamDeck plugin and the NewTek NDI™ plugin as listed in my original post above.
I've checked and unfortunetly there aren't any new versions available for either of these plugins.

This is exactly what i'm experiencing as well! Had no issues before the v. 23, now I get encoding overload, even though the CPU usage is at a maximum of 20%...

It is quite anoying to say the least.
Tried the old NVENC setting, but that was just as bad.
You know my pain friend.
CPU barely gets passed 6-8% and that's usually just 'cause Firefox is open as well.
Definitely not a CPU thing, all NVENC.
 
And unfortunately it appears to be back. The only thing that's changed is a winblows update. I've even tried going back to h264 encoder with no joy. I'm going bald scratching my head.
 

Attachments

  • 2019-03-16 09-51-11.txt
    22.8 KB · Views: 21
D

Deleted member 121471

Disable Game mode under Windows 10 settings (Win key + I), "Gaming" category and every other option in every subcategory you can find.

Your log shows instances of GPU overload and bandwidth issues but you've covered the latter already. Most major streamers downscale to 900p@60FPS as an arguably best compromise between image clarity and fluidity, given the 6-8k bitrate range twitch recommends.

Try creating a completely new scene collection with only 2 sources added, game set at 900p@60FPS@6000kbps, camera set at 720p@30FPS and B-frames=2 and test again, to narrow down the list of possible issues. If not set already, turn on VSYNC or limit your FPS using ingame settings or Rivatuner.

Also, OBS loads all sources regardless of the fact you're using them or not, which is why it's wise to have different scene collections to reduce resource usage, depending on the specs or your setup.
 
Last edited by a moderator:

Gianluca Leal

New Member
And unfortunately it appears to be back. The only thing that's changed is a winblows update. I've even tried going back to h264 encoder with no joy. I'm going bald scratching my head.
For the games that I play, going to H264 isn't an option for me.
I'm not willing to compromise performance, as I lose frames in-game when using CPU encoding.

having the same problems as well man
Feels bad man.

Disable Game mode under Windows 10 settings (Win key + I), "Gaming" category and every other option in every subcategory you can find.

Your log shows instances of GPU overload and bandwidth issues but you've covered the latter already. Most major streamers downscale to 900p@60FPS as an arguably best compromise between image clarity and fluidity, given the 6-8k bitrate range twitch recommends.

Try creating a completely new scene collection with only 2 sources added, game set at 900p@60FPS@6000kbps, camera set at 720p@30FPS and B-frames=2 and test again, to narrow down the list of possible issues. If not set already, turn on VSYNC or limit your FPS using ingame settings or Rivatuner.

Also, OBS loads all sources regardless of the fact you're using them or not, which is why it's wise to have different scene collections to reduce resource usage, depending on the specs or your setup.
I know for whatever reason my log does say I have Gaming Mode enabled, but I've already disabled it long ago.

Instances of GPU overload which is the strange part. If you've read the majority of the original post, I touch on how my GPU's performance was more than ample for the settings I was using and only now with this latest update coming from v22 am I getting GPU overload. As I mention above, I get that warning EVEN when I'm just sitting on webcam, and nothing else is being rendered; it must be a false positive. There's no way just having my webcam open with nothing else causes an overload at only 8% GPU usage.
I use 4 B-Frames to alleviate pixelization is high-motion games; it helped greatly in Warframe.
I'm already downscaling from 1440p down to 1080p; clarity is fine in high motion games.

V-Sync is a plague. That said, my monitor is 144hz so V-Sync wouldn't help; I wouldn't use it anyway.
I do framerate-limit some games that are demanding, though I'm not remotely hitting the 97% usage bug that many people on the forums complain about; GPU usage isn't the issue, even though the logs say GPU overload.
There's something else going on here.
 
Top