Interval stutter / jitter / duplicated frames bug - workarounds

TexelGuy

New Member
yep, i figured that actual refresh rate is temporary, and i also figured that nvidia shadowplay does this same procedure, since my recording's fps varied from 59.98 to 60.02 on a daily basis. so it's not likely an obs bug, but the windows itself (perhaps it's caused by the Time Stamp Counter (TSC) which is default for windows instead of HPET that was around for like 15 years). might also try to disable HPET in BIOS, but that takes so much testing and i just can't bother doing that.
The original poster of this thread @wiliextreme tested this on Linux as well and saw the same behavior, so I don't think Windows is to blame here.
 

ciinTri

Member
The original poster of this thread @wiliextreme tested this on Linux as well and saw the same behavior, so I don't think Windows is to blame here.
I think he was implying that he tested it on a "Bootable USB Drive", so someone experiencing these stutters need to confirm this with actually installing Linux.
 

TexelGuy

New Member
I think he was implying that he tested it on a "Bootable USB Drive", so someone experiencing these stutters need to confirm this with actually installing Linux.
There's no difference between an Ubuntu partition on a USB drive vs on an internal drive. It's still Linux. You can't boot into Linux without installing it somewhere, and a USB drive can be used to do that as well.
 

TexelGuy

New Member
There's no difference between an Ubuntu partition on a USB drive vs on an internal drive. It's still Linux. You can't boot into Linux without installing it somewhere, and a USB drive can be used to do that as well.
Unless you're talking about the "live" Ubuntu that you can access before installing it, but I think it should be very obvious that you shouldn't use that to test OBS, because it will be lacking GPU drivers. I doubt that's what he was talking about.
 

ciinTri

Member
  • changing OS (tested Windows 10, 11 and even tried OBS from bootable Linux Ubuntu)

I think mentioning "bootable" would be a redundant thing to say if he did a Full Installation of Linux, either way this statement lacks clarity, and needs confirmation by users other than OP.
 

TexelGuy

New Member
I think mentioning "bootable" would be a redundant thing to say if he did a Full Installation of Linux, either way this statement lacks clarity, and needs confirmation by users other than OP.
Fair point, I assumed it was an installed copy on a USB drive because it seemed obvious you're not supposed to use the live session version for this kind of thing.

Unfortunately, wiliextreme seems to be inactive, we might not be able to get a reply from him. You're right that we need other people to test it on Linux. OBS is on macOS as well, so maybe someone who has a Mac can test it.
 

wiliextreme

New Member
@TexelGuy @ciinTri
To clarify, when testing on Linux, I only booted live Ubuntu from pendrive. I didn't bother with full HDD install because I only wanted to quickly check if it is windows-only bug or not. The stutter at regular intervals was still present so I assumed it is a bug inside OBS or some library used by it. I suspect Linux installed on HDD would give the same result, but didn't try it by myself.
 

rematb

New Member
Hey guys, i've been reading this post past few days and i have encountered an issue with my streaming + gaming PC with "frame pacing" at least thats what i think it is.

Long story short i have Elgato 4k Pro capture card and i use OBS on my gaming PC to fullscreen project to capture card, when im not using OBS my game works really smooth, precise. As soon as i open OBS and cast a screen to capture card the game still has high fps, low frame times but its not as smooth as before, it feels "heavy" if you know what i mean.

Anyone else had similar issues in the past?
 

aftrshck

New Member
What software should i use in order to cap my monitor refresh rate at exactly 120 or 60 HZ (if it's even possible) ?
 

aftrshck

New Member
Windows. Check on the display settings.
This doesn't give you exact numbers, usually something like 119.96424 or 59.99432 etc.

I heard people are using some custom software in order to get exactly 120.000/60.000 or at least get really close it.
 

wiliextreme

New Member
@TexelGuy @ciinTri
Just realized I might have been wrong about Linux having this issue. I don't remember if I actually recorded any actual video while on Linux or maybe I just noticed interval stutter on OBS preview and assumed it would be also on recordings (which may not be true as proven by Elgato Camlink which stuttered only on preview).

So this bug may or may be not present on Linux, not sure, don't have time right now to check it again but wanted to clarify that if someone else would like to test it.
 

aftrshck

New Member
I did some testing on CachyOS (Arch Linux with both Wayland / X11 display protocols) and results i got weren't really good in my case (i7 8700 and RTX 2060 Super).

While i didn't notice any interval stutter at all (i even forced FPS/display refresh rate mismatch in OBS to get it), the recordings were really choppy (frame drops/encoding lag?) and overall game/OBS performance is just horrendous compared to Windows.

Linux uses completely different techniques for display/window capture + doesn't have game capture at all since you are running things through Proton. It looked to me like they are not very optimized for OBS or Nvidia/Intel hardware (had constant 75-80% GPU/CPU load while windows barely reached 45-50%).

Could be running flawless on AMD but i can't test that sadly.
 

aftrshck

New Member
RTSS should work just fine, but it won't solve the issue. i've tried.
Oh yea, i tried both RTSS and CRU now. Didn't help much :(

Also, found this amazing software recently while searching for OBS alternatives:
It doesn't have much options and just records your current screen size/refresh rate, but quality and performance is amazing + it doesn't have any stutter no matter how long you record with it.
 

Shvok

New Member
Sorry for the bump.

I believe I have found a solution, at least with the use of a capture card. I experienced this issue a while back and even made a post on it, then figured out that enabling 'Buffering' on the capture card fixed it.

I am currently using an AverMedia GC553G2 (HDMI 2.1), and running a monitor in native 1440p 240Hz using loop-through (no cloning because I don't like latency). I was recently messing around with CS2, and during my tuning, I disabled fullscreen optimizations on the game exe. As I was playing a DM, it hit me, what if the emulation that Windows does by default with FSO is the reason that the "Buffering" option in OBS has to be enable? So I went in to the capture card settings in OBS and changed buffering from 'Enabled' to 'Disabled'.

I set OBS recordings to "use stream encoder" so I can record exactly what my stream would see. I then did some recordings and testing with, CS2, QuakeLive, Quake Champions, DOOM Eternal, and Cyberpunk 2077 - All with the "Disable Fullscreen Optimizations" box checked on the respective exe's. After hours of testing the issue was gone! I have been recording and testing ever since and the 60FPS frame pacing issue seems to be fixed.

I'm on Windows 11 Pro 24H2 build 26100.6584 with Windows Feature Experience Pack 1000.26100.234.0

My capture card configuration in OBS is as follows:
- Resolution: 2560x1440
- FPS: 60 (because I am streaming at 60FPS)
- Video Format: Any
- Color Space: Default
-Color Range: Default
Buffering: Disabled

To disabled Fullscreen Optimizations you will need to do it on each of the games exe's: https://imgur.com/a/XPNRVyX - So with the box "checked" it will be disabled. By default it is enabled (the box is unchecked).

Without getting too into it. What FSO in W10/11 does is runs the game in fullscreen-window, but "emulates" Fullscreen Exclusive. This also changes the flip-model that is used. Disabling Fullscreen Optimization (the box is checked) makes the game run in Fullscreen Exclusive mode. Where the GPU is communicating directly with the game render, and not going through a WDM emulation layer. This also changes the flip-model back to the "legacy" FSE model. If this does indeed fix it consistently for others, suspect that it is that 'emulation' layer that Windows is doing is the reason for the frame pacing inconsistency. With FSO, Windows is attempting to lower latency. Instead it seems to be causing frame pacing issues.

I'm really curious to have others with this issue, specifically with a capture card, to test this as well! So far it's been clean for me. If that changes I will report back.
 

OmegaMalkior

New Member
Made an account just to comment, I am also affected by this stuttering, but for some reason Elgato Studio does NOT exhibit this stuttering for me. Anyone that has looked deeply into this issue can verify why this program is able to output a smooth preview video feed but not OBS? And to also check if it's fixed for them there apart from me.
 

n8lbv

Member
I have been suffering from this not working properly for years.
I am not using a separate capture card.
It really should just work be smooth and it never has.
I have read countless reddit posts and watched equally countless videos all of which have never been of any help.
Is this just expected NOT to work?
I have recently posted about this and have not seen any kind of useful help with it yet.
And then I find this post and see that people seem to be insisting that a dedicated capture card is a must.
Yet are still seeming to have all of the same/similar problems.
Everyone seems to just be living with this with no fix or solutions in sight.
After 5+ years of this not working and recording smoothly I am finally trying to do my research (again). and really getting nowhere.
Even without a dedicated capture card --- Shouldn't this just work? Even with just a single GPU provided there is plenty of overheard available for recording (and there is plenty of overheard available) in all of my test cases.
I am simply trying to get 60FPS video recorded without a mess of stutters every few minutes, and have never been successful yet.
 

TexelGuy

New Member
@n8lbv There is a solution, or rather a workaround, but it's very convoluted and also not permanent. If you want to try it, here's a guide based on what I've figured out since I last replied here (only works for Nvidia GPUs due to requiring nvidia-smi, though someone might figure out a similar method on AMD):

1. Use display capture in OBS. I haven't tested game or window capture, so I can't guarantee that this works with that. You're free to test this out with those capture methods.
2. Set your monitor to 60Hz, disable GSync/VRR and enable VSync in the games you'll record. This workaround only works when you are at 60Hz with VSync enabled. An external framerate limiter will not work. It's possible 120Hz with half-rate VSync works, but I haven't tested it.
3. Launch a game or a GPU benchmarking application that maxes out your GPU at 100% usage, keep it in windowed mode so you can alt-tab to other applications while it runs in the background. (For steps 2-3, it's okay to set your monitor to higher refresh rates or disable VSync if your GPU isn't maxed out at 60Hz)
4. Run it for 5-10 minutes, and then note the lowest clock speed your GPU reaches while it's still at 100% usage. Use MSI Afterburner or GPU-Z to view your GPU's clock speeds.
5. Run Windows Terminal or command prompt in administrator mode.
6. Enter the command nvidia-smi -lgc=yourclockspeed and replace "yourclockspeed" with the clock speed you noted earlier. This will lock your GPU's clock speed to a stable frequency, which is very important for this workaround. To undo this, run the command nvidia-smi -lgc=unlimited
7. Once GPU clock speed is locked, keep a game running in the background (to put some load onto the GPU) and then open displayhz.com and let it stay on screen for ~10 minutes. Note the refresh rate it ends up at. Make sure your monitor doesn't turn off while displayhz.com is open on screen, as that will give you incorrect results.
8. Copy and paste this python code into an online python compiler like the one from W3Schools and enter the refresh rate you noted earlier into the refresh_rate variable and run it.
9. Enter the numerator and denominator values you got into OBS by selecting "Fractional FPS Value" instead of "Common FPS Values" in Settings->Video.
10. Record your game.

Your recordings should now be smooth all the way through, but you need to have your GPU clock speed locked using that nvidia-smi command every time you want to record.

The main downside/annoyance of this workaround is that you might need to redo steps 7-9 after a few days, since your monitor's refresh rate might drift away from what you noted earlier, and cause stuttering again. I'd recommend doing your recordings as soon as you've completed steps 7-9.

Another issue you might run into is that video editing software (for me, it was DaVinci Resolve) might not work well with these fractional framerate recordings, and end up with interval stutter that you don't see when playing the video in other software. If you do run into this, you need to download and install MKVToolNix, then open Windows Terminal in the folder where your video is, and run the command mkvmerge.exe -o output.mkv --default-duration 0:60p input.mkv with "input.mkv" renamed to your recording's file name. This will create a copy of the video with "fixed" framerate metadata, and now it shouldn't stutter in editing software.

Sorry for the massive post, there's no way to do this workaround in a simpler manner. This problem really needs more eyes on it, we shouldn't be okay with such a common stuttering problem on such a widely used recording software. I've seen so many YouTube videos (from massive channels as well) with interval stuttering, which makes it obvious they're using OBS to record.
 
Top