Field notes · 2026-11-15
Set video black and white levels in ffmpeg
A dark clip has already been tuned in a graphical editor. How can the same input/output level or contrast values be applied in ffmpeg without guessing?
Answer
Answered by the Tracewind engineering team.
Use colorlevels when you know per-channel black and white points. Arguments such as rimin/gimin/bimin and rimax/gimax/bimax are normalized 0–1, matching “input shadow / input highlight” style controls in many editors. Keep audio with -c:a copy while you only touch the picture.
If the editor only exported global contrast, brightness and gamma, eq=contrast=…:brightness=…:gamma=… is the direct equivalent. For a drawn tone curve, curves with a master point list tracks the shape more faithfully than a single gamma value. Avoid histeq as a default on naturalistic video; it often crushes or posters shadows.
Always trial a short segment with -ss and -t and compare full-resolution frames or a waveform. Small level changes compound after a second encode, so finish filters in one pass when you can and use a high-quality mezzanine until the look is locked.
Where this question came from
The question is paraphrased from a public post on video (2026-11); the person who asked it has no link to us. Read the original thread