Question / Help NVENC Encoding overloaded

LordCandyAndy

New Member
I'm recording with NVENC on OBS Studio and am experiencing encoding overload, for some reason windows is prioritizing games over OBS even though i turned off Windows Game Mode and lowered the priority of my games, I'm not using above 80% gpu usage and 50% video encoding and am still getting encoding overloaded.
My specs:
Ryzen 5 3600
Gigabyte Gtx 960 4GB

Latest Log:
 

FerretBomb

Active Member
09:37:18.449: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 16 (0.3%)
09:37:18.449: ==== Recording Stop ================================================
09:37:18.449: Video stopped, number of skipped frames due to encoding lag: 1091/5877 (18.6%)
Almost entirely due to encoding lag; GPU overload isn't the problem here. The most common fixes for EO on NVENC:
-Use the Quality preset, NOT Max Quality
-Uncheck Lookahead
-Uncheck Psycho-Visual Tuning
All three of these use CUDA cores, and can cause problems even on a setup that should otherwise run well.

More issues:
09:36:29.444: rate_control: CBR
09:36:29.444: bitrate: 80000
Don't record in CBR/VBR. Use CQP/CRF instead, which are quality-target based rendering methods. They only use as much bitrate as is needed to maintain a given quality level, so you aren't wasting bitrate needlessly, and also aren't choking out at times where there's a LOT going on. Most use in the 16-22 range, with lower being better quality. Going down to 12 is almost never necessary, and 0 should never be used (0 is completely uncompressed, can take 3-7GB per minute).

09:35:45.613: fps: 120/1
Recording at above 60fps is not officially supported.

09:37:18.449: [ffmpeg muxer: 'adv_file_output'] Output of file 'D:/Videos/record_2020-04-02 09-36-29.mp4' stopped
NEVER EVER RECORD DIRECTLY TO MP4 FOR ANY REASON.
Record to MKV or FLV.
If you need mp4 files later, use the File menu in OBS, Remux Recordings. There's also a checkbox in the settings to do this automatically after a recording ends. MP4 is not a recording format. It is extremely fragile, and stores all of its indexing atom at the end of the file. So if anything problematic happens during recording, the entire file will be corrupted and unrecoverable. A total loss. Digital garbage, where the only thing you can do is delete it and start over.
 

LordCandyAndy

New Member
I'm sorry i sent in the wrong log, i normally use mp4, cqp 20, High Performance, unchecked lookahead and pschycho visual settings. I've tried with mkv for this log but the issue persists. I keep getting around 10% encoding delay. I've capped my fps in games so i don't use higher than 60% gpu usage whithout recording. While recording, I used task manager to check my usages. The gpu 3d encoding stayed below 60% and the video encoding below 30%.

Actual log:
 

FerretBomb

Active Member
The second recording in the new log (when recording to mkv instead of mp4) shows no encoding lagged frames. The first one (recording to mp4) does.
If the issue persists, drop your framerate to 60fps from the 120 it's currently at; again, recording above 60fps is not supported.
(And just about everyone here wants to give a swift kick to the neck to the insufferable jackass on YouTube that keeps recommending recording Minecraft at extremely high framerates.)
 

LordCandyAndy

New Member
I don't agree on that last sentence since higher fps does mean better resample on videos, but yes there are people that want above 240 fps wich is totally stupid, since you cant resample that much to 60 fps.

And the second recording was accidentally, so i didnt open the game. I'm gonna rec with mkv and check if it really helps and post the log here later.

I do want to mention that i only use 1 monitor and am recording higher fps than my monitor refresh rate. I heard that Windows caps the fps to the monitor's refresh rate?

Log:
 
Last edited:

LordCandyAndy

New Member
It appears that the video did improve, thanks for the advice to switch to mkv. There are still some lagged frames, but i guess that's because of the high fps i record.

I've done some research myself and found out that there is a Nvidia Control Panel option that can cause those frame stutters
If you go to advanced 3d Settings, you will see an option called like: "less delay".
If u DON'T record with OBS Studio, i recommend you turn this on or ultra
If u DO record with OBS Studio, turn it off. It causes more input delay but it helps OBS prioritizing over games.

Further Tips:
- Put OBS priority on High
- Start the game BEFORE you open obs
- Run OBS with Admin
- Find your game on task manager and put the priority on 'below normal'
- Turn off Windows Game Mode (only if all other options don't work)

This Thread is closed
 

FerretBomb

Active Member
Just mentioning, starting the game before you start OBS is not needed. The others can help, but really, running OBS as Admin and running it at Above Normal or High priority is going to have the most effect. Running as Admin allows OBS to enable a GPU priority workaround that will allow it "first dibs" on GPU time to handle its housekeeping tasks, before the game can use it all up.

Windows does not cap the game to the monitor's refresh. That's what vsync does. With vsync off, you'll get screen-tearing effects on the monitor as the incomplete offscreen buffer is swapped to the visible onscreen buffer, and the write continues on the new offscreen buffer. The frames are still written, and should be capturable with OBS, even above the monitor's refresh.

And no. Recording at 240fps is a goddamn waste, and infuriating. The only possible use is for slow-motion effects. The 'resample' argument is not correct; you won't get interpolation (without some REALLY expensive software that you absolutely do not have), you'll get a mess of frames jammed together and crushed down at best. But hey, this is why that dude needs to get kicked in the neck, for spreading this BS that other people end up defending and repeating. Absolutely maddening.
 

koala

Active Member
And no. Recording at 240fps is a goddamn waste, and infuriating. The only possible use is for slow-motion effects. The 'resample' argument is not correct; you won't get interpolation (without some REALLY expensive software that you absolutely do not have), you'll get a mess of frames jammed together and crushed down at best. But hey, this is why that dude needs to get kicked in the neck, for spreading this BS that other people end up defending and repeating. Absolutely maddening.
We know you don't like this, and you're completely right, but it's not your position to say what other people should do or not do. It's silly, but it's not dangerous what they do. We all did silly things in the past, especially when we were much younger. And we regret we did these things, because we know better now. But at that time, we would have done it anyway, regardless of good advice. So don't put too much energy into that topic.
 
Top