Originally published at ffmpeg-micro.com.
Video shot in different conditions looks different. A batch of user-uploaded clips won't match each other. Camera auto-exposure shifts between takes. Screen recordings come out dim. The FFmpeg eq filter lets you fix brightness, contrast, saturation, and gamma in a single filter pass, right from the command line or an API call, without opening a GUI editor.
Quick answer: The FFmpeg
eqfilter adjusts brightness, contrast, saturation, and gamma of a video stream. Apply it with-vf "eq=brightness=0.06:contrast=1.2:saturation=1.3"to brighten, boost contrast, and enrich colors in one pass. All parameters are optional and default to neutral values (brightness 0, contrast 1.0, saturation 1.0, gamma 1.0).
How the FFmpeg eq Filter Works
The eq filter modifies pixel values in the YUV color space. Brightness shifts the luma channel up or down. Contrast scales luma around a midpoint. Saturation scales the chroma channels. Gamma applies a nonlinear curve to luma (or individual RGB channels after internal conversion).
The basic syntax:
eq=brightness=<val>:contrast=<val>:saturation=<val>:gamma=<val>
All parameters are keyword arguments separated by colons. You only need to specify the ones you want to change.
| Parameter | Range | Default | What it does |
|---|---|---|---|
| brightness | -1.0 to 1.0 | 0.0 | Shifts luma up (brighter) or down (darker) |
| contrast | -1000.0 to 1000.0 | 1.0 | Scales luma around the midpoint. Below 1.0 flattens, above 1.0 sharpens tonal separation |
| saturation | 0.0 to 3.0 | 1.0 | Scales color intensity. 0 is grayscale, above 1.0 makes colors more vivid |
| gamma | 0.1 to 10.0 | 1.0 | Nonlinear luma curve. Below 1.0 brightens midtones, above 1.0 darkens them |
| gamma_r | 0.1 to 10.0 | 1.0 | Gamma correction for the red channel only |
| gamma_g | 0.1 to 10.0 | 1.0 | Gamma correction for the green channel only |
| gamma_b | 0.1 to 10.0 | 1.0 | Gamma correction for the blue channel only |
Adjusting Brightness and Contrast with FFmpeg
The most common use case: a video came out too dark or too flat, and you need to correct it before publishing.
CLI:
ffmpeg -i input.mp4 -vf "eq=brightness=0.1:contrast=1.3" -c:a copy output.mp4
This bumps brightness by 0.1 (a subtle lift) and increases contrast to 1.3 (noticeable tonal punch). The -c:a copy flag passes audio through without re-encoding.
API (FFmpeg Micro):
curl -X POST https://api.ffmpeg-micro.com/v1/transcodes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": [{"url": "https://storage.example.com/input.mp4"}],
"outputFormat": "mp4",
"options": [
{"option": "-vf", "argument": "eq=brightness=0.1:contrast=1.3"},
{"option": "-c:a", "argument": "copy"}
]
}'
A brightness value of 0.1 is a good starting point for underexposed footage. Going above 0.2 usually looks washed out. For contrast, stay between 1.0 and 1.5 for natural results. Anything above 2.0 starts to crush shadows and clip highlights.
Color Correction: Adjusting Saturation
Desaturated footage is a common problem with screen recordings, webcam captures, and action cameras in overcast light. The saturation parameter fixes it.
CLI:
ffmpeg -i input.mp4 -vf "eq=saturation=1.5" -c:a copy output.mp4
API (FFmpeg Micro):
curl -X POST https://api.ffmpeg-micro.com/v1/transcodes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": [{"url": "https://storage.example.com/input.mp4"}],
"outputFormat": "mp4",
"options": [
{"option": "-vf", "argument": "eq=saturation=1.5"},
{"option": "-c:a", "argument": "copy"}
]
}'
Setting saturation to 0 converts the video to grayscale. That's useful for stylistic effects or for feeding into computer vision pipelines where color is irrelevant. A value of 1.5 adds noticeable vibrancy without looking artificial. Above 2.0, colors start to bleed.
Using Gamma for Midtone Correction
Brightness is a linear shift. Gamma is a curve. That distinction matters when you're correcting footage that looks dim but you don't want to blow out the highlights.
Gamma below 1.0 lifts the midtones and shadows while leaving the brightest parts mostly untouched. Gamma above 1.0 darkens midtones without crushing blacks.
CLI:
ffmpeg -i input.mp4 -vf "eq=gamma=0.7:saturation=1.2" -c:a copy output.mp4
This brightens midtones (gamma 0.7 gives a visible lift) and slightly boosts color. It's a better choice than the brightness parameter for footage that's underexposed but has intact highlights.
API (FFmpeg Micro):
curl -X POST https://api.ffmpeg-micro.com/v1/transcodes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": [{"url": "https://storage.example.com/input.mp4"}],
"outputFormat": "mp4",
"options": [
{"option": "-vf", "argument": "eq=gamma=0.7:saturation=1.2"},
{"option": "-c:a", "argument": "copy"}
]
}'
For per-channel control, use gamma_r, gamma_g, and gamma_b. This is useful for correcting white balance problems. Footage shot under tungsten lighting looks orange. You can fix it by reducing the red gamma and boosting the blue gamma:
ffmpeg -i input.mp4 -vf "eq=gamma_r=0.85:gamma_b=1.15" -c:a copy output.mp4
Combining eq with Other Filters
The eq filter works well chained with other video filters. A common pipeline is to scale, color-correct, then encode.
CLI:
ffmpeg -i input.mp4 -vf "scale=1920:1080,eq=brightness=0.06:contrast=1.2:saturation=1.3" \
-c:v libx264 -crf 23 -c:a copy output.mp4
This resizes to 1080p, applies color correction, and encodes with libx264 at CRF 23. Filters in a -vf chain execute left to right, so scale runs before eq.
API (FFmpeg Micro):
curl -X POST https://api.ffmpeg-micro.com/v1/transcodes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": [{"url": "https://storage.example.com/input.mp4"}],
"outputFormat": "mp4",
"options": [
{"option": "-vf", "argument": "scale=1920:1080,eq=brightness=0.06:contrast=1.2:saturation=1.3"},
{"option": "-c:v", "argument": "libx264"},
{"option": "-crf", "argument": "23"},
{"option": "-c:a", "argument": "copy"}
]
}'
You can also combine eq with the FFmpeg fade filter for polished intros, or chain it after the scale filter when resizing user uploads to a consistent resolution.
Common Pitfalls
Confusing brightness with gamma. Brightness adds a flat offset to every pixel. Highlights clip, shadows shift uniformly. Gamma applies a curve that affects midtones most. For exposure correction, gamma almost always produces more natural results than brightness.
Contrast values that destroy detail. A contrast of 1.3 looks good. A contrast of 3.0 makes your video look like a threshold filter. The useful range for natural-looking output is 0.8 to 1.5. Use values outside that range only for deliberate stylistic effects.
Saturation above 2.0 on compressed video. Highly compressed source video (low-bitrate H.264, heavily compressed WebM) already has chroma artifacts. Pushing saturation above 2.0 amplifies those artifacts and produces color banding. If the source is lossy, keep saturation under 1.8.
Not using -c:a copy. The eq filter only touches video. Without -c:a copy, FFmpeg re-encodes your audio track for no reason. Always pass audio through when you're only doing video corrections. The FFmpeg Micro API handles this automatically.
Expecting -filter_complex support. The eq filter is a simple single-input, single-output filter. Use it with -vf, not -filter_complex. In the FFmpeg Micro API, use the -vf option field. The API doesn't support -filter_complex.
FAQ
How do I make a video brighter with FFmpeg?
Use the eq filter with a positive brightness value: ffmpeg -i input.mp4 -vf "eq=brightness=0.1" -c:a copy output.mp4. The brightness parameter ranges from -1.0 (black) to 1.0 (white), with 0 being no change. For a more natural lift that preserves highlights, use gamma instead: eq=gamma=0.8.
Can I convert a video to grayscale with FFmpeg?
Yes. Set the eq filter's saturation parameter to 0: ffmpeg -i input.mp4 -vf "eq=saturation=0" -c:a copy output.mp4. This removes all color information while preserving the luma channel. The output is a true grayscale video.
What's the difference between the eq filter and the curves filter in FFmpeg?
The eq filter adjusts brightness, contrast, saturation, and gamma with simple numeric parameters. The curves filter provides fine-grained control with custom tone curves (similar to Photoshop curves). For quick corrections, eq is faster to use. For precise color grading with specific control points, curves gives you more flexibility at the cost of a more complex syntax.
How do I fix white balance with FFmpeg?
Use the eq filter's per-channel gamma controls. For warm (orange-tinted) footage, reduce red and boost blue: eq=gamma_r=0.85:gamma_b=1.15. For cool (blue-tinted) footage, do the opposite: eq=gamma_r=1.15:gamma_b=0.85. These corrections are approximate. For precise white balance, consider the colorbalance or colortemperature filters.
Does the eq filter re-encode the video?
Yes. Any video filter in FFmpeg requires decoding and re-encoding the video stream. To control output quality, specify an encoder and quality setting like -c:v libx264 -crf 20. If you want to adjust brightness or contrast without re-encoding, that's not possible with any filter-based approach.
Color-Correct Video Without Managing FFmpeg
If you're building color correction into a product or processing user uploads at scale, you can skip the FFmpeg installation and server management. The FFmpeg Micro API runs the eq filter (and every other FFmpeg filter) as a stateless HTTP endpoint. Get a free API key and start correcting video in minutes.
Last verified: July 2026 against FFmpeg 7.x and the FFmpeg Micro API v1.
Top comments (0)