FFmpeg Cookbook
FFmpeg: Audio Out of Sync After Converting — Causes and Fixes
Audio and video drifted out of sync only after converting with FFmpeg? Learn why stream copy carries over bad timestamps, why a VFR source breaks sync, and fix it by re-encoding, rebuilding timestamps with +genpts, normalizing with aresample, or forcing constant frame rate.
FFmpeg: Fix Audio Drift That Gets Worse Over Time
Audio fine at the start but progressively out of sync by the end? That is drift, not a constant offset. Learn why a clock mismatch or VFR source causes it, why -itsoffset can't fix drift, and correct it with aresample async, then standardize with a fixed sample rate or CFR.
FFmpeg: Convert Variable Frame Rate (VFR) to Constant (CFR)
Convert a variable frame rate (VFR) video to constant frame rate (CFR) with FFmpeg. Use ffprobe to suspect VFR by comparing r_frame_rate and avg_frame_rate, then force CFR with -fps_mode cfr — the FFmpeg 8.x replacement for the deprecated -vsync cfr. Fixes the root cause of many sync issues.
FFmpeg invalid PTS/DTS & non monotonically increasing dts — Causes and Fixes
Fix the FFmpeg 'non monotonically increasing dts to muxer' error and invalid PTS/DTS problems: timestamp regeneration with genpts, negative-TS correction, VFR to CFR conversion, and setpts/asetpts resets — plus when re-encoding is required.
FFmpeg Frame Rate — -r vs fps Filter Guide
Change video frame rates with FFmpeg: fps filter vs -r option comparison and when each is correct, checking fps with ffprobe, 60→30→24fps conversion examples, timelapse creation, VFR handling, five error fixes, and five FAQ answers.