Command Reference
A quick-lookup cheat sheet. See the linked page for each section for full
explanations and examples.
| Command | Description |
ffmpeg -version | Print version and build config |
ffmpeg -codecs | List available encoders/decoders |
ffprobe file | Print container/codec/duration info |
ffprobe -show_streams -show_format file | Detailed stream metadata |
| Flag | Description |
-i <file> | Specify an input file |
-c copy | Copy all streams without re-encoding |
-c:v <codec> | Set video codec |
-c:a <codec> | Set audio codec |
-vn / -an | Drop video / audio stream from output |
-y / -n | Always / never overwrite output without asking |
| Flag | Description |
-ss <time> | Start time (before -i: fast/keyframe; after: exact) |
-t <dur> | Duration to keep |
-to <time> | Absolute end timestamp |
| Flag | Description |
-vf scale=W:H | Resize video (use -1 or -2 for auto dimension) |
-crf N | Constant-quality factor (lower = better; 18-28 typical) |
-b:v <rate> | Target video bitrate, e.g. 2M |
-preset <name> | Encoder speed/efficiency tradeoff |
-vf fps=N | Change/limit frame rate |
-frames:v N | Output only N video frames |
| Flag | Description |
-b:a <rate> | Target audio bitrate, e.g. 192k |
-ar <hz> | Set audio sample rate |
-ac <n> | Set number of audio channels |
-q:a N | Variable-quality audio (codec-specific scale) |
| Command / flag | Description |
-vf "fps=15,scale=480:-1" | Basic GIF-ready filter chain |
palettegen / paletteuse | Two-pass high-quality GIF palette |
-f concat -safe 0 -i list.txt | Join files listed in a text manifest |
Miscellaneous
| Flag | Description |
-hide_banner | Suppress the build/config banner |
-loglevel <level> | Control log verbosity (quiet, error, info, debug) |
-filter_complex "..." | Chain filters across multiple inputs/outputs |
-map 0:v:0 -map 1:a:0 | Manually pick which streams go to output |