Low CPU and GPU usage, but getting a lot of rendering and encoding lag anyway

EBsessed

New Member
Hi, all. I feel like this started happening after the last two or three NVIDIA updates. I've been streaming for around three years and have never had rendering and encoding lag until now. Here's the log from my last stream: https://obsproject.com/logs/ApHY6eeRBo2q737K

My CPU usage during the stream was only like 16% at max, and my GPU usage was around 44%. I was only streaming a game on my SNES, so it's not even anything super taxing on my system. I used to be able to keep everything in OBS at max: preset at slowest, tuning at high quality, multipass mode at two passes, profile at high, look ahead and adaptive quantization on...everything. I never got encoding lag. Now I'm getting it in every single stream and my CPU isn't even overloaded. I keep dropping the quality of things and it doesn't stop the lag. I've lowered the preset to as low as medium, tuning to low latency, profile at main, and turned off look ahead and adaptive quantization, but the lag persists, and I refuse to keep dropping the quality of my streams lower and lower in a vain and apparently useless attempt to stop lag that shouldn't even be happening given that nothing is being overloaded from what I can tell, especially because dropping the quality isn't making any noticeable difference. I don't understand where this is coming from. I'm getting no network lag at all, so it's not my Internet connection. It's just rendering and encoding lag.

I'm a streamer who strongly believes in putting out the best quality I can, so this is really driving me crazy. Please help me. Let me know if you need any more system information from me and I'll provide whatever you require. I'm not very knowledgeable in computer systems, so I might be leaving out info that could be obviously needed to get to the root of this issue; just say the word. Thank you.
 

rockbottom

Active Member
There is some overload but check & update all of your plugins. I only checked (2) of them, both are stale, could be contributing to your pain. Newer versions for both have been released that are vetted for OBS 31.x.x. After the updates, test again see if you're back to normal.



1:40:32.927: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 4295 (0.3%)
01:40:32.927: Video stopped, number of skipped frames due to encoding lag: 7493/1313405 (0.6%)

 

EBsessed

New Member
There is some overload but check & update all of your plugins. I only checked (2) of them, both are stale, could be contributing to your pain. Newer versions for both have been released that are vetted for OBS 31.x.x. After the updates, test again see if you're back to normal.



1:40:32.927: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 4295 (0.3%)
01:40:32.927: Video stopped, number of skipped frames due to encoding lag: 7493/1313405 (0.6%)

Thank you. I have some questions.

1) How do I see what plugins I have and which ones need updating? How were you able to find that?

2) When I look at the page for the Advanced Scene Switcher update, it tells me to back up my settings before updating. However, when I click the link for how to back up my settings, the instructions it provides make no sense. It says, "If you want to back up your settings for the currently active scene collection you have the option to export (1) them to a file on the General tab in the 'Save / load settings' section. The resulting file contains all your advanced scene switcher settings of the current scene collection in JSON format." The problem is that there is no "General tab" or a "Save / load settings section" in OBS from what I can see. How do I back up my settings?

3) When I go to update the Audio Monitor, it gives me the option to download a windows installer or just a windows file. Which one do I need?

@Suslik V, unfortunately I don't know what "NVIDIA encoder performance linearly depends on frequency (clock speeds)" means, specifically "linearly" and "frequency (clock speeds)".
 

rockbottom

Active Member
Plugins load on start-up so take a look at your log right after video settings reset section. The list is longer in the log but it looks like those (2) plugins are it for 3rd party/needed updates.
19:31:47.515: video settings reset:
19:31:47.515: base resolution: 1920x1080
19:31:47.515: output resolution: 1920x1080
19:31:47.515: downscale filter: Lanczos
19:31:47.515: fps: 60/1
19:31:47.515: format: NV12
19:31:47.515: YUV mode: Rec. 709/Full
19:31:47.515: NV12 texture support enabled
19:31:47.515: P010 texture support not available
19:31:47.517: Audio monitoring device:
19:31:47.517: name: Speakers (Razer USB Sound Card)
19:31:47.517: id: {0.0.0.00000000}.{55f43397-4dcc-4543-9a12-c270da89f748}
19:31:47.524: ---------------------------------
19:31:47.524: Skipping module '../../obs-plugins/64bit/advanced-scene-switcher-lib.dll', not an OBS plugin
19:31:47.528: [adv-ss] version: 1.28.1

19:31:47.576: [Audio Monitor] loaded version 0.8.2


I've never installed either of those plugins so I can't really offer much help with them.
 

EBsessed

New Member
Plugins load on start-up so take a look at your log right after video settings reset section. The list is longer in the log but it looks like those (2) plugins are it for 3rd party/needed updates.
19:31:47.515: video settings reset:
19:31:47.515: base resolution: 1920x1080
19:31:47.515: output resolution: 1920x1080
19:31:47.515: downscale filter: Lanczos
19:31:47.515: fps: 60/1
19:31:47.515: format: NV12
19:31:47.515: YUV mode: Rec. 709/Full
19:31:47.515: NV12 texture support enabled
19:31:47.515: P010 texture support not available
19:31:47.517: Audio monitoring device:
19:31:47.517: name: Speakers (Razer USB Sound Card)
19:31:47.517: id: {0.0.0.00000000}.{55f43397-4dcc-4543-9a12-c270da89f748}
19:31:47.524: ---------------------------------
19:31:47.524: Skipping module '../../obs-plugins/64bit/advanced-scene-switcher-lib.dll', not an OBS plugin
19:31:47.528: [adv-ss] version: 1.28.1

19:31:47.576: [Audio Monitor] loaded version 0.8.2


I've never installed either of those plugins so I can't really offer much help with them.
Thank you. Would you mind please explaining how to back up my OBS settings? The instructions I tried to follow made reference to tabs I don't seem to have.

@Suslik V, what can I do about that?
 

Suslik V

Active Member
You can clean the cooling system of dust. If it doesn't help then this is software issue, revert all back and never update.
 

EBsessed

New Member
Plugins load on start-up so take a look at your log right after video settings reset section. The list is longer in the log but it looks like those (2) plugins are it for 3rd party/needed updates.
19:31:47.515: video settings reset:
19:31:47.515: base resolution: 1920x1080
19:31:47.515: output resolution: 1920x1080
19:31:47.515: downscale filter: Lanczos
19:31:47.515: fps: 60/1
19:31:47.515: format: NV12
19:31:47.515: YUV mode: Rec. 709/Full
19:31:47.515: NV12 texture support enabled
19:31:47.515: P010 texture support not available
19:31:47.517: Audio monitoring device:
19:31:47.517: name: Speakers (Razer USB Sound Card)
19:31:47.517: id: {0.0.0.00000000}.{55f43397-4dcc-4543-9a12-c270da89f748}
19:31:47.524: ---------------------------------
19:31:47.524: Skipping module '../../obs-plugins/64bit/advanced-scene-switcher-lib.dll', not an OBS plugin
19:31:47.528: [adv-ss] version: 1.28.1

19:31:47.576: [Audio Monitor] loaded version 0.8.2


I've never installed either of those plugins so I can't really offer much help with them.
I figured out how to back up my OBS settings and update both plugins. I still had a little bit of lag, but not as bad. Analyzing the log from the stream I just completed, it told me to disable Hardware-accelerated GPU Scheduler and to change the color range to Limited instead of Full, so hopefully that helps in the future. Here's the log from the stream I just did if you're curious: https://obsproject.com/logs/cB5VCSQwPDcPwsjr
 

rockbottom

Active Member
Cool!

Yeah, it's much better but there's still room for additional improvement. On top disabling HAGS & correcting the Color Range here's some more items that may help to reduce load/eliminate the little bit of remaining lag.

01:56:49.411: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 137 (0.0%)
01:56:49.411: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 203 (0.0%)
01:56:49.411: Video stopped, number of skipped frames due to encoding lag: 164/1385419 (0.0%)

Disable these, they're not needed.
19:31:46.971: Game Bar: On
19:31:46.971: Game DVR: On

Run your monitor @ 120HZ when using OBS
9:31:47.329: size={2560, 1440}
19:31:47.329: attached=true
19:31:47.329: refresh=165
19:31:47.329: bits_per_color=8

Change Multipass to qres & if any encoding lag remains, use Preset P5
19:35:42.783: preset: p6
19:35:42.783: tuning: hq
19:35:42.783: multipass: fullres
 

EBsessed

New Member
Cool!

Yeah, it's much better but there's still room for additional improvement. On top disabling HAGS & correcting the Color Range here's some more items that may help to reduce load/eliminate the little bit of remaining lag.

01:56:49.411: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 137 (0.0%)
01:56:49.411: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 203 (0.0%)
01:56:49.411: Video stopped, number of skipped frames due to encoding lag: 164/1385419 (0.0%)

Disable these, they're not needed.
19:31:46.971: Game Bar: On
19:31:46.971: Game DVR: On

Run your monitor @ 120HZ when using OBS
9:31:47.329: size={2560, 1440}
19:31:47.329: attached=true
19:31:47.329: refresh=165
19:31:47.329: bits_per_color=8

Change Multipass to qres & if any encoding lag remains, use Preset P5
19:35:42.783: preset: p6
19:35:42.783: tuning: hq
19:35:42.783: multipass: fullres
Thank you very much for your continued help, it's super appreciated.

I've never heard of or seen "Game Bar" and "Game DVR". Will those be in OBS or in my computer settings?
 

EBsessed

New Member
YW! Windows gaming settings, Captures is the DVR.
I think I turned off Game Bar, but I can't find the Game DVR. Would you mind please giving me a step-by-step on how to find it?

Cool!

Yeah, it's much better but there's still room for additional improvement. On top disabling HAGS & correcting the Color Range here's some more items that may help to reduce load/eliminate the little bit of remaining lag.

01:56:49.411: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 137 (0.0%)
01:56:49.411: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 203 (0.0%)
01:56:49.411: Video stopped, number of skipped frames due to encoding lag: 164/1385419 (0.0%)

Disable these, they're not needed.
19:31:46.971: Game Bar: On
19:31:46.971: Game DVR: On

Run your monitor @ 120HZ when using OBS
9:31:47.329: size={2560, 1440}
19:31:47.329: attached=true
19:31:47.329: refresh=165
19:31:47.329: bits_per_color=8

Change Multipass to qres & if any encoding lag remains, use Preset P5
19:35:42.783: preset: p6
19:35:42.783: tuning: hq
19:35:42.783: multipass: fullres
How do I run my monitor at 120hz? I don't know what that is or where to find it in my settings. What setting is it?
 

rockbottom

Active Member
W10 over here...

Game Bar, Captures (aka Game DVR) & Game Mode are all in the same spot. All settings > Gaming

Right click on your desktop > Display Settings > Advanced Display Settings > Refresh Rate
 

EBsessed

New Member
W10 over here...

Game Bar, Captures (aka Game DVR) & Game Mode are all in the same spot. All settings > Gaming

Right click on your desktop > Display Settings > Advanced Display Settings > Refresh Rate
Thank you. I looked there, but only found options for 60 and 165Hz. Is there a way to force 120Hz even if it doesn't give me the option?

Also, I streamed last night and tried setting it to 60Hz before starting OBS/the stream, but I was getting a lot of rendering/encoding lag, so during the stream I went to look at the display settings and found it had somehow automatically switched itself to 165Hz. I changed it back to 60Hz and had no more lag for the rest of the stream. How could/why would it be automatically changing the refresh rate when I open OBS or start a stream, and how do I stop it from doing that?
 

rockbottom

Active Member
No idea, look at the specs for your monitor. The model is missing from the log you posted. Run @ 60 or create a custom resolution.
19:04:55.130: output 0:
19:04:55.130: name=

I would need to see the log. But yes, running @ a lower refresh rate reduces load.
 

Suslik V

Active Member
Any application running in exclusive full screen mode can gain full control of the display device (not only refresh rate, but color depth and resolution may be affected).
 
Last edited:

EBsessed

New Member
No idea, look at the specs for your monitor. The model is missing from the log you posted. Run @ 60 or create a custom resolution.
19:04:55.130: output 0:
19:04:55.130: name=

I would need to see the log. But yes, running @ a lower refresh rate reduces load.
Here's the log from my last stream. https://obsproject.com/logs/HtTDyYPgbiHCC9tj

I've found that what's happening to my refresh rate is that it's automatically changing to 165Hz when I plug the computer into the wall. I keep having to manually set it back to 60Hz every time I plug in the computer, and I can't figure out how to stop it from doing this automatic change. Dynamic refresh rate is disabled. Can I force it to always keep a consistent refresh rate? How do I create a custom resolution as you suggested? Are resolution and refresh rate the same thing?
 

rockbottom

Active Member
Resets to 165, interesting. Cant' help with that, maybe read the manual.

So there's some overload remaining.
00:51:35.996: Output 'adv_stream': Total drawn frames: 1198759 (1199155 attempted)
00:51:35.996: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 396 (0.0%)
00:51:35.997: Video stopped, number of skipped frames due to encoding lag: 673/1199125 (0.1%)

Encoding settings from the log, these are even slower than the previous settings & not what I recommended above. See what happens on your next stream with the settings updated as follows.
19:18:29.996: codec: H264
19:18:29.996: rate_control: CBR
19:18:29.996: bitrate: 10000
19:18:29.996: keyint: 120
19:18:29.996: preset: p7 > p5
19:18:29.996: tuning: hq
19:18:29.996: multipass: fullres > qres
19:18:29.996: profile: main > High
19:18:29.996: width: 1920
19:18:29.996: height: 1080
19:18:29.996: b-frames: 2
19:18:29.996: b-ref-mode: 0
19:18:29.996: lookahead: true (28 frames)
19:18:29.996: aq: false
19:18:29.996:
19:18:30.073: ---------------------------------
19:18:30.073: [FFmpeg aac encoder: 'adv_stream_audio'] bitrate: 320, channels: 2, channel_layout: stereo, track: 1
 

EBsessed

New Member
Resets to 165, interesting. Cant' help with that, maybe read the manual.

So there's some overload remaining.
00:51:35.996: Output 'adv_stream': Total drawn frames: 1198759 (1199155 attempted)
00:51:35.996: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 396 (0.0%)
00:51:35.997: Video stopped, number of skipped frames due to encoding lag: 673/1199125 (0.1%)

Encoding settings from the log, these are even slower than the previous settings & not what I recommended above. See what happens on your next stream with the settings updated as follows.
19:18:29.996: codec: H264
19:18:29.996: rate_control: CBR
19:18:29.996: bitrate: 10000
19:18:29.996: keyint: 120
19:18:29.996: preset: p7 > p5
19:18:29.996: tuning: hq
19:18:29.996: multipass: fullres > qres
19:18:29.996: profile: main > High
19:18:29.996: width: 1920
19:18:29.996: height: 1080
19:18:29.996: b-frames: 2
19:18:29.996: b-ref-mode: 0
19:18:29.996: lookahead: true (28 frames)
19:18:29.996: aq: false
19:18:29.996:
19:18:30.073: ---------------------------------
19:18:30.073: [FFmpeg aac encoder: 'adv_stream_audio'] bitrate: 320, channels: 2, channel_layout: stereo, track: 1
I started the stream with the settings lower and was still getting lag. That's when I checked the refresh rate and saw that it had raised itself to 165Hz, so I changed it to 60. All lag stopped, so I changed all the other settings back to top quality with no problems; there was no more lag whatsoever after reverting the refresh rate to 60Hz. The entire issue seems to lie in my laptop reverting itself to 165Hz when it's plugged in for some reason. Based on that last stream, getting to the bottom of that should fix my problem entirely.
 
Top