FFmpeg Recipes
Ready-to-paste FFmpeg commands with parameter explanations and gotchas. Each recipe links to a visual tool if you prefer not to type.
Trim & cut
Convert
Convert MOV → MP4 · MOV → MP4
Convert MOV to MP4 with FFmpeg using H.264 video and AAC audio. CRF 23 default keeps quality visually identical.
Convert HEVC → H.264 · HEVC → H.264
Convert HEVC (H.265) video to H.264 with FFmpeg so it plays on Windows, in Chrome, and on older Macs.
Convert MKV → MP4 · MKV → MP4
Convert MKV to MP4 with FFmpeg using stream-copy. Remuxes the H.264 / AAC streams without re-encoding.
Convert MP4 → WebM · MP4 → WebM
Convert MP4 to WebM with FFmpeg using VP9 video and Opus audio. ~30% smaller for the web.
Convert MP4 → GIF · MP4 → GIF
Convert MP4 to GIF with FFmpeg using a custom palette for sharp colors at small file sizes.
Compress
Compress (H.264) · MP4
Compress an MP4 with FFmpeg using H.264 + CRF. Quality-first, content-aware compression with copy-paste command.
Compress (HEVC) · MP4
Compress an MP4 with FFmpeg using H.265 (HEVC). ~50% smaller at equivalent quality vs H.264.
Compress to target size · MP4
Compress an MP4 to a specific target file size with FFmpeg two-pass encoding. Useful for upload limits.
Audio
Extract audio · MP4
Pull the audio track out of an MP4 with FFmpeg. Stream-copy is lossless and instant.
Extract audio as MP3 · Any video
Extract audio as MP3 from any video format with FFmpeg. 192 kbps default for transparent quality.
Remove silence · Audio / video
Auto-cut silent gaps from a recording with FFmpeg silenceremove filter. Kills dead air in podcasts and meetings.
Normalize loudness · Audio / video
Normalize audio loudness to broadcast standards with FFmpeg loudnorm filter. -16 LUFS for podcasts, -23 for TV.
Resize / rotate / speed
Resize to 1080p · Any video
Resize any video to 1080p (1920×1080) with FFmpeg scale filter. Preserves aspect ratio with -1 trick.
Crop to 9:16 · Any video
Crop a 16:9 video to 9:16 vertical with FFmpeg crop filter. Centered crop for TikTok, Reels, Shorts.
Change frame rate · Any video
Change the frame rate of any video with FFmpeg fps filter. Simple drop / duplicate for safe FPS conversion.
Speed up 2x · Any video
Speed up a video 2× (or any factor) with FFmpeg. Uses setpts for video and atempo for audio without pitch shift.
Reverse a video · Any video
Reverse video and audio with FFmpeg using reverse + areverse filters. Useful for boomerangs and easter eggs.
Loop 3× · Any video
Loop a video N times with FFmpeg using -stream_loop. Faster than concat for simple repeats.
Rotate 90° · Any video
Rotate a video 90 degrees with FFmpeg. Lossless option uses container metadata; re-encode option bakes in pixels.