Background Video Loop lags after some time

3ncoder

New Member
Hi guys,

in my main scene I have 2 cameras (Elgato Cam Link Pro) and a background video that loops forever.
After some time the background video loop starts to lag. It seems like the fps drop down to 10 and I don't know why.
The cameras do not lag at all, it is the background loop only.
It worked fine for years now but now some things cause troubles.

The output is set to 50fps, video loop is 25fps.

When I disable hardware decoding in the video settings it does not change.
After some time it starts to have only about 10fps.
So no matter if hardware decoding is on or off, it starts to lag after some time.
To solve the problem when it starts, I found out that just select or deselect hardware decoding in the menu and it gets fluid again.
It seems like a decoding problem?!

Logs: (yes, soundcard was not active)

 

konsolenritter

Active Member
Hi @3ncoder welcome back aboard, :)

now you have a mixed setup. Monitors and cams are still 59.94 while playback and stream now are 50/25.
The "download_frame" part of the 20ms-graphics-thread maxes out horrible sometimes. Thats the thread of the 50/25 parts of your system. Whatever exactly the download_frame part means...

Your observation that dangling between on and off of hardware decoding is a clear sign that at these moments buffers for that playback are reset so the "counter for your trouble" (whatever the reason may be) is reset, too.

What happens if you bind your looping video as an vlc source? Same experience then?
 

3ncoder

New Member
Hi

I will try to use vlc source.
Cams are 50fps too btw.

Only the display is 59.94.

I don't understand why this is happening now and never happened in the past but I will do further invesitgation.
 

konsolenritter

Active Member
In the log you provided the camlink hdmi device are noted with 59.94. Old logfile? Anyway...

See what the log analyzer tells us:
 

3ncoder

New Member
I just found out that changing the framerate in OBS requires a restart of the programme.

So this was not an old log file, the problem was:
I do two kind of streams:
DJ streams with gopros at 50fps because 59,94 result in flickering in my environment
Gaming streams with gamecatpure at ~60 or so in sync with my screen.
Maybe I should change that but I never thought about problems.

When I do a DJ stream I need to change to 50fps and never did a restart.

I just checked it:
CamLink said "Input: 50fps" but in OBS logs it said "Input: 59.94fps"
I just did a restart after the change to 50fps in OBS settings and now it is in OBS "Input: 50fps" too.

I will check if that solves the problem.
Thank you for the hint that it said 59,94! I didn't see that.
 

3ncoder

New Member
I just found out, the problem is way bigger.
At that moment when the background starts to stutter: my whole computer freezes.
No mouse movement possible, stream stops on my laptop where i chat in the the Twitch command center.
After some seconds my computer comes back from freeze and the background starts lagging.

I will now install the previous version of OBS. If that will not help I will roll back nvidia drivers
 

3ncoder

New Member
I installed OBS v27.0.0 and checked it.
Unfortunatelly I did a backup of the profile folder only and not the scenes.... massive pain in the ass but now I can't go back.

So I quickly made up a scene to go live, it was not long enough to be sure that it works or not but I found out:
After this shorter live session I checked the logs and there was no encoding lag or gpu overhead stuff in it.
So it seems that these issues are related to a deeper problem then just "overload" (it is a 1080Ti, to my mind there cannot be any overload with nvenc).
Is there like a log level "debug" or so?

To sum things up:
In the latest version of OBS the computer freezes after about 2.5h when in the scene with the looped video.
After the freeze the video lags af.
When I am in my game-capture scene everything is fine.

My next step is to stream to a raspberry for testing purpose for some hours with v27.0.0
 

konsolenritter

Active Member
Oooh, i think you mixed up two problems now.

The "no longer encoding lag nor gpu overhead stuff" belongs to your "quickly made up a scene". For me it sounds naturally to not overloading the system (that is still powerful as before) with a lean composition of scene(s) now. In other words: Less load, less issues.

The complete computer-freeze including mouse-got-stuck is a (by far) heavier issue, i think. oO
No single reason or raisen issue in OBS should bring up such severe trouble into the whole running windows system. It sounds, at least for me, like a fundamental prob with underlaying drivers (as you mentioned already) or the complete windows installation by itself.

Try a longer test session then. :)
 

3ncoder

New Member

I tried 3 times with v27.0.0 (in the attached log there is only one try)
I created the same scene and streamed for more than 3h to my raspberry.
At any time when I checked the video in OBS the background-loop did not lag at all.
Even now the loop is running fine. It's running fine since ~19:00

But there is still some rendering and encoding lag.
This problems typically happen when the stream is longer because I did tests with only 1 to 2 hours and there was no lag in the logs.
Currently I am not sure about what the problem is because my GPU is chilling in GPU-Z while encoding.
 
Top