Question / Help Image stuttering without apparent reason (Ryzen 3950x)

Aldur

New Member
Hi everybody,
It's been 3 days I'm searching and I can't find what's the problem,

I'm trying to record a gameplay of Divinity Original Sin 2, but for some reasons in the mp4 video, the image is stuttering, and we can clearly see that's it's not 60fps.
(note that I also tried with the Witcher 3, I got the same result)

- Here's a video example : https://www.youtube.com/watch?v=Ot3LURaGcV0
- Here's the log of the video : https://obsproject.com/logs/YiwzaeW7XNFRlMWf

As you can see on the log, I have 2 screens, one 21/9 3440x1440 100hz,
and the second is 16/9 2560x1440 60hz, this is the one on which I play and record with OBS.

I tried a bunch of things :
- Put the graphic settings on lowest
- Put an fps limit ingame
- Changed multiples times stream resolution
- Changed my screen resolution to 1920x1080 via windows parameters
- Added custom preset (see on the log)
- Changed from x264 to Nvenc (new)
- Changed from Streamlabs to OBS
- Ran OBS in admin mode

But none of these changes solved the problem,

Am I overestimating the encoding power of my CPU ? I would be supprised but at this stage but I can't understand what's going wrong...

Thanks in advance for your help ;)
 

Riptwo

New Member
I've had a similar issue for months on a Ryzen 3900x/2080 combo, and I still haven't been able to solve it. My best guess is that windows sees my primary gaming monitor as 59hz/119hz instead of 60/120, so maybe it's a non-60FPS framerate being sent over to OBS? I tried using Custom Resolution Utility to force my monitor to the correct refresh rate, but that didn't fix it.

I've still got a support thread up from last October documenting these issues, but haven't figured out an answer yet https://obsproject.com/forum/thread...ing-lag-or-dropped-frames.111409/#post-421976
 

Aldur

New Member
Hey man, thanks for the answer,
well at least we're two in the same case, I'll try to do a test only on my 16/9 monitor and see what it does, I'll keep you in touch...
It's kinda frustrating isn't it ? With those rigs you would at least expect everything running smoothly.... that sucks x)
I'll let you know if I find something else
 

FerretBomb

Active Member
1) NEVER record to MP4 directly FOR ANY REASON. It is NOT a recording format, and if anything screws up, your entire recording will be corrupted and 100% un-recoverable. If you need mp4s, after recording to mkv/flv use the 'Remux Recordings' option in OBS' File menu to re-package the video as mp4. Only takes a few seconds.

2) The framerate issue you're seeing is due to a long-standing Windows OS-level bug. It doesn't handle disparate refresh rates well, when hardware-accelerated programs are involved, due to how the desktop compositor works. A fix is coming in the Windows 10 v2004 update, but until then the only fix is to run all of your monitors at the same refresh rate. So 60hz in your case, @Aldur. For some setups, disabling the Preview in OBS can act as a workaround, but it isn't 100% reliable.
 

Aldur

New Member
Hey ! Alright I'll switch to mkv ;)
So if I understand well, in nvidia preference panel I just have to switch my 100hz to 60hz and it should work fine ?
That's a good news, I'll try in 5min !
Thanks for the answer @FerretBomb
 

FerretBomb

Active Member
Hey ! Alright I'll switch to mkv ;)
So if I understand well, in nvidia preference panel I just have to switch my 100hz to 60hz and it should work fine ?
That's a good news, I'll try in 5min !
Thanks for the answer @FerretBomb
That should do it, yes. :)
I'm not certain if making the change in the nVidia control panel will make the changes at the OS level, or if it just controls what the GPU is sending; if it was me, I'd also double-check in the Windows display properties section too, just to be certain that's been updated.
 

Aldur

New Member
Alright here's the results of my testing :

- Just changed my refresh rate to 60hz of my two monitors on the Nvidia panel, it didn't work
- Went into Windows parameters and found out that my 21/9 was on 60hz but my 16/9 couldn't go higher than 59hz, so it didn't work but that's normal since my two refresh rates cannot be syncronised
- So I unplugged my 21/9 to only keep my 16/9 59hz, and switched my fps in OBS from 60 to 59, and.... it worked !!
The video is smooth !

So that's that for this issue, I'm happy to see that it's not coming from hardware, but to be honest it's quite frustating to not be able to use a second screen... Hopefully Windows fixes the issue in the next update.

BUT I found another problem by trying to push a bit more my 3950x :

OBS doesn't seem to use the full potential of my CPU,
while Afterburner was saying that my CPU was at 39% under load, I was experiencing a massive encoding lag in OBS !
Is this a known issue (@FerretBomb) ?
 

FerretBomb

Active Member
Well, MSI Afterburner is on the list of programs known to conflict with OBS, but that's more of a stability/crashing concern.
The CPU encoder will only use as much as the preset you're using needs. If you want to use more CPU, switch to a slower preset.

Really though, going any lower than x264 Medium has severely reducing rates of return... and the NVENC core in your 2080Ti delivers compression on-par with x264 Medium to Slow. I'd... really just swap to NVENC. It's a separate part of the GPU that sits idle unless you're encoding video, so will not affect gameplay performance.

But yeah, switch to Slow or Slower on the x264 preset if you want to use more CPU.

You're also recording to CBR, and shouldn't be. For recording, use CQP/CRF; they are quality-target based compression, and will use as much or as little bitrate as needed to maintain a given image quality level. The only thing a slower encoding preset will do is generate marginally smaller filesizes on the recording.

On a side note, you CAN use software to manually define a refresh rate for a given monitor, forcing the other one to 'take' 60hz or the first to 'take' 59hz. Many manufacturers just don't enumerate all of the resolutions/framerates the monitor can actually support. So there's the potential you can still use both monitors.
I can't remember the name of the one most people around here use though, but it's pretty easy to use.
 

Aldur

New Member
Thanks @FerretBomb for taking the time to answer, this is precious !
I'm taking notes right now ;)

Should I change to NVENC for streaming also ? Or this is only better for recording ?

And actually my first question was more :
"I'm recording/streaming with this preset, and I'm actually experiencing a lot of Encoder Lag.
BUT my CPU is showing only 39% utilisation. Why isn't OBS using more CPU ressources to prevent encoder lag ? Is this normal ?"

not sure if it's clear ^^

I'll search the name of the software to change hz

Thanks again man
 

FerretBomb

Active Member
Should I change to NVENC for streaming also ? Or this is only better for recording ?

And actually my first question was more :
"I'm recording/streaming with this preset, and I'm actually experiencing a lot of Encoder Lag.
BUT my CPU is showing only 39% utilisation. Why isn't OBS using more CPU ressources to prevent encoder lag ? Is this normal ?"

not sure if it's clear ^^

I'll search the name of the software to change hz

Thanks again man
Well, you'll need to use CBR for streaming to most services. Otherwise, yes. Consumer-grade nVidia cards can have up to two NVENC instances, so you can stream CBR via NVENC, and also record CQP/CRF via NVENC separately by changing the recording away from 'same as stream encoder' to 'NVENC'. You'll need to disable Shadowplay and GameDVR in Windows (one or the other usually 'eats' one of the NVENC instances, turning them off frees it up for OBS to use).

Your logfile didn't show any encoder overload, but here's a likely culprit:
12:32:33.955: Loaded scenes:
12:32:33.955: - scene 'AOC NOCAM':
12:32:33.955: - source: 'AOC Capture' (monitor_capture)
12:32:33.955: - source: 'Capture de Jeu' (game_capture)
12:32:33.955: - source: 'CASQUE Audio' (wasapi_output_capture)
NEVER have a Display/Monitor Capture in the same scene as a Game Capture. It's well-known to cause render delay and encoding lag, even if the DC is set not-visible. It also can work fine sometimes, and cause problems at others, randomly. Display Capture should only ever be used as an absolute last resort; if you need it, create a second Scene just for it to avoid capture-conflicts.

Beyond that, we'd need a logfile from a session at least 30 seconds in length where the CPU encoding overload is happening to tell what's going on, on the back-end.

I believe the software I'm thinking of might be CRU, the Custom Resolution Utility:
Since the refresh rate is part of the monitor's EDID resolutions spec, it's included in that. Do be aware that you can mess things up badly with this. It's very much an under-the-hood utility, and at-your-risk, so double-check before you commit and after, and only edit one monitor at a time so you have a fallback in case the one you're editing starts throwing an 'out of range' error so you can fix it.
 
Top