Question / Help I really need help *encoding overloaded*

lazyRR

New Member
Hello I started streaming about month ago, maybe little more, everything was OK until today, I will just copy/paste my problem from reddit since I already tried there.

Hello, i was streaming this morning and all was totally fine no lags skips fps drops nothing, then i wanted to stream again hour ago and I noticed HUGE fps drops on my stream and I see from time to time in bottom left corner encoding overloaded message and in stats I see 'skipped frames due to encoding lag=above 10% (red)' stream was so choppy and unwatchable..
My PC isnt so good but untill now I was able to stream OK, i will leave you my specs and obs settings and I hope someone could help me here.
i5 3470 3.2ghz
gtx 970 4gb windforce
8gb ram
output advanced
encoder NVENC H.264
Rate control CBR
Bitrate 4500 kbps
Keyframe interfal 2
Preset Quality
Profile high
GPU 0
Max B-frames 2
output res 1280x720
60fps
my drivers are updated so that is not issue, i would not like to downscale my res or setting fps to 30 becouse I play FPS games and watching them in 30fps is not so nice. I dont know why I have this issue first time after 1+month of streaming . :/

i tried as someone on reddit told me to run it as administrator but its same..


https://obsproject.com/logs/OgMVBzEvJUDQVCw9 this is the last log file
 

muramkw

New Member
you could try to go to Advanced settings and set process to High, as well as go to Task Manager and set the priority to High. you could also change the Scaling to something else than whatever it is on right now. to do this go to settings > video. dont forget to also right click the source screen and change the scaling there. these are just a few things i know to do without drastically changing the quality. but i am no expert. however its a simple task and easy to switch back if it doesnt work. hope i helped
 

carlmmii

Active Member
Code:
00:58:07.042: [NVENC encoder: 'streaming_h264'] settings:
00:58:07.042:     rate_control: CBR
00:58:07.042:     bitrate:      2500
00:58:07.042:     cqp:          0
00:58:07.042:     keyint:       120
00:58:07.042:     preset:       hq
00:58:07.042:     profile:      high
00:58:07.042:     width:        1280
00:58:07.042:     height:       720
00:58:07.042:     2-pass:       false
00:58:07.042:     b-frames:     2
00:58:07.042:     GPU:          0
01:03:51.843: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 3478 (16.9%)
01:03:51.864: [rtmp stream: 'adv_stream'] Freeing 13 remaining packets
01:03:51.871: Video stopped, number of skipped frames due to encoding lag: 22/20499 (0.1%)
Code:
01:16:54.047: [jim-nvenc: 'streaming_h264'] settings:
01:16:54.047:     rate_control: CBR
01:16:54.047:     bitrate:      4500
01:16:54.047:     cqp:          20
01:16:54.047:     keyint:       120
01:16:54.047:     preset:       hq
01:16:54.047:     profile:      high
01:16:54.047:     width:        1280
01:16:54.047:     height:       720
01:16:54.047:     2-pass:       false
01:16:54.047:     b-frames:     2
01:16:54.047:     lookahead:    false
01:16:54.047:     psycho_aq:    true
01:22:10.444: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 2559 (13.5%)
01:22:10.446: Video stopped, number of skipped frames due to encoding lag: 2622/18876 (13.9%)

The encoding lag you're seeing in the logs is a misnomer. For whatever reason, the new NVENC encoding process includes frames lost due to rendering lag in the encoding lag report. This can be seen from the first attempt above that was done on the old NVENC encoder, where the rendering lag remained the same, but the encoding lag was basically nothing.

So... what you really need to focus on is the rendering lag -- that is 100% a result of OBS not having enough allocated GPU resources to do scene composition. This is usually a result of whatever game you're playing being allowed to use 100% of the GPU's rendering.

Things you can try:
- limit your in-game framerate (either by setting a max framerate, or using vsync... this will vary by game)
- lower in-game graphics settings

On 24.0.3, there's an experimental feature that you can try in which if you have Game Mode enabled in windows, you can run OBS in administrator mode and it should attempt to allocate the necessary resources that OBS needs.

Past that, for the (new) NVENC encoder, also make sure you have your preset set to something lower than "Max Quality" (just leave it on "Quality"), and turn off both Look-Ahead and PsychoVisual Tuning -- these all utilize CUDA, which means the encoder will be cutting even further into the GPU resources, potentially causing even more rendering lag and further encoding lag.
 

lazyRR

New Member
Code:
00:58:07.042: [NVENC encoder: 'streaming_h264'] settings:
00:58:07.042:     rate_control: CBR
00:58:07.042:     bitrate:      2500
00:58:07.042:     cqp:          0
00:58:07.042:     keyint:       120
00:58:07.042:     preset:       hq
00:58:07.042:     profile:      high
00:58:07.042:     width:        1280
00:58:07.042:     height:       720
00:58:07.042:     2-pass:       false
00:58:07.042:     b-frames:     2
00:58:07.042:     GPU:          0
01:03:51.843: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 3478 (16.9%)
01:03:51.864: [rtmp stream: 'adv_stream'] Freeing 13 remaining packets
01:03:51.871: Video stopped, number of skipped frames due to encoding lag: 22/20499 (0.1%)
Code:
01:16:54.047: [jim-nvenc: 'streaming_h264'] settings:
01:16:54.047:     rate_control: CBR
01:16:54.047:     bitrate:      4500
01:16:54.047:     cqp:          20
01:16:54.047:     keyint:       120
01:16:54.047:     preset:       hq
01:16:54.047:     profile:      high
01:16:54.047:     width:        1280
01:16:54.047:     height:       720
01:16:54.047:     2-pass:       false
01:16:54.047:     b-frames:     2
01:16:54.047:     lookahead:    false
01:16:54.047:     psycho_aq:    true
01:22:10.444: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 2559 (13.5%)
01:22:10.446: Video stopped, number of skipped frames due to encoding lag: 2622/18876 (13.9%)

The encoding lag you're seeing in the logs is a misnomer. For whatever reason, the new NVENC encoding process includes frames lost due to rendering lag in the encoding lag report. This can be seen from the first attempt above that was done on the old NVENC encoder, where the rendering lag remained the same, but the encoding lag was basically nothing.

So... what you really need to focus on is the rendering lag -- that is 100% a result of OBS not having enough allocated GPU resources to do scene composition. This is usually a result of whatever game you're playing being allowed to use 100% of the GPU's rendering.

Things you can try:
- limit your in-game framerate (either by setting a max framerate, or using vsync... this will vary by game)
- lower in-game graphics settings

On 24.0.3, there's an experimental feature that you can try in which if you have Game Mode enabled in windows, you can run OBS in administrator mode and it should attempt to allocate the necessary resources that OBS needs.

Past that, for the (new) NVENC encoder, also make sure you have your preset set to something lower than "Max Quality" (just leave it on "Quality"), and turn off both Look-Ahead and PsychoVisual Tuning -- these all utilize CUDA, which means the encoder will be cutting even further into the GPU resources, potentially causing even more rendering lag and further encoding lag.

there is no way that csgo is eating my gtx 970 4gb settings are already pretty low ( personal preference ) and its strange that on same day and one + month before was working perfectly fine, i tried all, i even reinstal obs completly I will try fresh windows install now if that doesnt help I guess i will have to upgrade my ancient PC if I want to stream again. :/ wish me luck, becouse Im broke as fck
 
Top