Question / Help Backlag

KinqOslo

New Member
Hi, i'm currently trying to record Star Wars Battlefront 2. When i hit record, there is a little bit of lag and backlag (my character lagging back) these lags only occur in OBS and not the game. i'm wondering what settings should i have based on these specs: https://valid.x86.fr/jp6mby
 

Narcogen

Active Member
You're getting a little bit of rendering lag, which is GPU overload. Reducing quality options in your game and frame capping if possible may help. As a last resort, try dropping your canvas resolution.

21:58:10.265: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 22 (0.5%)

Some sessions also show encoding lag.

21:58:10.265: Video stopped, number of skipped frames due to encoding lag: 352/4303 (8.2%)

To resolve that you should probably change from using CBR with NVENC (this is primarily for streaming, not recording) and change to CQP rate control with a quality setting between 15 (high quality) and 23 (good quality). If you get encoding lag try increasing the factor until it goes away.
 

Narcogen

Active Member
1080p60 is challenging on single PC setups, especially depending on content. You may need to target 720p60 or 1080p30, or perhaps an intermediate resolution like 900p60.
 

KinqOslo

New Member
Nothing works... It's skippes frames even without recording and it's like the obs studio is tottaly unsynced with the gameplay :(
 

Narcogen

Active Member
OBS needs to render even when not recording. The only part of OBS' operating procedure that only happens when recording or streaming is encoding.

https://obsproject.com/wiki/GPU-overload-issues

That said, from your logfile, more of your lag was encoding than rendering, but lag that happens even when not recording is rendering lag, which is affected by limiting frame size/frame rate as well as capping in-game framerate.
 

carlmmii

Active Member
"When i hit record, there is a little bit of lag and backlag (my character lagging back)"

To clarify, are you seeing frames out of order in the recording?

If so, I've encountered this myself, specifically when trying to capture Shadow of the Tomb Raider with game capture. It would only happen with game capture, any time the GPU was overloaded.

That's the only game I've encountered that I've noticed this happen, but looking at the logs the "We're DXGI1.4 boys!" is definitely something that stood out to me. I won't say that it's a definitive connection, but it's possible that there's something going on with how the frames are being hooked from DXGI1.4 that OBS gets out of order if the necessary frame timing isn't met.

That said, you've got 2 options. The easiest way to prevent the out-of-order frames is to use display capture. This ignores the underlying problem of OBS not getting the GPU resources it needs, but it does ensure that there at least won't be any out-of-order frames happening.

The other thing to do is to get OBS the resources it needs. You can try limiting the framerate in-game and reduce settings to lower your overall GPU usage, or you can try the 24.0.3 specific method:
- Turn game mode on in windows
- Run OBS as administrator

That should attempt to have windows allocate the necessary GPU resources to OBS, but your mileage may vary.
 
Last edited:
Top