50 commands, organized by task
FFmpeg's documentation is 400+ pages. Most of it covers edge cases you'll never hit. This cheat sheet pulls out the 50 commands that handle the vast majority of real-world video processing.
New to FFmpeg and not sure where to start? The FFmpeg command line tutorial covers installation, syntax basics, and your first commands before you need a cheat sheet.
Each command includes the FFmpeg syntax and what it does. At the bottom, there's a section showing how to run any of these through the RenderIO API. If you want to understand what each flag does before copy-pasting, the FFmpeg options reference explains every option with syntax and examples.
Format conversion
1. MOV to MP4 (H.264)
Re-encodes video to H.264 and audio to AAC. CRF 22 is visually lossless for most content. For a deeper explanation of CRF values, presets, and when to transcode vs remux, see the video transcoding guide.
2. MP4 to WebM (VP9)
VP9/Opus for web delivery. -b:v 0 enables constant quality mode.
3. MKV to MP4 (copy streams)
Re-muxes without re-encoding. Instant. Only works if codecs are MP4-compatible.
4. AVI to MP4
5. MP4 to HLS
Creates 10-second segments for HTTP Live Streaming.
6. MP4 to GIF
15fps, 480px wide. Lanczos filter gives the best quality for downscaling. For palette optimization and smaller output files, see the full MP4 to GIF conversion guide. Going the other direction? The GIF to MP4 guide covers the yuv420p and even-dimension flags you need for browser-compatible output.
Resizing and scaling
For a deeper walkthrough of each resize method โ including scaling algorithms, crop-then-scale combos, and social media presets โ see the FFmpeg scale video guide. The FFmpeg resize guide also covers the force_original_aspect_ratio flag and the scale+pad letterbox pattern in depth.
7. Scale to 720p (keep aspect ratio)
-2 calculates width automatically, ensuring it's divisible by 2.
8. Scale to 1080p
9. Scale to exact dimensions (with padding)
Fits video within 1920x1080 and adds black bars.
10. Scale to 50% of original
11. TikTok format (1080x1920)
12. Instagram square (1080x1080)
Trimming and cutting
For a deep dive on keyframe-accurate cutting, input vs output seeking, and batch trimming, see the complete video trimming guide.
13. First 30 seconds
-c copy avoids re-encoding. Fast but not frame-accurate.
14. From 1:00 to 2:00
15. Last 60 seconds
-sseof seeks from the end of the file.
16. Frame-accurate trim (re-encode)
17. Remove first 10 seconds
Audio operations
18. Extract audio as MP3
-q:a 2 is high quality (~190kbps VBR).
19. Extract audio as WAV
20. Remove audio
-an drops all audio streams. Add -c:v copy to stream-copy the video without re-encoding, which makes it near-instant. For removing specific audio streams, replacing audio, or mixing tracks, see the FFmpeg remove audio guide.
21. Replace audio track
22. Adjust volume (double it)
23. Normalize audio
EBU R128 loudness normalization. Standard for broadcast.
24. Change audio pitch (shift up)
Speed changes
For a full breakdown of setpts math, atempo chaining, time-lapse, and slow motion from high-frame-rate footage, see the FFmpeg speed up video guide.
25. Speed up 2x
26. Slow down 0.5x
27. Speed up 4x (audio requires chain)
atempo only supports 0.5-2.0. Chain two filters for 4x.
Overlays and watermarks
28. Image watermark (bottom-right)
29. Image watermark (top-left)
30. Semi-transparent watermark
31. Text overlay
For responsive scaling with scale2ref, opacity control, animated watermarks, and batch processing, see the complete FFmpeg watermark guide.
Compression
32. Light compression (CRF 23)
33. Heavy compression (CRF 28)
34. Target file size (50MB for 10min video)
Two-pass encoding. Calculate bitrate: (target_size_bits) / duration = bitrate. For a full breakdown of CRF tuning, H.265/AV1 compression, and social media platform targets, see the video compression guide. If encoding is too slow on CPU, the CUDA and NVENC GPU acceleration guide shows how to offload encoding to your NVIDIA GPU for 5-15x speedup.
Rotation and flipping
35. Rotate 90 degrees clockwise
36. Rotate 90 degrees counter-clockwise
37. Rotate 180 degrees
38. Flip horizontally (mirror)
39. Flip vertically
Thumbnails and frames
For keyframe-only extraction, scene detection, batch processing, and format comparisons (JPEG vs PNG vs WebP), see the complete frame extraction guide.
40. Single frame at timestamp
41. One frame every 10 seconds
42. First frame
Metadata
43. Strip all metadata
44. View metadata (ffprobe)
For extracting specific fields, filtering by stream type, and using ffprobe in automation scripts, the complete ffprobe tutorial covers everything in detail.
45. Set metadata title
Filters and effects
46. Add noise
47. Crop (center 640x480)
48. Blur
49. Color adjustment (increase brightness)
50. Fade in/out (first and last 2 seconds)
Adjust st=58 to (video_duration - fade_duration).
Using any command with RenderIO
Every command above works with the RenderIO API. Replace file paths with {placeholder} names:
For more complete API examples, the curl examples post has 20 ready-to-paste commands. There are also full integration guides for Python and Node.js.
FAQ
What does CRF mean and what value should I use?
CRF (Constant Rate Factor) controls quality vs file size. Lower values = better quality, larger files. For H.264: CRF 18 is nearly lossless, 23 is the default, 28 is noticeably compressed. Most people should start at 22-23 and adjust.
When should I use -c copy vs re-encoding?
Use -c copy when you're just changing the container (MKV to MP4), trimming, or merging clips that share the same format. It's instant because it doesn't re-encode. When clips have different codecs or resolutions, you need the concat filter instead โ the FFmpeg concat guide covers all three methods with error fixes. Use re-encoding (-c:v libx264) when you need to change resolution, codec, quality, or apply filters. The transcoding guide goes deeper.
Why does FFmpeg require even dimensions for H.264?
H.264 encodes video in macroblocks of 16x16 pixels. Odd dimensions cause encoding errors. Using scale=-2:720 instead of scale=-1:720 ensures the width is divisible by 2.
What's the difference between VP9 and H.264?
VP9 produces smaller files at the same quality but encodes much slower. H.264 has wider device support. Use H.264 (libx264) as the default and VP9 (libvpx-vp9) when you need WebM for web playback. For a full comparison of all major codecs (H.264, H.265, AV1, VP9, ProRes) and which containers support them, see the FFmpeg formats guide.
How do I chain multiple filters?
Separate filters with commas in the -vf flag: -vf "scale=1080:-2,fps=30,eq=brightness=0.06". For complex operations involving multiple inputs (like watermarks), use -filter_complex instead.
For workflow-specific guides, check out the TikTok content automation pipeline with n8n or the dropshipping video automation guide for TikTok Shop sellers. The Starter plan at $9/mo includes 500 commands. Get your API key to start processing.