Interval stutter / jitter / duplicated frames bug - workarounds

wiliextreme

New Member
I've lost a lot of time trying to find a solution for this weird bug so below I will dump everything I know including some workarounds for people who are also plagued with it.

What is interval stutter

What is causing it
  • no idea but it must be the craziest bug I've ever encountered, it is like some kind of curse that follows you no matter what you do
  • things I tried that did NOT fix it:
    • changing any Windows Settings (game mode, HAGS, clean install, updating NVIDIA drivers)
    • changing OBS encoding settings (NVENC, x264, uncompressed, various settings etc.)
    • changing OBS source (display capture, window capture, video capture device, DXGI, Win10)
    • changing OS (tested Windows 10, 11 and even tried OBS from bootable Linux Ubuntu)
    • changing GPU (tested GTX970, RTX3070, RTX4080 Super and AMD R9 290)
  • things I didn't tried
    • using 144Hz monitor
    • changing CPU to Intel (although many people with intel had the same problem)
    • changing PSU and RAM
    • using old OBS versions
  • I found this bug also when recording using ffmpeg dshow so it is not OBS-only bug, i suspect that most of recording software uses certain internal functionality/library that is causing this issue on certain PC configurations. But that is just my guess.

How to check if your videos have interval stutter
there are a lot of other problems that may cause stutter in your videos (game lags, encodder overload) so to verify that your problems are related to interval stutter bug do the following

Method 1:
  1. Check your REFRESH_RATE at displayhz.com
  2. Calculate STUTTER_INTERVAL (in seconds) using formula STUTTER_INTERVAL = 1/(60-REFRESH_RATE)
  3. Run something that looks smooth and won't cause performance issues e.g. UFO Test or smooth youtube video
  4. Record video in OBS that is several times longer than your STUTTER_INTERVAL
  5. Play recorded video and wait until you see severe stutter (single missing frames do not count)
  6. Now wait for STUTTER_INTERVAL seconds and if stutter repeats then it means it is interval stutter bug
Method 2:
you can also do the opposite, you can verify if your video has no stutter
run ffmpeg command
Code:
ffmpeg -i "recording.mp4" -vf mpdecimate -loglevel debug -f null -
if there is no stutter then frames decoded and frames encoded (for video stream) should be equal or at least very close (<5 frame difference per second of recording). Below is an example of running this command for video with no stuttering (12489/12497 encoded).
Code:
Input file #0 (2024-08-31 18-15-01.mp4):
  Input stream #0:0 (video): 12497 packets read (754026767 bytes); 12497 frames decoded;
  Input stream #0:1 (audio): 9762 packets read (4194207 bytes); 9762 frames decoded (9996288 samples);
  Input stream #0:2 (audio): 1 packets read (6 bytes);
  Total: 22260 packets (758220980 bytes) demuxed
Output file #0 (pipe:):
  Output stream #0:0 (video): 12489 frames encoded; 12489 packets muxed (6694104 bytes);
  Output stream #0:1 (audio): 9762 frames encoded (9996288 samples); 9762 packets muxed (39985152 bytes);


How to fix it
I've not found any complete fix for that problem but there are certain workarounds
  • METHOD 1: By changing your monitor refresh rate (e.g. using CRU very close to 60Hz you can increase time without interval (at the cost of stutter being more severe when it eventually happens). This will give you enough time to record what you want before another stutter occurs. Note that even setting exactly 60.0000 won't get rid of stutter completely because in practice it will still not be exact 60hz (more like 60.0001). Apart from that the stutter will last very long and be pretty severe compared to short stutter at ~59.94.
  • METHOD 2: Alternatively you can achieve similar result by changing OBS recording framerate to match your monitor refresh rate as closely as possible as explained in this video by Genshin DPS Calc
  • METHOD 3: Use Elgato HD60. When used as video capture device there is no stutter. I suspect it is because this card has built in h264 encoder so OBS must handle it better than other capture cards. Unfortunately it supports only 1080p at 40Mb/s and causes problems if you use it with newer Elgato products like Camlink.
  • METHOD 4: Use Elgato 4K60 Pro MK2. You HAVE TO have open 4K Capture Utility and enable buffering in Video capture Device options in OBS. I also tested Camlink 4K and it worked too.

Now here are certain workarounds that I suspect will work but CAN'T CONFIRM it because didn't tested it
  • METHOD 5?: Use Elgato 4K60 S+. It also has built-in encoder like HD60 so i suspect it will also work fine but with 4K support. Note that it doesn't support 1440p and has bigger delay than other capture cards.
  • METHOD 6?: Use other Elgato capture cards that work with 4K Capture Utility. Keep 4K Capture Utility opened and enable buffering in Video Capture Device options. I guess if 4K60 Pro MK2 and Camlink worked fine then other devices should too.
  • METHOD 7?: Use HDMI to NDI encoder to stream by NDI, then use NDI source in OBS. I didn't tested it on proper HDMI to NDI encoder but tried streaming NDI from my laptop (where interval stutter bug is not present) to my PC and there was no stuttering on recordings so i suspect that NDI streams are handled by OBS correctly. Unfortunately the cost of HDMI to NDI encoders is very high e.g. Magewell Pro Convert HDMI 4K Plus costs $1000 so this workaround seems kinda pointless compared to other.


If you know some better solutions please let us all know O.O
 
Last edited:

wiliextreme

New Member
can't edit my post but made a mistake

if there is no stutter then frames decoded and frames encoded (for video stream) should be equal or at least very close (<5 frame difference per second of recording). Below is an example of running this command for video with no stuttering (12489/12497 encoded).
should be <5 frame difference per minute of recording
 

ciinTri

New Member
Welp, no luck for me and I'm losing my mind over this.

Having to buy a dedicated recording/streaming PC is out of my reach,
hopefully Windows 11 24H2 gets to fix it I guess..

But seriously though, how does this have no actual fix.
This problem has been persisting for as long as I can remember.
 

wiliextreme

New Member
Some new observations:
  • High refresh does not fix the problem
    • tested on 144Hz monitor set to 120Hz and also had interval stutter every ~6 seconds
  • Capture card + buffering enabled seems to be the easiest workaround
    • Tested Avermedia Live Gamer Ultra 2.1 with buffering enabled on 30m long recording and had only 96 dropped frames in total (which is ~3 frames / minute = not noticable on recording).
    • I repeated this test with buffering disabled and had 1512 duplicated frames (~50/minute), all of them were occuring in regular intervals and were highly condensed resulting in visible stutter
    • so bufferings seems to fix the issue. Nor sure if enabling it has any negative effects except a little added recording latency
    • for nerds who want to dig deeper, here are files created by analyzing those recordings with command
      Code:
      ffmpeg -i in.mp4 -vf mpdecimate -loglevel debug -f null - 2>&1 | findstr "Parsed_mpdecimate" > out.txt
      This command is the fastest way to check if your recording has stutters or not. Every time you see line ending with "drop_count:1" it is duplicated frame. Videos with interval stutter have sections where you can find a lot of those duplicated frames while in smooth videos you can only find singular duplicated frames that are not noticable on recordings.
  • I was wrong about Camlink 4K, it doesn't seem to have interval stutter even with buffering off. I must've beed mistaken by OBS preview showing stutter while there was none on the recording. Not sure why this device is not affected.
  • Xsplit has the same stutter as OBS when using Display Capture but it doesn't have stutter when using capture cards. I suspect Xsplit has buffering enabled internally even though no such option is visible in UI.
  • Action does not have interval stutter, taking into account this app is not based on OBS it would directly suggest that OBS is in fact responsible for this bug (or maybe ffmpeg which OBS uses internally).
Welp, no luck for me and I'm losing my mind over this.
Having to buy a dedicated recording/streaming PC is out of my reach,
You don't have to buy separate PC. Capture card + buffering enabled should be sufficient (you can use capture card on the same PC). So far I tested Elgato 4K60 MK2 and Avermedia Live Gamer Ultra 2.1 and they both work fine with buffering enabled. Those cards are pretty expensive but there are many cheaper options. Can't guarantee this workaround works on every capture card but it's very likely.

But seriously though, how does this have no actual fix.
This problem has been persisting for as long as I can remember.
Yeah, it's kinda ridiculous. I have honestly hard time believing it's some ultra rare hard to fix issue like it's often described on various github tickets. I bet it's very common problem but most people who have it assume it's performance related or they just don't care about some dropped frames.
 
Last edited:
Thanks a lot for this thread! I'm also discussing this matter here. I've independently arrived at similar solutions and conclusions as you. Unfortunately for me we did this simultaneously, so I didn't have your post to rely on and help me.

I also believe that this problem pretty much affects "everyone" but people don't admit or notice it. (People using capture cards with buffering on may not experience it to begin with. People using very high refresh rates may also have a hard time noticing it).

What is most disappointing to me is the way the OBS developers have reacted to the widespread reports of this problem on reddit and such places. Quality problems have always plagued the video production industry I get it, but still...

While the phenomena formally arises from the slight mismatch of the frame rate as we've all discovered, I think the "problem" is due to OBS and other recording software that uses similar code. There shouldn't have been terrible bursts of interval stutter: there should have been exactly 1 dropped frame every interval, which is not perfect either but far more acceptable.

I'm currently wondering if the chosen mismatched frame rate is due to the PC, the monitor/TV, or a combination of both? I've also noticed that the exact frame rate can vary by the day (it usually will not vary much within the same day for me, if at all). According to people who talk about a similar issue to this at Blur Busters forum, I suspect the exact chosen refresh rate may be more determined by the PC.

Another observation: the interval stutter you get in OBS when using a Capture Card device with Buffering off, occurs in a different interval than the normal monitor-based interval stutter. This "different interval" is also a constant value for me, even when I record at different frame rates (59.94 Hz console game source, as opposed to 60.00 Hz PC game source).
 

Graslu00

New Member
I've tried everything and I still can't fix or mitigate it. All about refresh rates, Windows / NVIDIA settings, OBS settings, drivers, different capture cards, different sources... It still stutters no matter what I do, I simply don't understand.

I went from a Avermedia GC573 to a Elgato 4K Pro, same results on both. I use a dual PC setup, I tried enabling buffering and noticed no change. Ran the ffmpeg command you shared and I still notice a lot of drops.

I just don't know what to do any more. Been happening for years and I feel like I exhausted all options. Is there really no fix for this?
 

Tomasz Góral

Active Member
I see two problems:
- first source, if you records monitor, remember about source, graphics card send buffer every time monitor need.
- second 'ripple current', when recovering audio from a flight recorder, the actual current ripple is recorded so that the recording can be played back in the same manner later.

Man eye is imprefectly.

Every time you want to capture a frame you have to do this task in a specific time, for easier calculation, let's assume 50hz, which means that the image has to change 50 times per second, i.e. every 20ms. Capturing an image depends on clocks, the program (game) creating the scene to be displayed must send ready data no later than every 20ms, and we have to copy this data every 20ms, what happens if we first create the image to be copied and once it appears after 5ms, and another time after 18ms (we are still below 20ms<), and another time the scene took 21ms to build, here we already exceed and then we have duplicate frames because if the frame building time has been exceeded, and we have downloaded a copy of the old one, then we have a duplicate.
 

Graslu00

New Member
I understand how duplicate frames are created and why, I just don't understand why there's no way to avoid it.

In theory, if my monitor is 60hz on my gaming PC, the capture card feed is set to 60hz, and my streaming PC is also set to 60hz, all should be in-sync, no? The game is also running at a locked framerate of 60FPS with zero drops, so the feed is constant. Why is it then that the stream or recording has some sections where it drops to 48FPS for no reason?

I've tested keeping my monitor at 165hz, capture card at 144hz, and playing games higher than 60FPS and the issue mostly disappears (only one or two frames dropped every X seconds). But the moment I try playing a game that's locked to 60FPS no matter what I do I'll see drops. It's driving me insane.
 

Graslu00

New Member
I may have found a fix for my case. With a dual PC setup, I'd just connect my main PC to the capture card on the streaming PC and duplicate or extend the display there, causing all the stutters no matter what I did.

I connected the HDMI Out (passthrough) to my 4K60 TV display and duplicated my main monitor there instead of doing everything on the capture card / main monitor and the stutters are gone. I kept my main monitor at 165Hz, secondary at 144Hz and capture card / TV at 60Hz. Now at worst I'll get some instances where it drops to 57-59FPS for a single second, instead of falling back to 30-48FPS for several seconds.

I don't know why this works but it does, at least for now.
 
Top