FFmpeg Command Builder
Assemble exact ffmpeg commands with every flag annotated — no media is uploaded or processed.
Command inputs
1 inputCommand preview
one-linerFlag legend
-iInput file; repeat for multiple inputs.-c:vVideo codec (libx264, libx265, libvpx-vp9, copy…).-crfConstant Rate Factor: lower is higher quality; 18–28 is typical.-presetEncoder speed/efficiency trade-off: ultrafast … placebo.-pix_fmtPixel format; yuv420p maximises player compatibility.-c:aAudio codec (aac, libmp3lame, flac, copy…).-b:aAudio bitrate, e.g. 128k.
Examples
MOV → H.264 MP4
input.mov · libx264 · CRF 23 · medium · aac 128kffmpeg -i 'input.mov' -c:v libx264 -crf 23 -preset medium -pix_fmt yuv420p -c:a aac -b:a 128k output.mp4A general-purpose conversion with visually good quality and broad player compatibility.
Aspect-safe scale
width 1280, height -2-vf scale=1280:-2-2 computes an even height preserving the source aspect ratio, avoiding yuv420p codec errors.
Two-pass GIF
gif template, fps 15, width 800pass 1: palettegen → palette.png; pass 2: paletteuse with the generated paletteA generated palette produces sharper colours than converting to GIF in a single pass.
About this tool
The FFmpeg Command Builder turns a friendly form into an exact ffmpeg CLI command. Choose a task template — convert, compress, trim, scale, extract audio, GIF or screenshot — then edit inputs, codecs, bitrates and filters. The command is assembled in canonical order: global flags, inputs, filters, output options, output file.
Every flag has an annotation in the legend, so -crf 23 is explained as Constant Rate Factor (lower is higher quality), -preset as an encoder speed/efficiency trade-off, and -movflags +faststart as a web-playback optimisation. Hover-free and keyboard-friendly, the legend is a visible list rather than a tooltip-only detail.
Validation catches the classic mistakes: CRF together with bitrate, FLAC in an MP4 container, an odd scale height that breaks yuv420p, and an empty output name. GIF tasks emit the canonical two-pass palettegen/paletteuse pipeline. Nothing is uploaded or processed — the tool only emits command text you can run anywhere.
What this tool does not do
- Emits commands only; it does not execute ffmpeg or validate against the binary installed on your machine.
- Task templates cover common workflows, not the full ffmpeg filter graph language.
- Shell quoting is POSIX single-quote style by default; PowerShell users should adapt paths before running.
How to use this tool
Choose a template
Click Convert, Compress, Trim, Scale, Audio, GIF or Screenshot to seed a correct baseline command.
Edit the model
Set input and output files, codecs, CRF or bitrate, scale dimensions and trim times; the command updates live.
Read the legend
Each emitted flag is listed with its meaning, so you learn what the command does instead of copying blind.
Copy and run
Copy the one-liner or the multi-line version with shell continuations, then run it in your own terminal.
Use cases
Transcode pipelines
Get a correct baseline command for a server-side conversion job, then wire it into your worker.
Batch conversions
Build once with the right quality flags and reuse the command across files.
Learning ffmpeg
Read the annotated legend to understand what each opaque-looking flag actually does.
Canonical flag order
| Stage | Flags |
|---|---|
| Global | -y (only when overwrite is enabled) |
| Inputs | -ss seek before -i for fast seeking; repeated -i per file |
| Output timing | -ss / -to after inputs for accurate trimming |
| Streams | -map 0:v:0 / -map 0:a:0 when selected |
| Filters | -vf scale=W:H,fps=N |
| Video | -c:v, -crf or -b:v, -preset, -pix_fmt |
| Audio | -c:a, -b:a, -ac, -ar or -vn / -an |
| Output | -movflags +faststart for MP4, then the output filename |
Paths are POSIX single-quoted by default; filenames with quotes use the standard '\'' splice.
Common mistakes
Mistake:Setting CRF and a bitrate together.
Fix:They are different rate-control modes. The builder warns and emits CRF only; choose one deliberately.
Mistake:Using scale height -1 with yuv420p.
Fix:Odd dimensions fail with 4:2:0 chroma subsampling. Use -2 to get the nearest even height.
Mistake:Expecting the browser to run ffmpeg.
Fix:This tool assembles command text only — no media is read, processed or uploaded. Run the copied command in your own terminal.
Frequently asked questions
What does -crf mean and which value should I use?
-crf is Constant Rate Factor, ffmpeg's quality-first rate control: lower numbers mean higher quality and bigger files. 18 is roughly visually lossless, 23 is the libx264 default and a good starting point, and 28 is a small-file/low-quality choice. Do not combine -crf with -b:v — they are alternative rate-control modes, and the builder warns if both are set.
Why does the GIF template use two passes?
GIF supports a limited palette, so converting directly gives muddy colours and banding. The first pass runs palettegen over the sampled frames to build an optimal global palette; the second applies it with paletteuse and dithering. The builder emits both commands with matching fps/scale filters so the palette fits the final output.
What is the difference between input-side and output-side -ss?
Before -i, ffmpeg seeks in the input file to a keyframe near the timestamp, which is fast but can be less precise. After -i, it decodes from the start and discards frames until the timestamp, which is slower but frame-accurate. The builder lets you set both: Input seek goes before -i, Trim start/end go after inputs.
How do I keep quality when converting?
Use a modern codec (libx264 or libx265), a moderate CRF such as 18–23, a slow-enough preset like medium or slow, and -pix_fmt yuv420p for compatibility. Avoid double transcoding by keeping an intermediate if you can, and use -movflags +faststart for web MP4 so playback can begin before the whole file downloads.
Does this run ffmpeg in my browser?
No. The tool assembles command text from your form choices; no media is read, uploaded or processed. Copy the one-liner (or the multi-line version with shell continuations) and run it in your own terminal. Generating the command never touches your files, and no -y is added unless you explicitly enable overwrite.
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.