Question / Help Dropped Frames while Recording, None in game, not sure why

Unconquered

Member
Hey,

So I've looked around at some of the other posts about this through the years, but I was hoping someone could take a look at my logs and let me know what they think the culprit may be.

CPU: i7-6700k
GPU: GTX 1070 8GB
RAM: 16GB

Recording onto an HDD.

My OBS settings for recording are the following:
Format: MP4
Encoder: NVENC H.264
Rate Control: CBR
Bitrate: 38000
Preset: Default
Two Pass Encoding enabled
B-frames 2

Attached is my log from the last video I recorded. Granted, the dropped frames were not constant, and only appeared to happen for a total of maybe a minute total over a 34 minute video.

I use NVENC because x264 tends to lag not only my final video, but my computer as a whole, and when I lower it to a CBR that doesn't do that, the video quality just dies.

Thanks in advance!
 

Attachments

Logs show you lost a grand total of 14 frames, .01% of all frames attempted to encode. No rendering lag either, so that's it.

If you really want to try to get rid of any possible frame loss though....

  • Update to the latest version of OBS (22.0.2 as time of writing this)
  • Turn off Game Bar and Game DVR
  • Do NOT record to .mp4 (if anything goes wrong and recording is halted, the file will be corrupted and unrecoverable) -- use .mkv or .flv instead, and use the remux feature (under the File menu) to do the quick container conversion
  • Record to SSD instead (HDD might be bottlenecking output). Also, consider using CRF instead of CBR since that will give you better bitrate allocation for recording quality (this won't help in any way for lost encoding frames, this is just a side-note).
Something else you could try is using the beta version, which gives performance improvements specifically for NVENC encoding -- it allows the encoder to pull directly from VRAM instead of passing over the PCIe bus, which could reduce encoding lag.
 
@carlmmii

Awesome, thank you very much for the info. I'm completely lost trying to understand the logs so I really appreciate you taking a look for me. I'll look up how to turn off Game Bar and Game DVR. Just going to respond to your tips separately here...

1) I will definitely update, I got the prompt once and ignored it and it hasn't come back so it slipped my mind
2) The only reason I've been recording to MP4 is because I thought that was necessary to upload to YouTube, although now seeing .flv is also accepted, so I will give that a try.
3) Unfortunately can't afford an SSD right now, so will have to stick with my HDD. Is this a likely culprit?
4) Is the Beta Version a separate program, or will it update my current OBS to the Beta version?

I'm also wondering if you'd be willing to explain to me what 'rendering lag' means? I realize you say I didn't have any of it, just curious... and 14 frames, or .01% in a 34 minute video isn't terrible, so I guess I can't really complain if I can't get rid of them lol.

Thank you so much for your time and the information.
 
1) Funny you mention that. Had you upgraded to 21.0.2, you would have been stuck there anyway since that version's auto updater is broken.

2) I'm fairly certain youtube accepts both .mkv and .flv, but even if .mp4 is necessary for whatever your workflow is, it's still best practice to use either of those 2 formats first, and then remux into .mp4. The remux process doesn't do any sort of re-encoding, it's just a container swap, and very quick.

3) Totally understandable, and it's really kind of a shot in the dark as far as whether this would be a cause. Honestly, it shouldn't be since hard drive cache should be plenty large enough to handle this type of workload, but if you want to dig deeper into it, keep your task manager window open on the disk activity graph and see how it performs as you're recording.

4) It's a separate program I believe... but don't quote me on that. I haven't made the leap to it yet. If you do decide to try it out, I would highly recommend backing up all of your scene collections beforehand, and making a note of what settings you currently use.

As far as what rendering lag is, it's literally just a matter of how long it takes OBS to render the scene. In order to have 60fps capture, OBS needs to be able to composite the scene within 16ms, otherwise it will miss frame timing. All scene rendering takes place on the GPU, since it's much more efficient to take advantage of the hardware calls that are designed for this kind of stuff than relying on the CPU for it.

There's a lot of things that can cause rendering lag, and one of the biggest culprits is actually just plain old GPU loading -- letting a game use 100% of the GPU has a high likelihood of starving OBS of the necessary GPU resources it needs to do the scene building functions. Game Mode can also exacerbate this, as that actively makes windows prioritize games for GPU usage. Other things like browser sources or overloaded CPU can also cause rendering lag, but GPU loading is the biggest cause.

Of course, rendering lag is a completely different thing from encoding lag. The rendering takes place first, and then the composited scene is sent to the encoder (whether it's x264, or NVENC, QSV, AMF, etc). For the current official releases, this means the frame data is sent back over the PCIe bus to the CPU, and then sent out to wherever it needs to go. If it's x264 or QSV, then it just goes straight into encoding on the CPU. If it's GPU-based, then it goes back over the PCIe bus to the GPU encoding chip. The beta software is able to remove this back-and-forth if you're using NVENC, allowing for much less PCIe traffic and potentially removing the situation of an oversaturated PCIe bus.

I'm fairly certain that the encoding lag metric is a measure of time between when the rendering is finished and the final encoded data is received by the CPU, so this would take into account any PCIe latency as well... but I could be wrong here. I'm not a dev, so I'm just making my best guesses after looking through the various log files to decipher things.
 
Last edited:
Ok, Cool, well that's good to know. I will try it in .flv for my next one and switching over if it's necessary. The game I'm trying to record is the RE2 remake, was wondering if I should try lowering the settings to allow for a higher bitrate capture, if that was potentially the issue, but it doesn't sound like it is.

I have one last question for you, and that's what the NVENC equivalent of CRF is. I have CBR, VBR, CQP, and lossless as my options for rate control. I imagine lossless is amazing quality, but I don't think my cards going to handle it alongside RE2. I have played around with CQP before, and it did have some decent results... I have no idea what VBR is haha.

I may try the beta version if I don't have any luck with your other suggestions, and yeah, I'll make sure to copy down my settings and scenes so I'm not lost if it does overwrite.

Thanks for your help solving this headache - still trying to figure out why my videos lose massive amounts of quality once uploaded lol, but that's a whole other battle :P
 
Ah, whoops. CQP for NVENC, CRF is x264.

CBR - constant bitrate
VBR - variable bitrate. This is more for trying to target a general filesize, but lets the encoder have a little leeway if it encounters more simple/complex scenes. It's not really intended for realtime capture.
CQP - constant quantisation parameter. Basically, "constant quality". The lower the number this is set to, the higher the quality.
Lossless - fairly obvious. Except it's not lossless. YMMV. File sizes are huge.
 
Awesome, well you've given me lots to work with, I will try the CQP and see if that works out a bit better for me.

Thank you so much for your time and help :)
 
No problem. I would recommend starting at 20 for your CQP value and see how that compares with the 38000kbps you've been using. And as I said... changing to CQP should in no way improve the situation of encoding lag, it's just a better fit for better recording quality/file size in general.
 
Hey, so I tried almost everything suggested, and have had no luck. I guess I want to kind of add on to my problem by saying that I tried using a lower CBR, even going as low as 15000, and I was still getting those weird dropped frames. However, I looked at the logs for those recordings, and they don't report any dropped frames - there's not even a line in the text for it. In fact, some of my logs aren't even showing what encoding settings I'm using as far as I can see which I find somewhat concerning.

I'm probably going to try out the Beta tomorrow - I'm a little off put by the whole 'use at your own risk' message, as that to me implies it could potentially damage my hardware, although I may just be being incredibly paranoid.

I did try CQP as well, which, as you stated, would not affect encoding lag. I actually found the overall final result to be worse off in terms of dropped frames (albeit without any mention in the log), and, in addition, at CQP 15 the quality seemed far worse off, looking equivalent to a CBR of 20000. I don't know if that's normal and I'm just ignorant to what the range means, or if it could be helpful in diagnosing my issue.

I feel like bottlenecking of the HDD wouldn't occur to the same extent when using a lower CBR, but I'm also a total novice when it comes to these things, so please correct me if I'm wrong.

What I've done since OP:
Upgraded OBS to current version
Lowering game graphics
Lowering CBR
Turned off Game Bar (Couldn't find Game DVR anywhere, following guides on google)

I'm going to attach the logs in case I'm just an absolute moron and can't use the find function correctly.

Thanks in advance

Edit: Just wanted to also mention that I'm recording in 1080p @ 60fps, game fps locked to 60 as well.
 

Attachments

Last edited:
I've tried a couple more times to change things around... it's very strange - for the most part the recording runs smoothly at 60 fps, but every 8ish minutes I'm getting these giant frame drops, like it has to be way more than the 14 frames being reported in the original log, and these episodes last about 5 seconds.

This is really starting to drive my crazy, any suggestions would be appreciated, running out of things to try

Edit:
These are two parts of my most recently uploaded video, which is the one from the log posted in OP. I'm linking two timestamps in the video, watch them for about 10 seconds to see what I'm talking about. They are present in the original video file, and this is not due to uploading in any way.

https://youtu.be/OTs0CR7mkTY?t=471 (Starts at 7:54, watch to 8:01)
https://youtu.be/OTs0CR7mkTY?t=1013 (Starts at 16:53, watch to 17:01)

There are a couple other instances of this throughout the video, but these are the ones I noticed most jarringly. Reattached the log file for this here for ease of viewing.

Edit 2:
I seem to have reduced the amount of dropped frames by enabling V-Sync in my Nvidia control panel, but definitely still seems a tiny bit choppy at times. Going to keep tinkering, hopefully I can figure this out.
 

Attachments

Last edited:
I noticed i had this issue myself where i'd be recording destiny 2/antthem (VIP demo) and i'd get sudden FPS drops in the recording itself and not the game, getting the beta version fixed my issues, so if you still have these issues give the beta a try, you need to do is download the files and drag them into the OBS folder
 
So I got a chance to watch the youtube vids you posted. That looks a lot more noticeable than just 14 frames dropped that the logs report, so it's something that's invisible to OBS.

How are you limiting framerate to 60fps? Is it vsync, or by other means? Are you using any kind of variable framerate monitor (g-sync/freesync)?
 
I am aware this is an old thread but I am at my end. I have followed the suggestions of just about everyone I've found in my search and have had no success. I am attempting to record footage of Evil Genius 2 with OBS, edit it via DaVinci Resolve 17, and upload to YouTube. I have changed a multitude of settings that will not be reflected in this single log. I should also note that this isn't a mere few frames dropped so much as its huge chunks of game play and the subsequent audio that is not reflected in the log either. If it helps I can upload the sample clip I ran to generate this log with as well. In the some 40-45 secs of recording, the OBS file ended up being 18 secs.

I appreciate any and all help.
 

Attachments

Back
Top