Video stuttering during game recording

duggage

New Member
Hi,

I feel like there must be some simple setting change that I'm overlooking. This stuttering happens particularly in high action situations (e.g. SoD2 while fighting zeds in melee or hitting plague hearts). I thought it was an FoV setting in the game, but I lowered it down to default FoV, medium settings, etc- just in case. I've pushed a lot of settings into OBS to eliminate other apps (no voicemeter, etc). I use Nvidia bg removal and noise reduction, but instead of through the nvidia app, I filter through OBS.

This log was from a fresh pc boot up with only usual startup apps and OBS, Steam, Elgato Camera Hub and SoD2 opened.

Log: https://obsproject.com/logs/UcAGDBuHWpwJpPqD

The critical warning in the logs is audio buffering. I'm not sure what setting to change to address that or if that is the problem. The logs say the buffer is full only after I've stopped recording.

I've done a lot of tweaking trying to address this. My output used to match my desktop, now I scale it down. I turned my audio bitrate from 192 down to 160. Psycho tuning off/on, keyframes, etc. Like almost every back and forth setting.

I would really appreciate any insight or feedback. Thanks!
 

rockbottom

Active Member
You can disable Game Bar/DVR.

Other than the C35 @ 100Hz, your log looks OK. That Nvidia audio effects could be the source of the audio buffering.

What worked for me? 1080p, I never had any issues but higher resolutions, setting my 3090 for maximum throughput did the trick.

All optimizations are Off. G-Sync Off. Fixed Monitor Technology with V-Sync On FAST Triple Buffering On.

Texture Filter Quality = Max Performance
 

duggage

New Member
Regarding the Game Bar/DVR, I have all the background recording options turned off for Xbox Game Bar and Captures. The only other step I've seen regarding disabling them is running the console(powershell) command to remove it.

get-appxpackage *Microsoft.XboxGamingOverlay* | remove-appxpackage

Is that what you're referring to?

I stepped through all the tweaks you listed. There are probably other optimizations to turn off. I had everything at default. I think quite possibly the issue is going to come down to nvidia background removal eating into resources.
 

LeoGeo

New Member
Same here. I bought a 4090 and am recording 4K/60 at 30-40 load with no render or encoding lag, but after a while (4-6 minutes) my preview starts to stutter for 30-60 seconds and even my recording starts to stutter at these parts.

There are many suggested solutions in the linked thread that can alleviate the problem, but it's still there. Very frustrating. It seems to be an OBS issue for a specific type of setup. Some people have this or a similar stutter-problem for months or even a year.

However, the patch notes for the last OBS hotfix stated that the OBS team is currently working with Nvidia to fix various issues. Maybe our problem is included. Let's hope it doesn't take too long.


 

rockbottom

Active Member
Leo, it's not OBS. I have both of my PC's running stutter free with OBS. 6700k/1660 Super & a 12900k/3090. I am using an older driver (522.30) on both systems so perhaps the newer drivers are still causing issues. Wouldn't know....

dug, yeah get rid of that Nvidia removal crap.
 

duggage

New Member
Leo, that's interesting, but it's not exactly the same issue I'm running into. I can play/record for an hour without recording stutter if I never get into any serious action.

To me this indicates a problem under load, so I'm trying to figure out what settings I may not have optimized to handle this. Is it OBS not getting enough resources? Should I be adjusting CQP or trying CBR?

Rock, I would rather turn other settings down than disable the bg removal filter (which OBS is handling anyway). Speaking of...

In testing this morning with the OBS Stats window open the lag happens when average time to render frame goes > 3 ms. I had it spike up to 15 and sometimes over 20 ms. (in the stats window for OBS it turns yellow or even red). FPS in OBS also drops below 60 when this happens (and turns red). And the "skipped frames due to encoding lag" start adding up.

Two things to note:
1. CPU usage in OBS never gets above 1.5% even when this lag happens (it was 1.4-5% only once during the forced lag).
2. FPS in the game during recording lag was 98-100 and the game itself showed no sign of distress. At least that was the D4 test I did this morning (it's simply faster to reproduce the error in D4 than in SoD2).

Generally speaking I don't feel/see much (if any) issue in my actual play. It just looks lagged in the recording.

And fwiw I have OBS installed on the OS drive to an m.2 but the recordings save on another m.2 that is faster with higher capacity (the same drive the game loads from).

I think my next step is to look into what contributes most to encoder lag and time to render frames. Thanks for the feedback.
 

rockbottom

Active Member
Dial it back to 30FPS & see if you can get it stable w/no stuttering. Encoding isn't the issue, content isn't being rendered fast enough & you're getting stuttering. Crap in, crap out.
 
Last edited:

duggage

New Member
I managed to eliminate skipped encoding frames and significantly reduce skipped rendering frame by forcing in-game fps down to 80 through the nvidia cp. This was in my testing with D4. I had 1 skipped render frames. In the other game I was testing with, I wound up with about a dozen missed render frames after setting motion blur to low (because even with no dropped frames it still felt a little jangy). I think dropping the frame cap down to 75 will perhaps address this.

I think what was happening is that even though my games were rendering at/near 100 it could be that they were maxing out the gpu to maintain that and it was crowding out any resources for OBS.

The above changes even include reverting the downscaling I was doing back to rendering output in the native resolution (3440X1440).

I did have a mobo update from may that I applied last night and a firmware update on my faster m.2. These may contribute to the fixes, although I'd already fixed any lag in d4 with the 80fps change before applying those fixes.
 

rockbottom

Active Member
Cool, sounds like you're on the right track. Reduce the load &/or increase throughput until the stuttering is eliminated.

Good move, I assume that BIOS update addressed the memory issue with AMD CPU's?
 
Top