Question / Help Understanding Rendering Lag - Acceptable threshold?

HIPHI

New Member
Please help me understand 'Frames missed due to rendering lag'.

Is 0.1% an acceptable value?

If I'm experiencing 0.1% Frames missed due to rendering lag...
That's 1/1000 frames missed...
At 60 fps that's 1 frame missed every 16.667 seconds...? (1000 frames / 60 fps)

To me, that seems like an acceptable rate that wouldn't add significant 'chop' to my stream.

I could make some changes to move it towards 0, but first I want to know if my reasoning is sound.

Please help me see if I've made errors in my understanding or conclusion.

I haven't included a log file as I don't think it's required for this sort of a conceptual / abstract question.

Thanks very much.
 

Suslik V

Active Member
Where are you viewing it, in Stats or in log-file?

If in Stats, then just ignore this, because more important is color label for FPS and Average time to render frame. The last one has window of 1 second long to calculate values (and ms >100%, ms >75%, ms <=75% error/warning/good levels), while missed due to rendering lag just uses total value (and 5%, 1%, 0% error/warning/good levels).
FPS has default error/warning/good levels at: <80%, <95%, >=95%.

(source code stats:
https://github.com/obsproject/obs-s...8c34e495bcebcd/UI/window-basic-stats.cpp#L319
frame time:
https://github.com/obsproject/obs-s...defe18e8c34e495bcebcd/libobs/obs-video.c#L909 )
 

koala

Active Member
An explanation what rendering lag is, in comparison to encoding lag:
OBS isn't just taking the frame buffer of a game and puts it into the video. You see OBS is able to compose a scene from numerous sources. OBS takes the frame buffer of all the sources, is cropping and rescaling them, and uses the same technique as a game to render video frames composited of all the sources. This frame buffer, created by OBS, is then encoded and sent to the output (stream or recording).

All the compositing takes place on the GPU, and if there are not enough computing resources on the GPU, OBS isn't able to composite every video frame in time, thus having to skip a frame from time to time. This is what is called "missed due to rendering lag".

If a game starts up, or if you start the recording/streaming process, a spike of a few lost frames can happen due to some heavy load initialization at start. These are not important. Important is that the action after initialization is running smooth, so look at the stats window as @Suslik V said and check if the number of frames missed due to rendering lag is ever increasing, or if it stays constant after initialization (game start, loading screen). The time to render a frame has to be well below the maximum time available for rendering a frame. For 60 fps video, the maximum time available is 1/60 = 16.6 ms.
 
Top