Skip to content
FramesField
FIX 23 · FFMPEG & DELIVERY
raw .md ↗ Verified Dec 1, 2026

Fix Stuttering VFR Screen Recordings in FFmpeg & NLEs

Direct Fix: Detect Variable Frame Rate captures definitively with ffmpeg -hide_banner -i capture.mov -vf vfrdet -an -f null -, then conform to locked Constant Frame Rate via -fps_mode cfr -r 30 (or -r 60 for high-motion UI scrolls) and aresample=48000:async=1:first_pts=0 before editing.
Exact Error / Visual Signature
vfrdet output: VFR:0.784120 (min: 16 max: 142) | ffprobe: r_frame_rate=60/1 vs avg_frame_rate=293400/10121 | Playback micro-stutters and voiceover drifts in DaVinci Resolve & Premiere
OBSERVED SYMPTOM

Screen recordings captured with macOS QuickTime, iPhone/iPad Screen Recording, Loom, Zoom, or OBS stutter unpredictably on smooth UI scrolls, drop frames at cut points, or drift out of sync with narration once imported into DaVinci Resolve, Premiere Pro, Remotion, or FFmpeg edit pipelines.

TECHNICAL ROOT CAUSE

Screen recorders conserve CPU and disk space by writing Variable Frame Rate (VFR) timestamps—dropping to 4–12 fps while the cursor sits idle and bursting to 59.94–120 fps during rapid scrolling—which breaks editors and stream-copy scripts that assume fixed Constant Frame Rate (CFR) frame intervals.

Copy-Paste Verified Fix

VFR Diagnostic Probe & Locked CFR Screen-Recording Conform Script conform-vfr-to-cfr.sh
#!/usr/bin/env bash
set -euo pipefail

# Usage: ./conform-vfr-to-cfr.sh raw_screen_capture.mov clean_cfr.mp4 [target_fps=30]
SRC="$1"
OUT="$2"
FPS="${3:-30}"
TIMESCALE=$((FPS * 1000))

echo "--- Step 1: Detecting Variable Frame Rate (VFR > 0.000000 means VFR) ---"
ffprobe -v error -select_streams v:0 \
  -show_entries stream=r_frame_rate,avg_frame_rate,time_base,width,height \
  -of default=nw=1 "$SRC"
ffmpeg -hide_banner -i "$SRC" -vf vfrdet -an -f null - 2>&1 | grep "vfrdet" || true

echo "--- Step 2: Conforming to locked ${FPS}fps CFR + even dimensions + BT.709 ---"
HAS_AUDIO="$(ffprobe -v error -select_streams a -show_entries stream=index -of csv=p=0 "$SRC" || true)"

if [ -n "$HAS_AUDIO" ]; then
  ffmpeg -y -v error -i "$SRC" \
    -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2,setsar=1" \
    -fps_mode cfr -r "$FPS" -video_track_timescale "$TIMESCALE" \
    -c:v libx264 -profile:v high -level 4.2 -crf 17 -pix_fmt yuv420p \
    -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv \
    -af "aresample=48000:async=1:first_pts=0,aformat=channel_layouts=stereo" \
    -c:a aac -b:a 192k -ar 48000 -movflags +faststart "$OUT"
else
  ffmpeg -y -v error -i "$SRC" \
    -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2,setsar=1" \
    -fps_mode cfr -r "$FPS" -video_track_timescale "$TIMESCALE" \
    -c:v libx264 -profile:v high -level 4.2 -crf 17 -pix_fmt yuv420p \
    -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv \
    -an -movflags +faststart "$OUT"
fi

echo "Locked ${FPS}fps CFR master written -> ${OUT}"

Before vs. After (Broken Pattern vs. Verified Fix)

Broken · Broken Command (-c copy Preserves VFR Timestamps & Breaks NLE Sync)
# Remuxing a QuickTime or iPhone screen capture copies VFR jitter straight into your edit:
ffmpeg -i quicktime_vfr_capture.mov -c copy ready_for_edit.mp4
# vfrdet still reports VFR:0.81 -> Stutter & progressive voiceover drift in Resolve/Premiere
Verified · Verified CFR Conform (-fps_mode cfr + Locked 30/60fps + 48 kHz Sync Clock)
ffmpeg -y -i quicktime_vfr_capture.mov \
  -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2,setsar=1" \
  -fps_mode cfr -r 60 -video_track_timescale 60000 \
  -c:v libx264 -profile:v high -level 4.2 -crf 17 -pix_fmt yuv420p \
  -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv \
  -af "aresample=48000:async=1:first_pts=0" -c:a aac -b:a 192k -ar 48000 \
  -movflags +faststart edit_ready_cfr60.mp4

Why this works: Using -fps_mode cfr duplicates or drops frames deterministically to hit exact 60/1 (or 30/1) intervals, while aresample=48000:async=1:first_pts=0 keeps audio locked to the newly regularized video clock.

Under the Hood

Why This Failure Happens in Real Pipelines

A Constant Frame Rate (CFR) video places every frame at an identical interval—for example, exactly 33.333 ms apart at 30 fps or 16.667 ms apart at 60 fps. By contrast, macOS Screen Recording, iOS ReplayKit, Loom, and browser WebRTC captures dynamically skip writing redundant frames whenever pixels stay still and emit dense clusters of frames only during scrolling or window animations. Because the container metadata header still advertises a nominal rate like 60/1, the clip looks normal in Finder until you drop it into a locked timeline.

Importing a VFR file straight into Premiere Pro, After Effects, DaVinci Resolve, or FFmpeg concat / xfade chains triggers subtle timeline corruption: audio streams run on an unwavering 48,000 Hz crystal clock while video frames arrive on rubbery VFR deltas. Over a 3-minute SaaS walkthrough, narration gradually slips 200–800 ms out of sync, keyframed zoom animations in Remotion jump backward by 1–2 frames, and FFmpeg -c copy trims land on wildly inaccurate timestamps.

Never rely solely on glancing at ffprobe’s r_frame_rate field, because many VFR captures display misleadingly close averages. Run FFmpeg’s built-in vfrdet filter (-vf vfrdet -an -f null -) to inspect every inter-frame timestamp delta directly: any VFR: score above 0.000000 proves variable spacing. Conforming the file once with modern -fps_mode cfr (replacing deprecated -vsync cfr in FFmpeg 5.1+), an explicit integer -r 30 or -r 60, and aresample=48000:async=1:first_pts=0 locks every frame and audio sample to an unbreakable constant clock.

Step-by-Step Resolution & Verification

  1. 01

    Diagnose VFR definitively with both ffprobe and the vfrdet filter

    Compare r_frame_rate against avg_frame_rate and inspect ffmpeg -vf vfrdet output. Any non-zero VFR score (such as VFR:0.65) confirms irregular frame intervals that will cause timeline drift.

  2. 02

    Choose target CFR (30 fps for narration/tutorials, 60 fps for fast UI scrolling)

    Pick 60 fps when preserving silky cursor and scroll animations captured on 60–120 Hz Retina displays, or 30 fps for lighter tutorial edits and standard 30 fps Remotion/social timelines.

  3. 03

    Conform with -fps_mode cfr and verify VFR:0.000000 before opening your NLE

    Run conform-vfr-to-cfr.sh (swapping -fps_mode cfr to -vsync cfr only on legacy FFmpeg 4.x builds), then confirm vfrdet prints VFR:0.000000 and r_frame_rate matches avg_frame_rate identically.

Verification Check · Confirm Zero VFR Jitter (VFR:0.000000) and Exact r_frame_rate == avg_frame_rate
ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate,avg_frame_rate,time_base,pix_fmt -of default=nw=1 clean_cfr.mp4 && ffmpeg -hide_banner -i clean_cfr.mp4 -vf vfrdet -an -f null - 2>&1 | grep vfrdet
Expected healthy output:
pix_fmt=yuv420p
r_frame_rate=30/1
avg_frame_rate=30/1
time_base=1/30000
[Parsed_vfrdet_0 @ 0x...] VFR:0.000000 (0/899)

How to Prevent This Error From Recurring

GUARDRAIL 01

Configure OBS to record CFR MKV/MOV at locked 30 or 60 fps upfront

In OBS Studio, enable Constant Frame Rate and record to .mkv or fragmented .mov (remuxing to .mp4 afterward) so you never generate VFR captures or lose recordings on crash.

GUARDRAIL 02

Batch-conform every iPhone, Loom, and QuickTime capture on ingest

Treat VFR-to-CFR conversion as step 0 of every editing folder—never wait until you are 45 minutes into cutting captions in Premiere or DaVinci Resolve to discover audio drift.

GUARDRAIL 03

Use -crf 16 or ProRes 422 LT for editing mezzanines before final web export

Encoding screen text at low CRF (16–17) or ProRes preserves crisp 1px UI typography through your NLE timeline so the final delivery pass does not stack double compression blur.

Troubleshooting FAQs

Should I use -fps_mode cfr or -vsync cfr in FFmpeg?
Use -fps_mode cfr on FFmpeg 5.1 through FFmpeg 9.x—it is the official replacement for -vsync, which was deprecated in FFmpeg 5.1 and removed in newer builds. Use -vsync cfr only if you are pinned to an older FFmpeg 4.x or 5.0 container.
Why does -r 30 alone sometimes fail to fix VFR without -fps_mode cfr?
Putting -r 30 before -i overrides input timestamps artificially (speeding up or slowing down the clip instead of duplicating/dropping frames). Always place -fps_mode cfr -r 30 AFTER -i so FFmpeg resamples frame cadence cleanly in real time.
Can I fix a VFR screen recording without re-encoding video?
No. Converting Variable Frame Rate to Constant Frame Rate physically requires duplicating frames during static holds and dropping bursts to lock constant frame intervals, which requires decoding and re-encoding the video stream.
Why did my 60 fps MacBook Pro ProMotion (120 Hz) screen capture look choppy at 30 fps?
Fast cursor motion and scrolling captured at variable rates up to 120 Hz drop uneven fractions of frames when forced down to 30 fps. Conform UI scroll demos to -fps_mode cfr -r 60 (or lock your macOS display refresh to 60 Hz before recording) for silky motion.
Why did vfrdet print two lines where the first line says VFR:nan (0/0)?
Some FFmpeg builds instantiate an internal probe pass or flush line before printing the full stream summary. Read the final vfrdet summary line showing total frames (for example VFR:0.000000 (0/899)) to verify zero variable frame deltas.
Use this page in AI tools or notes
raw .md