Developer Tools
ffmpeg Command Builder
Build ffmpeg commands for convert, trim, resize, compress, GIF, watermark, concat, speed, and more. Each flag is explained, with warnings and copy buttons.
ffmpeg command builder
Common recipes
Click a preset to fill in a working starting point, then tweak.
Task
Re-encode to another format or codec.
The source file as it sits relative to your shell. Use a full path like ~/videos/clip.mov if it is not in the current directory.
Leave blank to use a sensible default derived from the input name and the task.
Codecs and quality
x264 default 23. Try 28 for smaller files, 18 for near visually lossless. x265 generally needs a few points higher than x264.
Slower presets produce smaller files at the same CRF but take longer to encode.
Command
ffmpeg -y -i input.mp4 -c:v libx264 -crf 23 -preset medium -c:a aac input-converted.mp4
Explanation
Each flag, in order, with what it does.
-yOverwrite the output file if it already exists. Use with care.-i input.mp4Input file. ffmpeg auto-detects the demuxer from the file header.-c:v libx264Encode video with the x264 H.264 encoder.-crf 23Constant Rate Factor: lower is higher quality. x264 sensible range is 18 to 28.-preset mediumEncoder speed vs compression. Slower trades CPU time for smaller files at the same CRF.-c:a aacEncode audio with the built-in AAC encoder.input-converted.mp4Output file.
Notes
- Filenames with spaces or special characters are single-quoted automatically so the shell does not re-interpret them before ffmpeg sees them.
- -c copy is the fastest path because no re-encode is performed; it works whenever the target container supports the source codecs.
- CRF is constant quality, not constant bitrate. Two files encoded at the same CRF can have very different sizes; that is expected.
- For accurate trim cuts, put -ss after -i. For fast trim, put -ss before -i and use -c copy.
- The command runs entirely on your machine. This page only generates the string; nothing you type leaves your browser.
How to use
- Pick a task from the grid at the top of the form, or click a recipe preset to load a working starting point you can tweak.
- Fill in the input file, the output file (or leave blank to use a sensible default name), and any task-specific options like timestamps, size, CRF, audio format, or watermark position.
- Watch the command, the explanation panel, and any warnings update as you type. Each flag in the command has a matching row that explains what it does.
- If the task is Concat, also save the generated concat.txt contents next to your files before running the command.
- Copy the command (or the concat.txt) and paste it into your terminal. Test destructive runs against a copy first, since -y overwrites the output without prompting.
About this tool
ffmpeg Command Builder turns a structured choice (the task) and a handful of options (codec, CRF, preset, size, timestamps, watermark, speed) into a paste-and-run ffmpeg command, with every flag explained underneath. Thirteen tasks cover what people actually run ffmpeg for: convert between containers and codecs (H.264, H.265, VP9, AV1, AAC, MP3, Opus, FLAC), trim a clip with either fast seek (-ss before -i for a stream-copied cut) or accurate seek (-ss after -i for any-frame cuts), resize while preserving aspect using the scale filter and the -2 even-number rounding most codecs require, compress with x264 or x265 CRF and a speed-vs-size preset, extract audio to MP3, AAC, WAV, FLAC, OGG, Opus, or M4A with the correct codec per format and an optional bitrate, strip the audio track, repackage into another container with -c copy (no re-encode), build a high-quality GIF using the palettegen and paletteuse two-stage filter chain that gets clean colors instead of the muddy default, capture a single frame at a timestamp as JPG, PNG, or WebP, concatenate several inputs through the concat demuxer (the tool also generates the matching concat.txt list file with proper Bash-safe quoting), overlay an image watermark using the overlay filter with corner and margin presets, change the output frame rate with -r, and change playback speed using a setpts video filter paired with an automatically chained atempo audio filter so the pitch is preserved across speed factors below 0.5 or above 2.0. Eight common-recipe presets fill in known-good starting points: MOV to MP4 (H.264 + AAC), trim from a timestamp for ten seconds, resize to 1280 wide, compress at CRF 28, extract audio to MP3 at 192 kbps, convert to a high quality GIF with the palette pipeline, screenshot a frame at 5 seconds, and slow to 0.5x speed. Warnings call out missing inputs, invalid timestamps, missing trim values, malformed CRF, sub-two concat lists, and other footguns. The page generates a string; nothing you type is uploaded, parsed, or executed anywhere except in your shell after you paste it.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
cURL Command Builder
Form-driven builder that emits curl, PowerShell, HTTPie, wget, fetch, and raw HTTP/1.1.
Open tool
DeveloperFind Command Builder
Build a find command from a form and copy a ready-to-run one-liner.
Open tool
DeveloperOpenSSL Command Builder
Form-driven openssl command builder for keys, CSRs, certificates, hashing, and more.
Open tool
CalculatorVideo Bitrate Calculator
Solve for video bitrate, file size, or streaming bitrate by platform and resolution.
Open tool
ImageVideo Frame Extractor
Capture any frame from a local video as a PNG, JPG, or WebP image.
Open tool
DeveloperAudio Trimmer
Pick a start and end on the waveform, then export the cut as a WAV file.
Open tool