OBS Recordings have periodic dropped frames

BenCashier

New Member
Hi, I'm posting here because I'm out of ideas to fix this.
I never had this problem before and randomly my OBS records started to periodically drop from 60fps to 30fps without warning and inconsistently at 1080p.
My settings didn't change, I've tried altering my recording settings, the encoder, Presets, Auto Config, and various CBR and CQP values to nothing seems to work.
I've tried running OBS as an Admin, changing power and priority settings, Processing priority is set to high, limiting in-game frame rates to 60fps and low settings etc. Task manager doesn't show my CPU, GPU, or memory over 50% while recording uncapped and at high in-game settings. I've tried opening the recording files with other media players and editing software to see if it "just appeared" to be running slow in Windows Media Player.



Previously I ran uncapped with max settings ingame and had no problems with consistent 60fps and 1080p recordings.
Any help at all would be appreciated.

System specs:
CPU: Ryzen 7 5800X
GPU: NVIDIA Geforce RTX 3070
Monitor: 2560 x 1440 x 144 Hertz
Recording Storage: Samsung 1TB 990 EVO M.2 SSD

Last Log: https://obsproject.com/logs/OxOoEQM5mjqwp5fp


obs settings 1.PNG
obs settings 2.PNG
 

rockbottom

Active Member
That log is a mess, get your settings correct close/open OBS & then test.

Anyway, there was no lagged frames I saw anywhere in that mess but your audio solution is slacking.

23:10:35.078: [win-wasapi: 'Desktop Audio'] update settings:
23:10:35.078: device id: default
23:10:35.078: use device timing: 1

23:10:35.107: WASAPI: Device 'Headset Earphone (Arctis Pro Wireless Chat)' [48000 Hz] initialized (source: Desktop Audio)

3:11:50.154: Max audio buffering reached!
23:11:50.154: adding 917 milliseconds of audio buffering, total audio buffering is now 960 milliseconds (source: Desktop Audio)
23:11:50.154:
23:11:50.155: Device 'Headset Earphone (Arctis Pro Wireless Chat)' invalidated. Retrying (source: Desktop Audio)
23:11:50.174: Source Desktop Audio audio is lagging (over by 8579.47 ms) at max audio buffering. Restarting source audio.

23:14:37.598: Source Desktop Audio audio is lagging (over by 98261.49 ms) at max audio buffering. Restarting source audio.
23:15:06.953: Source Desktop Audio audio is lagging (over by 23639.55 ms) at max audio buffering. Restarting source audio.
 

rockbottom

Active Member
I use my on-board audio, never any buffering. Might want to check Arctics support page, maybe there's a driver update available.
It lagged again in that short test.
17:03:30.570: adding 469 milliseconds of audio buffering, total audio buffering is now 512 milliseconds (source: Desktop Audio)

You'll get better results running your main monitor @ 120HZ & the secondary @ 60HZ when using OBS. Also disable Game Bar & Game DVR.
 

rockbottom

Active Member
If your recording games, switch Game Mode on. I would also avoid using Display capture, use Window or Game capture.

For your encoding settings, P6 seems to be OK, P5 is recommended. I would also 0 B Frames & uncheck Lookahead & Visual Tuning. B Frames are the lowest quality frame type, they only save space & not much of it.
 

rockbottom

Active Member
The StreamDeck plugin version looks stale & I'm not sure if the device is starting to fail or if it was disconnected.

Last log it was working.
15:32:39.791: <StreamDeck> Plugin version 5.5.2.16
15:32:39.792: <StreamDeck> [Server] Listening on '127.0.0.1:28186'.

First log.
23:10:34.920: LoadLibrary failed for 'C:\ProgramData\obs-studio/plugins/StreamDeckPlugin/bin/64bit/StreamDeckPlugin.dll': A device attached to the system is not functioning.
23:10:34.920: (31)
23:10:34.920: Module 'C:\ProgramData\obs-studio/plugins/StreamDeckPlugin/bin/64bit/StreamDeckPlugin.dll' not loaded
 

MrGhost

Member
I most likely have your answer. You need to turn your multi pass setting to two pass full resolution. They don't even have this setting on the newest OBS AFAIK.

It is visible right there you have it set to quarter resolution, which throttles your encoder for some reason and gives audio and video freezes.
AFAIK it just set itself that way.
 

Harold

Active Member
change your nvenc preset from p6 down to p2

Because you're using CQP as your rate control, the encoder will be able to compensate automatically.
 

MrGhost

Member
I don't know everything about these dang settings, but I would not recommend to save to mkv. The mp4 setting may not be open source like webm or something, but at least when you get cut off, you will still have a video. The matruska video doesn't save any video when it is cut off from recording. I lost some videos that way and I don't want to lose any more.

I was experiencing the red square on the stream, when I know I have a quality connection to the internet. After I switched off that quarter setting on multi pass, I got the green square back again. It's not included in the other versions of OBS running on my other 2 computers. I looked for it because those are where my mic was, I was going back and forth trying to figure out where the frames were dropping, monitoring audio out of all 3 OBS's and also muting the 3rd and monitoring the audio off the life internet.

Every OBS monitor sounded good. Only the internet was freezing, and thus the red square.

You should try it. Worked for me. I got a solid green square for over 10 minutes after switching live.
 

Harold

Active Member
but I would not recommend to save to mkv. The mp4 setting may not be open source like webm or something, but at least when you get cut off, you will still have a video.
you have this 500% backwards

MP4 is the one that loses the entire recording when cut off, not MKV.
 

MrGhost

Member
But that other part I got right I think. Definitely quarter resolution is/was a bad idea. And in the OBS 30 it is not there anymore.

I can't really understand why anyone would use quarter resolution.

Yes I had it backwards. I was busy thinking about the body with no hands you described and how it would count to zero.
 

MrGhost

Member
I looked into this finally with my 2 OBS setup where I was experiencing still problems because of dropped frames. Turned out that that quarter setting is still available in version most recent 30.2.

I wasn't seeing it in both versions due to attempting to use the software 264 encoder on the 2nd version of OBS. It took some comparing to get it straight. Once I got the NVENC and turned off the quarter setting on the new version it went all right to the internet.
 

koala

Active Member
But that other part I got right I think. Definitely quarter resolution is/was a bad idea. And in the OBS 30 it is not there anymore.

I can't really understand why anyone would use quarter resolution.
You have this backwards as well. Quarter resolution multipass mode is an enhancement. OBS 30 definitely offers the quarter resolution multipass mode of nvenc as default. This is a newer nvenc encoder feature you shouldn't deactivate. This isn't about something like reducing encoded video resolution to a quarter. Instead, this is about speeding up the first encoder pass by analyzing just a quarter of the raw data. The first pass just collects statistical data, so the second pass that is doing the actual encode is able to compress better. By reducing the time required for analyzing data the second pass gets more time to encode, so user can choose a higher preset, so the encoded data is smaller, which is relevant for streaming, because this enhances quality.

You can trust Nvidia this multipass mode is actually improving quality, otherwise they wouldn't have put development effort into it and would not released it for the newer RTX cards.
 

MrGhost

Member
For me turning off the quarter, and going with full resolution solved the issue of throttling stream rates. I was experiencing mostly in the reds around less than 500 kbps then it would jump to 3000+ and go to green. I turned off the quarter setting and then it worked. Older computer streaming, a 2015 but it has an i7 and a 960. Not my best computer but it was the one with the problem occurring.

Why would it go to green level constant after turning off the quarter setting?
 

koala

Active Member
These are two different and unrelated things. A stream "going green" or "going red" is a network thing. It goes "red", if there is some network congestion or throughput throttling somewhere between your computer and the streaming provider's server, so data is stalling.

The multipass mode happens within the encoder, before data even leaves your GPU. That's way before data is put out onto the network. A broken data stream might perhaps lead to the issue you describe (in addition to just network congestion), but if quarter resolution multipass mode leads to data corruption, the forum would overflow with error reports, because that setting is the default, so about every OBS user with a recent Nvidia GPU who's using nvenc would have that issue.

So I would say what you experience is just coincidence.

The impact of the multipass mode has been benchmarked here: https://github.com/Xaymar/obs-StreamFX/wiki/Encoder-FFmpeg-NVENC#performance-measurements
 

MrGhost

Member
Allright. I will try it once more. Streaming with it off worked well enough. I had several problems setting up the 3 computer stream in the 2nd OBS version on each computer (for the different aspect videos). Main problems were like getting the stream across the network because network difficulties. Last hurdle was when I discovered that quarter thing. Only thing I can figure is if I changed it to the NVENC and then did the change off quarter. Only thing is I was pretty sure this was the only change I made at that time. Will check again later when I try another stream.
 
Top