Encoder issues from out of nowhere

clearedtakeoff

New Member
Hi all,
I stream microsoft flight simulator which is pretty GPU intensive, especially on ultra settings. In the last few weeks, my streams have gotten so bad that the game becomes unplayable due to encoder overloads and the subsequent lag. I have tried a variety of different settings to try and overcome this, I have backdated NVidia Drivers, backdated to OBS 27 and still I am having the same issues.

The stream will be perfectly fine at 60fps but then may be asked to render in a few buildings etc, it feels like OBS is having some sort of leak and this isnt immediately rectified which then causes the game to lag. The webcams, overlays and audio sources are therefore extremely laggy and this can take up to 2-3 minutes before the stream and the game is back at 60 fps. I am out of ideas and I don't know what to try next?

Please help me!
 

Attachments

  • 2022-10-02 14-13-07.txt
    77.3 KB · Views: 17

clearedtakeoff

New Member
upgrade to OBS v28.0.2 and test again.
Just updated to 28.0.2 and tested again but with a recording (same settings as streaming) and the problems are still there. Repeated spikes in GPU load from a steady and stable 50-55% right up to 100% which is where the problems occur. Lag spikes occurring every 2-3 mins
 

PaiSand

Active Member
Turn on Windows game mode

Also, reduce quality presets on the game.
 

clearedtakeoff

New Member
Turn on Windows game mode

Also, reduce quality presets on the game.
Hey, I’ve tried windows game mode on and off. I’ve just tried to replicate the exact scenario as observed in game when the log file detected lag. Without obs - 60fps & GPU 60% utilisation and stable, with obs - lag spikes from 60% to 100% every 90 seconds
 

PaiSand

Active Member
You know OBS uses the same GPU the game does? It also uses the same CPU and RAM the game does.
Real time encoding is a process that demands several resources from the system, so you need to free and give those resources to this process so it can handle the load. If you consume with other processes this resources then you have nothing from where to get more resources to use on the encoding as bot processes are competing for this resources, causing serveral issues.
How others mange to do all and look good? They either lower the graphic settings in the game or use a 2 PC setup, one for the game and one for streaming.
 

clearedtakeoff

New Member
You know OBS uses the same GPU the game does? It also uses the same CPU and RAM the game does.
Real time encoding is a process that demands several resources from the system, so you need to free and give those resources to this process so it can handle the load. If you consume with other processes this resources then you have nothing from where to get more resources to use on the encoding as bot processes are competing for this resources, causing serveral issues.
How others mange to do all and look good? They either lower the graphic settings in the game or use a 2 PC setup, one for the game and one for streaming yes
Yes I understand this and would make perfect sense but I haven’t changed any setting - 4 weeks ago I was able to stream with the same settings, no lag or stutter but now all of a sudden I have lag and stutter?
 

PaiSand

Active Member
Well, install again OBS 27.2.4 and test it.
And if you still have the issue with it then the issue isn't in OBS.

What solved other issues to other people was going back to Win10. To others was only necessary to restart the PC instaed of turn it off and on.
It could be a faulty RAM, CPU, GPU, motherboard or any other hardware in the PC.
And of course, keep drivers up to date, including and not limeted to the motherboard ones and BIOS.

What do you mean with backdate? Reinstall?
If you used the windows restore to a previous date you may have broken more things than repair them.
 
If you said that your computer will not boot or you get a BSOD after playing a game, then I would turn my attention to your motherboard, however.

In my experience with this, Twitch might be the most popular service, but has the worst encoding compared to that of YouTube because on top of your encoding, they insert ads and anything that will interfere with encoding on their site. Before it was the opposite, because YouTube was not into this level of live streaming. Sometimes, Twitch's encoders will not be so optimal after streaming for certain periods of time as the connection will suddenly drop to 0 kbps. Recently without notice, they began catering more bandwidth and visibility to their partners. I whole heartedly don't think your system is bad, because I had the same experiences until I cut over to YouTube. Try to stream what you have on YouTube using HLS or RTMPS and see what you get.

Hardware GPU Scheduler: Off: Run OBS as an Administrator. Also check to see if it's enabled in the Graphics settings in Windows.
 

clearedtakeoff

New Member
Morning all,

Thank you for your recommendations and ideas. I haven’t had a BSOD with OBS, my game mode is off and my gpu scheduler/hardware acceleration are all off. OBS is always started in admin mode and my windows defender is always turned to off when I stream.

I backdated to OBS27 and by this I do mean I reinstalled it. This afternoon I will uninstall obs28 and reinstall obs27, I will update my drivers (even though I have had issues with the latest Nvidia drivers) and I will scale down my in game settings to see if that makes any difference at all.

I am just so confused as to why when I don’t run OBS, the game is 60fps with 60% GPU load and 40% CPU load but then when I try and stream, the GPU load will sit at the same 60% but it’ll then frequently spike to 100% and thus causing the game to drop to like 1fps and OBS then encoder lags. I’ve no idea where these spikes could be coming from as I am using both the same in game settings and obs settings that have served me well for 18 months.

Is it worth changing encoder from NVENC to x264? Are there any benefits to that?
 
Top