OBS not capturing first 5 seconds of video

mattdoot

New Member
Title but I use display capture to record In OBS most of the time and at some point I noticed the first couple seconds of the recording weren't captured in the output video file. I ran a quick test recording for 11 seconds and the output file came out with only 6 seconds. Attached file is my log file. Any idea what's causing this??
 

Attachments

  • 2024-10-08 20-16-53.txt
    13.3 KB · Views: 6

FelixMerritt

New Member
Title but I use display capture to record In OBS most of the time and at some point I noticed the first couple seconds of the recording weren't captured in the output video file. I ran a quick test recording for 11 seconds and the output file came out with only 6 seconds. Attached file is my log file. Any idea what's causing this??

Check the Encoder Settings. Sometimes adjusting the encoder settings can help. Try switching between software (x264) and hardware (NVENC/AMD) encoders to see if it makes a difference.
 

koala

Active Member
Any idea what's causing this??
You have the replay buffer active before you started recording. In this case, recording isn't starting an encoder of its own, it's re-using the encoded data from the replay buffer encoder. A usable data stream can only start with a key frame, so recording is waiting for a keyframe, then it starts writing your video file. A key frame is generated every 250 frames according to your log file (that's the default), and 250 frames at 30 fps is one keyframe every 250/30 = 8.3 seconds. So you have to wait at most 8 seconds for the recording to contain any useful data, if the replay buffer is already active in this moment.

To avoid this small start up delay, you need to make sure the replay buffer is stopped before you start the recording. You can also decrease the keyframe interval, but this will lower the quality for videos created with the CBR rate control such as yours. Or you just write the replay buffer instead of explicitly starting/stopping an extra recording for just a few seconds. That's what the replay buffer is for in the first place, after all.
 

mattdoot

New Member
You have the replay buffer active before you started recording. In this case, recording isn't starting an encoder of its own, it's re-using the encoded data from the replay buffer encoder. A usable data stream can only start with a key frame, so recording is waiting for a keyframe, then it starts writing your video file. A key frame is generated every 250 frames according to your log file (that's the default), and 250 frames with 30 fps is one keyframe every 250/30 = 8.3 seconds. So you have to wait at most 8 seconds for the recording to contain any useful data, if the replay buffer is already active in this moment.

To avoid this small start up delay, you need to make sure the replay buffer is stopped before you start the recording. You can also decrease the keyframe interval, but this will lower the quality for videos created with the CBR rate control such as yours.
I had a thought that might be the cause but I wasn't 100% sure, thank you
 

koala

Active Member
The replay buffer is a constant recording to RAM. The RAM buffer contains the last x seconds - depends on how large the memory buffer is. To write the current replay buffer to disk, click the small "download" button that appears if you start the replay buffer. Or define a hotkey for that action in settings > Hotkeys.

If you just want a small clip of a few seconds, just do whatever you want to show, then write the replay buffer.
 

mattdoot

New Member
The replay buffer is a constant recording to RAM. The RAM buffer contains the last x seconds - depends on how large the memory buffer is. To write the current replay buffer to disk, click the small "download" button that appears if you start the replay buffer. Or define a hotkey for that action in settings > Hotkeys.

If you just want a small clip of a few seconds, just do whatever you want to show, then write the replay buffer.
Oh thanks
 
Top