Writing Criteria
Every guide in this repo is written to the same standard. If you're adding or editing a guide — human or AI — hold it to these.
- Plain words, real ideas. Simple language, never dumbed-down concepts. Explain jargon on first use; collect terms in the glossary.
- No hype. No marketing adjectives, no "revolutionary," no promises about what something will do for the reader.
- Honest about limits. Say what the thing can't do. State uncertainty instead of smoothing it over. Validation notes include what remains unverified.
- No invented numbers. Benchmarks, defaults, and specs are either measured or qualified with "depends on your setup." If it wasn't tested, say so.
- Checkable. Commands are meant to be run, with "Check:" blocks showing what success looks like. Sources are linked, not asserted.
- Respect the reader's setup. Call out Windows/Mac/Linux differences. Don't assume a GPU, a budget, or prior experience.
- Safety isn't skipped. Real risks get stated plainly, not buried.
- Scoped. Each guide says what it covers and points elsewhere for the rest. No guide pretends to be the whole subject.
- Structure over prose. Tables, before/after examples, symptom → fix. Scannable beats essay.
Verification notes for this guide
Standards 3 and 4 applied to this guide,
specifically. ffmpeg and ffprobe 8.1.2
(the Ubuntu build, configuration line beginning
--prefix=/usr … --enable-gpl, with
libx264, libmp3lame, and libopus present per
the -encoders capture) were on the build
machine, and every quoted output is a capture
from them. Working transcripts are kept with
the build (ffmpeg-lab/transcripts/,
01–14, mirroring the chapters).
The lab. All fixtures are generated by
ffmpeg itself from lavfi test sources — no
recorded or downloaded media — by the script
shipped as examples/make-fixtures.sh:
tone.wav (sine 440 Hz, 6 s), voice.wav
(sine 196 Hz at volume 0.06, 8 s; its quietness
was then measured, not assumed: volumedetect
mean −45.5 dB / max −42.5 dB, astats peak
−42.49 dB agreeing), song.flac (three sine
sources mixed with amix, 6 s), clip.mp4
(testsrc2 320×180@24 + sine, libx264 with
-g 48 so keyframes fall every 2 s, AAC,
12 s), part1.mp4/part2.mp4 (identical
recipes, 3 s each), scene.mp4 (testsrc2
640×360@30, CRF 12, 6 s). The shipped
fixtures are the build machine's own outputs
of that script.
Verified by running, per chapter:
- Ch. 1:
ffmpeg -version(3 lines quoted, configuration elided with...),ffprobe -version, the-encodersgrep for the four encoders the guide uses, the-codecsgrep, and the fixturels -l(sizes quoted exactly: 473168 / 115187 / 32140 / 1247385 / 297302 / 529278 / 705678). - Ch. 2: the
probe()function defined verbatim as printed, then run onclip.mp4(h264 320×180 24/1 + aac, duration 12.000000, size 473168, bit_rate 315445);-show_formatonsong.flac;-select_streams v:0 -of csvansweringstream,320,180,24/1,24/1; the-of jsonduration answer fortone.wav. - Ch. 3: no commands of its own — its
claims are the grammar visible in every
other transcript: input/output narration
and
Stream mapping:lines (05), option position deciding behaviour (06, the-sspair). The overwrite question is described from ffmpeg's documented behaviour; the lab ran non-interactively with-ythroughout, so the prompt itself was not captured (see documented-only). - Ch. 4: the remux
clip.mp4→clip.mkvunder-c copy(473,168 → 469,280 bytes, same streams); the subtitle mux (subs.srtshipped;-map 0 -map 1 -c copy -c:s mov_text) probing as three streams (h264/aac/mov_text); the map-out (-map 0:v -map 0:a) probing as two. - Ch. 5: WAV→MP3 at
-b:a 192k(529,278 B / 705,704 bps PCM in; 145,493 B / 193,990 bps out; stream mapping names libmp3lame); FLAC→MP3 at-q:a 2(297,302 B in; 29,196 B / 38,928 bps out — the VBR result the chapter builds its lesson on, captured, not predicted);-ar 22050WAV at exactly half the bytes (264,678). - Ch. 6: four cuts of the same 5 s point,
all probed: output-seek
-ss 5 -to 9→ 4.000000 s; output-seek-ss 5 -t 4→ 4.000000 s and the same size (155,110 B); input-seek re-encode → 7.003991 s; input-seek-c copy→ 7.000000 s, 316,611 B vs the re-encode's 261,827 B. Start/end content verified against the test pattern's burned-in timer by extracting frames (the ch. 11 technique): first frames of the accurate, re-encode, and copy cuts all read 00:00:05.000 / frame 120; the copy cut at 6.9 s in reads 00:00:11.917 (frame 286); the accurate cut at 3.9 s reads 00:00:08.917 (frame 214). Frames kept with the lab (work/first-*.png,work/last-*.png). - Ch. 7: volumedetect before/after on
voice.wav(mean −45.5 / max −42.5 dB; aftervolume=12dB: −33.5 / −30.5, exactly +12 on both). loudnorm analysis JSON captured (input_i −46.55, input_tp −42.49, input_lra 0.00, input_thresh −56.55); the apply pass used those exact measured values with target I=−16, TP=−1.5, LRA=11, linear=true; the result re-measured by a second analysis at input_i −16.02 / input_tp −11.98, and by volumedetect at mean −15.0 / max −12.0 — the chapter explains the two instruments' disagreement rather than hiding it. - Ch. 8: the concat demuxer over
parts.txtwith-c copy: 3.000 + 3.000 in, duration 6.023220 and 146,018 B out; the 23 ms seam is the capture's own number, attributed to AAC frame padding in the text as the mechanism consistent with it. - Ch. 9:
clip.mp4→clip-audio.m4aunder-vn -c:a copy(aac, 12.000000 s, 106,973 B), and →clip-audio.mp3at-b:a 160k(12.004717 s, 241,519 B); the source audio's ~71 kb/s is the m4a conversion log's own final-line figure. - Ch. 10:
scale=160:90(probes 160×90, 239,444 B);fps=12(avg_frame_rate 12/1, 351,265 B);scale=480:-2(480×270, 689,518 B — larger than the 473,168 B source, quoted as the upscale lesson). - Ch. 11:
-ss 7 -frames:v 1thumbnail (PNG, 320×180, 23,981 B); anfps=13-frame strip (three PNGs, 21–23 KB each); the GIF pair — palettegen (894-byte palette) + paletteuse →clip.gif265,235 B / 3.000 s, vs the one-pass GIF at 170,940 B. The two-pass method lost on this fixture; the chapter says so, in so many words, and scopes its counter-claim ("usually wins on photographic footage") as unmeasured here. - Ch. 12: metadata written with three
-metadataflags under-c copyand read back via-show_format(title/artist/album as typed); stripped with-map_metadata -1and read back absent; the survivingTAG:encoderin both files is the basis for the chapter's "the muxer re-stamps its own tag" point. - Ch. 13: CRF 18 and CRF 28 encodes of
scene.mp4(863,725 B / 2.38 s elapsed, and 310,271 B / 1.88 s, timings by the shell'stime); SSIM against the source computed by ffmpeg'sssimfilter (All: 0.998109 and 0.986663); the preset pair at CRF 23 (fast584,952 B / 1.40 s,slow556,905 B / 2.20 s). All figures are this build machine's, on test-pattern footage, and the chapter says real footage reprices the dial. - Ch. 14: the batch loop over the lab's
three audio fixtures at
-b:a 160k(song 121,253 B, tone 121,253 B — equal because equal durations at CBR — voice 161,481 B); the worked job end to end (loudnorm with ch. 7's measured values → MP3 at 160k with a title tag read back); the finished MP3 re-measured at input_i −16.45 LUFS, vs the WAV's −16.02 — the encode's own shift, captured.
Capture hygiene (declared trims):
ffmpeg's per-conversion narration is long;
chapters quote the lines a claim rests on
(input summary, stream mapping, final size
line, probe reports) and elide the rest
with ...; full logs live in the
transcripts. Memory addresses in filter
log prefixes (@ 0x…) are shortened to
0x... where quoted. The repeated probe()
definition appears in transcripts exactly
as chapters print it. Dates and ls
columns beyond size are the capture runs'
own. One systematic difference, declared:
the lab harness ran from a work/
directory beside the fixtures, so
transcript commands carry ../fixtures/
path prefixes; chapters print the same
commands in the reader's layout (bare
filenames, run from inside examples/),
which is also how examples/commands.txt
collects them. No output line was altered
by that normalization — only the paths
typed, never the results printed.
Documented-only (not run), and why:
- The overwrite prompt itself. The lab
ran with
-y(non-interactive harness), so ffmpeg's "Overwrite? [y/N]" question was never captured; chapter 3 describes it from documented behaviour and tells the reader to meet it deliberately on a disposable file. - Real-world footage behaviour — phone video, camera files, actual music and speech. The fixtures are synthetic by design (deterministic, buildable anywhere); where a result depends on the material (VBR pricing, CRF pricing, GIF palette economics, fps savings), the chapter states the fixture result as a fixture result and the general behaviour as expectation, not measurement.
- Named, not taught: the concat filter
(mismatched-piece joining), ffplay,
streaming and device capture, hardware
acceleration, two-pass bitrate-target
encoding,
drawtextand the wider filter graph, HandBrake and other GUI front ends. Each is named where a reader would go looking for it, with its boundary stated. - Installation on a reader's machine is described, not performed — the build machine already had ffmpeg 8.1.2.
Specimen discipline, for the record: the lab contains no recorded media, no real voices or footage, and no personal data — every fixture is a generated tone or test pattern, and the only "metadata" written anywhere is the lab's own invented title, artist, and album. Nothing in the guide required the network.