OBS stuttering in 4K

Augur89

New Member
I'm currently experiencing some stuttering issues when recording in 4K with obs. (currently trying Assassin's Creed Origins in 4K with max details)
i was recording since a while with the easy output mode (Hardware Encoder nvenc, high quality, mkv, 30 fps) and the overall quality was very good.
Video was in most parts fluently, but in some rare situations, the video was stuttering for a moment and then was fluent again. no idea why.
CPU: AMD Ryzen 7 5800X 8x 4.7GHz , GPU: Nvidia GeForce RTX3080 Ti 12GB, MSI SUPRIM X 12G LHR , recording on Samsung 970 EVO Plus
CPU and GPU never were on the limit, temperature about 60-68 °C, recording on SSD with enough free space.

Then i tried the advanced recording mode with CQP and all possible settings, but the video wasn't perfectly fluent (not like in the easy mode). video was slightly stuttering quite often with all settings.
My question is, where is the stuttering coming from and why is it fluent in easy mode besides the rare but bigger stuttering for a moment?

I recognized, that the keyframe interval can only be changed between 0 and 10. may that be the reason? is that higher in easy mode?
does anyone know the exact settings, that easy mode uses and how i can get rid of the stuttering?

Thanks for your help.
 

cyclemat

Active Member
 

Augur89

New Member
i found the log files and attached the one, where i tried several advanced settings. all settings lead to stuttering in the video (the game always was fluently)

what do i have to do to get a smooth record without stuttering in 4K?

Thank you for your help
 

Attachments

  • 2022-03-06 16-36-26.txt
    71.3 KB · Views: 93

rockbottom

Active Member
I didn't look at your entire log but when I encode 4k with my 3090, I use the High Performance Preset. Recordings are buttery smooth.....
 

koala

Active Member
None of your recording attempts exhibit lagged/lost frames according to your log. They should all be smooth and fine. Monitor fps is 60, video fps is 30; 60 is a multiple of 30, so all is fine.
May be the stutter isn't in the video but results from playback with your media player. Don't use the Windows internal playback, try an external media player like VLC or Media Player Classic. Media Player Classic has the functionality to "single step" frame by frame, so you can identify duplicated frames very easily, in case there is real stutter in the video file.
 

Augur89

New Member
None of your recording attempts exhibit lagged/lost frames according to your log. They should all be smooth and fine. Monitor fps is 60, video fps is 30; 60 is a multiple of 30, so all is fine.
May be the stutter isn't in the video but results from playback with your media player. Don't use the Windows internal playback, try an external media player like VLC or Media Player Classic. Media Player Classic has the functionality to "single step" frame by frame, so you can identify duplicated frames very easily, in case there is real stutter in the video file.
Thanks for your reply.
i tested with vlc and mpc hc. stuttering with both players. i can test this evening, where the duplicated frames are or where missing frames are, but the main reason is, why does this happen?
 

koala

Active Member
i tested with vlc and mpc hc. stuttering with both players. i can test this evening, where the duplicated frames are or where missing frames are, but the main reason is, why does this happen?
The first question is what is happening, only then you can try to answer why is this happening. Missing frames and duplicated frames are the same: if one original frame is missing, you will see it as duplicate of the previous frame in the video file. Single step through the video and try to find 2 consecutive identical frames during a moving scene. If you find a pair, look at the mouse pointer: sometimes, the actual frames are identical, but the mouse has moved, so for OBS there were 2 different frames (so no OBS issue), but there were 2 identical frames read from the frame buffer, so the game you captured wasn't able to render at 60 fps (or in your case: 30 fps) at that moment.
 

Augur89

New Member
The first question is what is happening, only then you can try to answer why is this happening. Missing frames and duplicated frames are the same: if one original frame is missing, you will see it as duplicate of the previous frame in the video file. Single step through the video and try to find 2 consecutive identical frames during a moving scene. If you find a pair, look at the mouse pointer: sometimes, the actual frames are identical, but the mouse has moved, so for OBS there were 2 different frames (so no OBS issue), but there were 2 identical frames read from the frame buffer, so the game you captured wasn't able to render at 60 fps (or in your case: 30 fps) at that moment.
here's an example at 0:24 to 0:28 (→ https://youtu.be/649hlDNItyk?list=PLah0JzbIlDe9oPs12xK8egrfO84XwhbrT&t=24)
i would say there are a lot of duplicate frames :) Ingame it felt perfectly smooth.
what would you suggest?
 
Last edited:

koala

Active Member
Yes, there are duplicated frames. During a 180° turn to see an area that was probably just flushed from the GPU to make space for what's new in front of the character. Everything else seems smooth. Observing this during such a turn is common for many game engines that do demand loading of textures. The area behind the character has to be (re)loaded very fast during this turn, and there is much to load, because the horizon is far away. This is often too much for the computer. However, this would be perceivable ingame as well, of course. Look more closely, and try to reproduce the situation: it might be possible you just didn't see it in the first place, only later after you looked at the video.

It's also possible there is a bottleneck in hard drive access. Is the game loaded from a spinning disk or from SSD? And the recorded video? Saved to a spinning disk or SSD? A 4k video should be recorded to SSD, and the game should be installed on a SSD as well.

By the way, her name is "Nofretete", not "Norfretete".
 

Augur89

New Member
By the way, her name is "Nofretete", not "Norfretete".
Thank you very much. i never watched her name carefully it seems :)

"The area behind the character has to be (re)loaded very fast during this turn, and there is much to load, because the horizon is far away. This is often too much for the computer."
Yea, this is exactly what i thought as well, but i never noticed any stuttering ingame besides very little framedrops. 99 % of fps is always around 52-57 fps and things like the part i showed you look more like 15-20 fps.
I'm recording to a ssd and tried another ssd as well for testing purposes. always the same issue. sometimes it takes some minutes, sometimes it's stuttering directly in the video, but this issue always appears. but as i said, only in the recorded video, not ingame.
 

Augur89

New Member
i just recorded with the Elgato 4K60s+ and encountered exactly the same problem.
I'm completely confused. how can this capture card record something, that is not visable ingame? (at least not for me)
 

koala

Active Member
Your monitor supports Freesync. Did you activate Freesync with your graphics card? With a variable frame rate from Freesync/Gsync occasional low frame rates don't stutter that much as in a recorded video. With variable frame rate support by the monitor, frames are shown in the correct moment in time. The overall smoothness of a game is improved, especially if the game engine isn't able to render as fast as the requested frame rate.
However, in a video with fixed frame rate, recorded from a variable frame rate rendering, the frames are displayed by that fixed fps scheme, so frames might show too early or too late, and this increases the perceived stutter.

Disable Freesync and record a video. You will probably see more stutter ingame as before, and the same stutter (but probably less stutter as with Freesync activated) in the video.
 

Augur89

New Member
Disable Freesync and record a video. You will probably see more stutter ingame as before, and the same stutter (but probably less stutter as with Freesync activated) in the video.
really good idea, that would explain it very well in my eyes. unfortunately i wasn't able to find a way to disable freesync (in monitor menu, the point is greyed and in nvidio menu, i only found vertical sync. disabling that just lead to the typical effects ingame.

i tested reducing resolution scale from 100 % to 90 % and some details to see, what happens in the record.
→ gpu was pretty bored when playing (power consumption reduced by 80 Watts roughly and GPU temperature was around 50 °C), but the record still had stuttering
 
Top