How to Set RGB Saturation in FFmpeg Vibrance
This guide explains how to control color saturation thresholds using
the FFmpeg vibrance filter. Unlike standard saturation
filters that boost all colors linearly, the vibrance filter
selectively enhances desaturated pixels while preserving
already-saturated tones. By configuring the dedicated red, green, and
blue balance parameters (rbal, gbal, and
bbal), you can precisely target and isolate which color
ranges receive the boost and which are suppressed.
Key Filter Parameters
The vibrance filter utilizes an overall intensity
control combined with individual color channel balance controls:
intensity: Sets the overall strength of the vibrance effect. The valid range is-2.0to2.0(default is0.0). Positive values boost less-saturated colors, while negative values desaturate them.rbal: Sets the saturation threshold balance for the red channel. Accepts values from-10.0to10.0(default is1.0).gbal: Sets the saturation threshold balance for the green channel. Accepts values from-10.0to10.0(default is1.0).bbal: Sets the saturation threshold balance for the blue channel. Accepts values from-10.0to10.0(default is1.0).
Basic Command Syntax
To use the filter, apply the -vf (video filter) option
in your FFmpeg command:
ffmpeg -i input.mp4 -vf "vibrance=intensity=0.5:rbal=1.5:gbal=1.0:bbal=0.8" -c:a copy output.mp4In this command:
intensity=0.5enables a moderate saturation boost across muted areas.rbal=1.5increases the saturation sensitivity for red tones.gbal=1.0maintains standard vibrance scaling for greens.bbal=0.8reduces the effect on blue tones, preventing over-saturation in skies or water.
Targeted Saturation Examples
1. Boosting Warm Tones (Reds and Yellows)
To make skin tones or sunsets pop without oversaturating cooler background elements, increase the red balance while lowering green and blue:
ffmpeg -i input.mp4 -vf "vibrance=intensity=0.8:rbal=2.0:gbal=0.5:bbal=0.2" -c:a copy output.mp42. Enhancing Foliage (Greens)
To bring out grass and foliage without altering skin tones:
ffmpeg -i input.mp4 -vf "vibrance=intensity=0.6:rbal=0.2:gbal=2.5:bbal=0.5" -c:a copy output.mp43. Enhancing Sky and Ocean (Blues)
To enrich skies or bodies of water without distorting surrounding landscape elements:
ffmpeg -i input.mp4 -vf "vibrance=intensity=0.7:rbal=0.0:gbal=0.5:bbal=2.0" -c:a copy output.mp4Fine-Tuning Luma Thresholds
The vibrance filter calculates color saturation relative
to perceived luminance. If the balance parameters do not achieve the
desired separation between color thresholds, adjust the luma
coefficients:
rlum: Red luma coefficient (default0.072186)glum: Green luma coefficient (default0.715158)blum: Blue luma coefficient (default0.212656)
Adjusting these shifts the point at which the filter considers a pixel "bright" versus "saturated":
ffmpeg -i input.mp4 -vf "vibrance=intensity=1.0:rbal=1.5:gbal=1.0:bbal=1.0:rlum=0.1:glum=0.6:blum=0.3" -c:a copy output.mp4Using rbal, gbal, and bbal
alongside intensity gives full control over color
distribution, preventing clipping while enriching flat or washed-out
video channels.