Question / Help OBS Studio Skipping Frames EVEN When NOT Recording OR Streaming

Hello.

So my OBS studio has recently started skipping frames even when it is not recording OR live. For example, when I am sat looking at it either displaying my webcam of me, or playing back a local video file from the PC it will just skip a frame every minute or 2. It will skip a frame either when live, while recording, or doing nothing at all apart from just displaying media of some kind, such as webcam, or local video file. I have even sat and looked at it with literally just the webcam as a source on the scene. and Just that 1 one source (the webcam), skips too, (again even when NOT recording or streaming). I have used it for years without this problem. And it randomly started to occur yesterday out of nowhere. I have not done anything different to what I normally would do.

I use a dedicated streaming PC and a dedicated gaming PC. So this OBS will run no video game at all. ONLY OBS studio 64 bit.

I pressed help, log files, upload last log file. And that is below:

https://hastebin.com/anevenilom

Thank you.
 

koala

Active Member
I assume you have too many media sources and browser sources active at the same time, so your system is overloaded by them. Some media are looping, so they are always constantly being decoded and rendered, for example. You also have a huge number of browser sources - all this takes up computing resources. They take up resources even if they are not on the active scene.

Remove sources. Try to make a more simple scene setup and check, whether the problems go away. If this is the case, create a less complex scene setup for your stream or get more powerful hardware.
 

BK-Morpheus

Active Member
Please do a short test recording, so wen can see, if CPU or GPU is overloaded.
Keep in mind, that the GTX960 in that system needs to render you scene, filters and scaling options (this is done even when OBS is opened but not recording).
The problem could be related to the humongous amount of video-loops and filters. Maybe you can create a new, empty scene collection with just one scene and 3-4 basic sources, just for testing.
 
I assume you have too many media sources and browser sources active at the same time, so your system is overloaded by them. Some media are looping, so they are always constantly being decoded and rendered, for example. You also have a huge number of browser sources - all this takes up computing resources. They take up resources even if they are not on the active scene.

Remove sources. Try to make a more simple scene setup and check, whether the problems go away. If this is the case, create a less complex scene setup for your stream or get more powerful hardware.


Thank you for your reply. If you had to put it on a piece of hardware, what would you say would be the most likely causing the issue? The GPU perhaps? I do understand I do have a lot of sources and scenes. I do agree with that. I ideally don't want to down size my OBS scenes and sources if possible. I can definitely upgrade hardware. But I'm unsure as to what hardware to try. I will grab you a screenshot of my usage whilst recording. The screenshot was taken during recording. And keep in mind this is a dedicated OBS PC as well.Any info that you may be able to suggest is gold dust to me. So, thank you so much.

1538129847573.png
 

BK-Morpheus

Active Member
If you do a local recording with your stream settings (or a test-stream) and upload the log file, it might be easier to spot the bottleneck.
The Taskmanager Screenshot is not showing a definite hardware overload, but 62% CPU load overall could already mean that some of your 16 threats are limiting some processes.
 
Please do a short test recording, so wen can see, if CPU or GPU is overloaded.
Keep in mind, that the GTX960 in that system needs to render you scene, filters and scaling options (this is done even when OBS is opened but not recording).
The problem could be related to the humongous amount of video-loops and filters. Maybe you can create a new, empty scene collection with just one scene and 3-4 basic sources, just for testing.


Hello hello. I am leaning towards perhaps the GPU could be the culprit. Possibly anywhere. But I am no tech expert. I have just carried out a test recording and switched scenes a few times here and there. and towards the end of the recording it still did the small frame skip. here is the paste from that log. Just to confirm I went to help > log files > upload last log file. I believe that is the correct one.

https://hastebin.com/yanahezano

I will also create a fresh new OBS profile and test it with just a few sources and just 1 or 2 scenes. I will reply with that one shortly. Thank you for your help.
 
The log is not showing any recording/streaming attempt.

Hello. Ah I'm not sure why that last one didn't show any recording logs.

I believe this is the one. If I press control and F and looked for the word "skipped" in this one it DOES find skipped. although I cannot understand what the reason for the skip is.


11:24:30.809: ==== Recording Stop ================================================
11:24:30.812: Video stopped, number of skipped frames due to encoding lag: 35/9362 (0.4%)
11:24:30.927: warning: 2 frames left in the queue on closing


https://hastebin.com/rapizawehe

Thank you.
 
Last edited:

BK-Morpheus

Active Member
First log shows a few lagged/skipped frames, but still under 3%:
Code:
11:24:30.809: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 248 (2.6%)
11:24:30.809: ==== Recording Stop ================================================
11:24:30.812: Video stopped, number of skipped frames due to encoding lag: 35/9362 (0.4%)


11:18:29.274: Output 'adv_file_output': Total frames output: 6799
11:18:29.274: Output 'adv_file_output': Total drawn frames: 6733 (6846 attempted)
11:18:29.274: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 113 (1.7%)
11:18:29.276: ==== Recording Stop ================================================
11:18:29.279: Video stopped, number of skipped frames due to encoding lag: 12/6846 (0.2%)
rendering = GPU
encoding = CPU, if x264 is used

In your case, you chose to use NVENC, so the Ryzen 1800x basically is doing nothing other than running your browser sources, webcam tool and other backround stuff.
Now that I realise, that you use NVENC instead of X264 on a dedicated streaming PC, it is very Impressive, that the taskmanager shows 63% CPU load, although it's not even encoding your stream. Seems like the amount of sources and the virtual webcam alone are almost eating up a huge load of CPU power.
Most people with such a good encoding CPU on a dedicated streaming PC are using it to get better compression quality by encoding with x264 on presets that are lower than "very fast" :-)

Second log file (with the clean/new scene collection) is looking fine..log shows no lagged/skipped frames.
 
First log shows a few lagged/skipped frames, but still under 3%:
Code:
11:24:30.809: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 248 (2.6%)
11:24:30.809: ==== Recording Stop ================================================
11:24:30.812: Video stopped, number of skipped frames due to encoding lag: 35/9362 (0.4%)


11:18:29.274: Output 'adv_file_output': Total frames output: 6799
11:18:29.274: Output 'adv_file_output': Total drawn frames: 6733 (6846 attempted)
11:18:29.274: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 113 (1.7%)
11:18:29.276: ==== Recording Stop ================================================
11:18:29.279: Video stopped, number of skipped frames due to encoding lag: 12/6846 (0.2%)
rendering = GPU
encoding = CPU, if x264 is used

In your case, you chose to use NVENC, so the Ryzen 1800x basically is doing nothing other than running your browser sources, webcam tool and other backround stuff.
Now that I realise, that you use NVENC instead of X264 on a dedicated streaming PC, it is very Impressive, that the taskmanager shows 63% CPU load, although it's not even encoding your stream. Seems like the amount of sources and the virtual webcam alone are almost eating up a huge load of CPU power.
Most people with such a good encoding CPU on a dedicated streaming PC are using it to get better compression quality by encoding with x264 on presets that are lower than "very fast" :-)

Second log file (with the clean/new scene collection) is looking fine..log shows no lagged/skipped frames.



Thank you so much for your reply! So this would point to the CPU as opposed to the GPU. So If I try OBS on x264 and a preset of "very fast", you think this could make a difference? I will certainly give it a try. I ideally don't want to downgrade too much of my stream. So if I was looking to hardware upgrade as such, then it would point to the CPU? Just going to test with the x264 and "very fast".
 
First log shows a few lagged/skipped frames, but still under 3%:
Code:
11:24:30.809: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 248 (2.6%)
11:24:30.809: ==== Recording Stop ================================================
11:24:30.812: Video stopped, number of skipped frames due to encoding lag: 35/9362 (0.4%)


11:18:29.274: Output 'adv_file_output': Total frames output: 6799
11:18:29.274: Output 'adv_file_output': Total drawn frames: 6733 (6846 attempted)
11:18:29.274: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 113 (1.7%)
11:18:29.276: ==== Recording Stop ================================================
11:18:29.279: Video stopped, number of skipped frames due to encoding lag: 12/6846 (0.2%)
rendering = GPU
encoding = CPU, if x264 is used

In your case, you chose to use NVENC, so the Ryzen 1800x basically is doing nothing other than running your browser sources, webcam tool and other backround stuff.
Now that I realise, that you use NVENC instead of X264 on a dedicated streaming PC, it is very Impressive, that the taskmanager shows 63% CPU load, although it's not even encoding your stream. Seems like the amount of sources and the virtual webcam alone are almost eating up a huge load of CPU power.
Most people with such a good encoding CPU on a dedicated streaming PC are using it to get better compression quality by encoding with x264 on presets that are lower than "very fast" :-)

Second log file (with the clean/new scene collection) is looking fine..log shows no lagged/skipped frames.



This is with a x264 encoder and very fast.

12:28:34.508: Video stopped, number of skipped frames due to encoding lag: 54/5522 (1.0%)
12:28:34.502: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 215 (3.9%)

https://hastebin.com/exaposogoj

I do have a question. Do you know if I kept it on NVENC (and the settings that I do have at the minute), if I upgraded the GPU, would that have any benefit to it at all? Or is it all going to be fully reliant on the CPU? I could easily grab a new GPU and pop that in and see if that had any beneficial effect. Upgrade from a GTX 960 to a nvidia 10 series or something like that.

Also thank you for your help and helping me work this out.
 

BK-Morpheus

Active Member
In all those log examples, the rendering lag is the most obvious, so the GPU is struggling to keep up with all the filtering, resizing and rendering.

You said, you could easily swap out the GTX960 for a newer GTX card...I would definitely try that, if you want to keep using the huge amount of sources and filters in OBS.
But I'm not sure, which parts of the GPU are doing the rendering stuff. I mean in the taskmanager screenshot, there is only 33% GPU load overall (spread through different apps with different kind of GPU jobs) but still OBS is lagging some frames due to the GPU rendering performance.
 

koala

Active Member
If you install gpu-z, on its 2nd tab (Sensors) you have a more detailed realtime look on some gpu components. With a bit of luck, a bottleneck may be seen here.

I suggest you use nvenc as encoder. With your last x264 encoding session, with veryfast preset, you got 1% lost frames due to encoding lag, which means 1 frame stutter about every 1-2 seconds. Since veryfast with x264 is not much better than nvenc on the gtx 960, with that lost frames you have worse video than you have with nvenc, and you are simply wasting the cpu cycles required for x264 for nothing.

By the way, nvenc on Pascal (GTX 1xxx) is a bit better than nvenc on Maxwell (your GTX 9xx). No real difference visible between nvenc on Pascal compared to x264 veryfast. If you want better quality than that, you need a slower x264 preset (faster, fast, ...) but for this you don't have the CPU power. So, in the end, nvenc is the best solution as long as you don't want to highly invest into hardware.
 
Last edited:
In all those log examples, the rendering lag is the most obvious, so the GPU is struggling to keep up with all the filtering, resizing and rendering.

You said, you could easily swap out the GTX960 for a newer GTX card...I would definitely try that, if you want to keep using the huge amount of sources and filters in OBS.
But I'm not sure, which parts of the GPU are doing the rendering stuff. I mean in the taskmanager screenshot, there is only 33% GPU load overall (spread through different apps with different kind of GPU jobs) but still OBS is lagging some frames due to the GPU rendering performance.


Thank you so much for your replies and your help. I will be able to use this info and go forward from here to resolve. Thank you so much.
 
If you install gpu-z, on its 2nd tab (Sensors) you have a more detailed realtime look on some gpu components. With a bit of luck, a bottleneck may be seen here.

I suggest you use nvenc as encoder. With your last x264 encoding session, with veryfast preset, you got 1% lost frames due to encoding lag, which means 1 frame stutter about every 1-2 seconds. Since veryfast with x264 is not much better than nvenc on the gtx 960, with that lost frames you have worse video than you have with nvenc, and you are simply wasting the cpu cycles required for x264 for nothing.

By the way, nvenc on Pascal (GTX 1xxx) is a bit better than nvenc on Maxwell (your GTX 9xx). No real difference visible between nvenc on Pascal compared to x264 veryfast. If you want better quality than that, you need a slower x264 preset (faster, fast, ...) but for this you don't have the CPU power. So, in the end, nvenc is the best solution as long as you don't want to highly invest into hardware.

Thank you so much for your replies and your help. I will be able to use this info and go forward from here to resolve. Thank you so much.
 
Last edited:
Top