Question / Help What exactly is being recorded?

Alex.lepauvre

New Member
Dear Community,

I am using OBS to record the display when running programs, for which I need to make sure that specific things are being presented on the screen at very specific time points. In my case, it is really important to know when things are actually presented on the screen, and not only when they are requested to be presented. Despite logging the estimated time at which something "should have been presented", I have reason to doubt these estimations. I have therefore been considering to use OBS to record a run of a specific program, and then analyze the video output to make sure that things are presented at the time they should be presented. My question is therefore the following: what exactly is OBS recording? Is it recording the display directly (in other words, is it exactly the same as having an external camera filming)? Or is it recording something else. I apologize if this question has already been asked somewhere else, I could not find it. I also hope my question is clear enough, I am quite new to computer sciences.

Thanks in advance for your help,
 

koala

Active Member
It depends on the source type. If you use display capture, OBS is reading the frame buffer of the graphics card just before it is sent out to the monitor. It's probably 0 to 1 frame time before it is actually visible on the monitor. On a 60 Hz monitor, 1 frame time is 16.66 milliseconds.

If you need to time it 100% accurately up to the millisecond, you have to measure it, because the monitor itself also has some kind of latency that varies from model to model.

If you need to know the latency from some input becoming visible, you also have to count the latency of the app becoming aware of the input. For example, if you do a mouse click, the click information has to be transferred to the app, which also has a latency of some milliseconds - mostly depending on the mouse signal rate. Keyboards also have some latency. Wireless keyboard+mouse also have different latency than wired keyboard+mouse.
 

Alex.lepauvre

New Member
Thanks a lot for your quick reply.
This is what I was fearing. And is the frame time before being presented on the monitor consistent? For example, will it always be 1 frame time before the presentation, or can that vary from 0 to 2 for example.
And what exactly do you mean by the latency of the monitor? Is it the delay between the frame buffer being sent and the actual rendering on the screen?
Also, is it safe to assume that OBS is recording each and every buffer, or is it possible that some are not being recorded by OBS and still make it through to the display? And if yes, under which conditions is something like that likely to happen?
I am not to worried about the input part, but thanks for this precisions, I am sure this will prove to be useful at some later point.
Kind regards,
 

koala

Active Member
Google for "monitor latency for gaming" and see the results. It varies between monitors. I cannot tell more than what you can read in the search results. Apparently it's something between 5 to 10 ms.

OBS reads the frame buffer as often as it is told by its configuration. If you set OBS to produce a 60 fps video, it reads the frame buffer every 16.66 ms, whatever (finished rendered) frame it contains. If there is some rendering lag and a frame hasn't been updated within that time, OBS scans the same frame twice. And if an app is rendering more than 60 frames a second, OBS skips frames of course.

What are you trying to achieve? Usually, these considerations aren't relevant for recording. This latency isn't perceived by the human brain, it's too small.
 

Alex.lepauvre

New Member
Thanks a lot, that's really helpful. To give you a bit of context, we are trying to see whether OBS is a viable option to reliably test presentation of images on display for research purposes, for which we are really worried about the exact timings, down to the milliseconds. Despite not being noticed by users, it is highly relevant for us in term of data analysis and so on.
I have also been looking through the internet, but I could not find any clear answer to that. Is it possible that a frame buffer never makes it to the display, that it gets lost along the way? If that is the case, it would mean that some things might be present in the OBS recording despite never being actually presented on the screen.

Thanks in advance for your help,

Alex
 

koala

Active Member
I understand you want to something like test somebody's reaction to something on screen that is visible for one frame only, or something like that. And if that one frame isn't in the recording, the recording isn't usable.

If you ensure the frame rate of the monitor is equal to the fps OBS is recording, and if you ensure encoding is never overloaded, OBS is definitely capturing every frame that's being generated and that's actually output to the monitor. The usual maximum fps that is reliably recorded is 60 fps. This is possible with any reasonably strong PC that isn't overloaded with additional software. If there is enough CPU power and the GPU is reasonably strong, there should be no issues. If you need more than 60 fps, you need a bit stronger hardware, but it should work even with higher fps.

In the end, you need to do trial & error. Do the stuff you want to record. Fire up your image or video presentation and record. Single-step through the video frame by frame with a video player that is capable of advancing single frames such as Media Player Classic and verify every frame is really different to the previous.
 

Alex.lepauvre

New Member
Dear all,

I have an additional question related to this issue. We are right now using the video as well as the sound recording from OBS to measure potential delays between the audio and the video display. We are trying to measure delays due to both the programming and the hardware of our machines. We are making the assumption that in OBS, the audio and video are being recorded in synchrony, but is that the case? Or are delays to be expected between the audio and video due to the way things are recorded with OBS?

Thanks in advance for your help,

Kind regards,

Alex
 

koala

Active Member
This is unknown. There are reports of audio becoming gradually desynchronized after hours of recording, but who is at fault in this case is unknown. There were also reports of some audio track lagging behind 1 or 2 seconds. I was never able to see or reproduce these.

You have to measure audio latency yourself. Use something similar to the clapper in movie production, where you can exactly see when the clapper closed and the corresponding "clack" peak in the audio track appeared. This is one reason why the clapper exist in the first place: to be able to synchronize audio and video over several different recording devices for cutting.
 
Top