What You Will Learn
- Commands for changing brightness, contrast, gamma, and saturation with the
eqfilter - The meaning and value range of each parameter
- Practical corrections that combine multiple parameters
- How to specify parameters that change dynamically over time
Tested with: FFmpeg 6.1 (verified against real FFmpeg)
Target OS: Windows / macOS / Linux
Basic Commands
Increase Brightness
ffmpeg -i input.mp4 -vf "eq=brightness=0.1" output.mp4
The range of brightness is -1.0 to 1.0, with a default of 0. Positive values brighten the image, negative values darken it. For the bigger picture of when to reach for eq, curves, or colorbalance, see the color correction overview.
Increase Contrast
ffmpeg -i input.mp4 -vf "eq=contrast=1.5" output.mp4
The range of contrast is -1000.0 to 1000.0, with a default of 1. A value of 1 leaves the image unchanged; larger values increase contrast.
Apply Gamma Correction
ffmpeg -i input.mp4 -vf "eq=gamma=1.5" output.mp4
The range of gamma is 0.1 to 10.0, with a default of 1. A value of 1 leaves the image unchanged; values of 1.5 or higher lift the shadows.
Adjust Saturation
ffmpeg -i input.mp4 -vf "eq=saturation=1.5" output.mp4
The range of saturation is 0.0 to 3.0, with a default of 1. A value of 0 produces grayscale, while 1.5 makes colors more vivid. To rotate the hue itself rather than just scale saturation, use the hue filter for hue and saturation.
Parameter Reference
| Parameter | Description | Default | Range |
|---|---|---|---|
contrast | Contrast | 1.0 | -1000 to 1000 |
brightness | Brightness offset | 0.0 | -1.0 to 1.0 |
saturation | Saturation multiplier | 1.0 | 0.0 to 3.0 |
gamma | Gamma correction | 1.0 | 0.1 to 10.0 |
gamma_r | Gamma for the red channel | 1.0 | 0.1 to 10.0 |
gamma_g | Gamma for the green channel | 1.0 | 0.1 to 10.0 |
gamma_b | Gamma for the blue channel | 1.0 | 0.1 to 10.0 |
gamma_weight | Highlight-protection weight | 1.0 | 0.0 to 1.0 |
Specifying Multiple Parameters at Once
ffmpeg -i input.mp4 -vf "eq=brightness=0.05:contrast=1.2:saturation=1.3:gamma=1.1" output.mp4
You can specify multiple parameters at once by separating them with a colon (:).
Adjusting White Balance with Per-Channel Gamma Correction
ffmpeg -i input.mp4 -vf "eq=gamma_r=0.9:gamma_g=1.0:gamma_b=1.1" output.mp4
By lowering the red channel slightly and raising the blue channel, you can shift the image toward a cooler tone.
Grayscale Conversion
ffmpeg -i input.mp4 -vf "eq=saturation=0" output.mp4
Setting saturation=0 converts the image to grayscale.
Dynamic Parameters (Changing Over Time)
The eq filter supports FFmpeg expressions.
ffmpeg -i input.mp4 -vf "eq=brightness='0.1*sin(t)'" output.mp4
Here t is the current timestamp in seconds. The result is an effect in which the brightness varies in a sine-wave pattern.
Practical Correction Examples
Brighten a Dark Video
ffmpeg -i input.mp4 -vf "eq=brightness=0.1:contrast=1.1:gamma=1.3" output.mp4
Make a Faded Video More Vivid
ffmpeg -i input.mp4 -vf "eq=saturation=1.4:contrast=1.15" output.mp4
Give the Video a Hard, Cinematic Look
ffmpeg -i input.mp4 -vf "eq=contrast=1.2:saturation=0.85:gamma=0.95" output.mp4
What Not to Do
Bad example: saturatoin (misspelled)
ffmpeg -i input.mp4 -vf "eq=saturatoin=1.5" output.mp4
Misspelling a parameter name results in an Invalid option error.
Differences from the hue Filter
| Feature | eq | hue |
|---|---|---|
| Brightness | ✓ (offset) | ✓ (offset) |
| Contrast | ✓ | ✗ |
| Gamma | ✓ | ✗ |
| Saturation | ✓ | ✓ |
| Hue rotation | ✗ | ✓ |
The eq filter is best for fine tonal adjustments, while hue is best for changing the hue.
Measured Example
This example adjusts brightness, contrast, saturation, and gamma on a 1080p/30fps, 2-minute H.264 video:
ffmpeg -i input.mp4 \
-vf "eq=brightness=0.04:contrast=1.15:saturation=1.2:gamma=1.05" \
-c:v libx264 -crf 23 -preset medium -c:a copy \
output.mp4
eq is lightweight, but because it changes video frames, -c:v copy cannot be used. On a typical 8-core desktop, processing is often around 1–2x real time.
At the same CRF, file size depends on the correction. Lifting shadows can reveal noise and increase size; reducing saturation or darkening the image can reduce it. In practice, combine small changes to gamma, contrast, and brightness rather than pushing one parameter too far. Results vary by environment.
Common Pitfalls
-
Symptom: an
Invalid optionerror. Cause: a misspelled parameter name such assaturatoin. Fix: check the spelling ofbrightness,contrast,saturation, andgamma. Copying the names straight from the parameter table above is the safest way. -
Symptom: brightening blows out the highlights. Cause:
brightnesswas raised too far and the highlights are pinned at 255. Fix: keepbrightnesssmall (0.03–0.05) and combine it withgamma=1.1andcontrast=1.05, which lifts the shadows without clipping the highlights. -
Symptom: the dynamic expression
brightness='0.1*sin(t)'is treated as a constant. Cause: the quotes were stripped so the expression is never evaluated. Fix: keep the expression in'...'and the whole filter in"...", preserving the nested quotes. -
Symptom: re-encoding is slow /
-c:v copydoes not work. Cause:eqis a video filter that rewrites pixels, so a re-encode is mandatory. Fix: keep the audio with-c:a copy, and tunecrfon a short segment before processing the whole file.
FAQ
Q. What is the difference between brightness and gamma?
A. brightness is an offset that adds a constant across the whole image, moving shadows and highlights equally. gamma is non-linear and mainly lifts (>1) or sinks (<1) the mid-to-shadow tones. For a natural brightening, gamma is less prone to clipping.
Q. What is the easiest way to make it grayscale?
A. eq=saturation=0. It drops the color information entirely.
Q. Can I adjust white balance?
A. You can approximate it with per-channel gamma: gamma_r, gamma_g, gamma_b. Lowering red and raising blue shifts cooler; the reverse shifts warmer.
Q. Why is the contrast range so wide (-1000 to 1000)?
A. That is just the allowed range. In practice 0.8–1.5 is plenty; extreme values break the image quickly. A value of 1 is the no-change baseline.
Q. Should I use eq or curves?
A. For nudging overall brightness, saturation, and gamma together, eq is the quick choice. When you need to shape highlights and shadows separately, curves gives finer control.
Related Filters
hue— Adjusts hue, saturation, and luminancecurves— Tone-curve-based color correctioncolorbalance— Color adjustment for shadows, midtones, and highlights