Configure FFmpeg Vibrance Filter Color Saturation
This article explains how to configure the red, green, and blue
saturation thresholds and intensities using the FFmpeg
vibrance video filter. You will learn the specific
parameters required to isolate color channels, adjust their individual
boost levels, and set saturation thresholds to prevent over-saturation
in your video processing workflows.
Understanding the Vibrance Filter Parameters
The vibrance filter in FFmpeg boosts or desaturates
pixels based on their existing saturation levels. Unlike a global
saturation filter, it targets less saturated colors more aggressively
while leaving highly saturated colors alone.
To configure individual RGB channels, you must use two sets of parameters: Intensity (the strength of the boost) and Balance (the threshold determining which pixels get boosted).
1. Color Intensity Parameters
These parameters control the maximum boost or desaturation applied to
specific color channels. The value range is from -2.0 to
2.0. A positive value increases vibrance, while a negative
value desaturates the color. The default is 0.0.
r_intensity: Red channel intensity.g_intensity: Green channel intensity.b_intensity: Blue channel intensity.
2. Color Balance (Threshold) Parameters
These parameters act as thresholds. They determine how the vibrance
effect scales across different saturation levels for each channel. The
value range is from 0.0 to 10.0. The default
is 1.0.
r_balance: Red channel saturation threshold balance.g_balance: Green channel saturation threshold balance.b_balance: Blue channel saturation threshold balance.
Adjusting the balance controls how “flat” or “steep” the saturation curve is. A higher balance value limits the vibrance effect on already-saturated pixels, protecting them from clipping.
Example Configurations
The basic syntax for applying the vibrance filter is:
ffmpeg -i input.mp4 -vf "vibrance=parameter1=value1:parameter2=value2" output.mp4Example 1: Boosting Blue Saturation While Protecting Red
If you want to enhance a blue sky without over-saturating red skin tones, increase the blue intensity and lower the blue balance threshold while keeping red low:
ffmpeg -i input.mp4 -vf "vibrance=b_intensity=1.5:b_balance=0.5:r_intensity=0.2:r_balance=2.0" output.mp4b_intensity=1.5: Heavily boosts blue.b_balance=0.5: Lowers the threshold so the boost applies widely across blue shades.r_intensity=0.2: Barely touches the reds.r_balance=2.0: Restricts the red boost to only the most desaturated red pixels.
Example 2: Desaturating Greens while Boosting Reds
If you want to achieve a stylized look where foliage is desaturated but reds are vibrant:
ffmpeg -i input.mp4 -vf "vibrance=g_intensity=-1.0:r_intensity=1.2:r_balance=1.5" output.mp4g_intensity=-1.0: Desaturates green tones.r_intensity=1.2: Boosts red tones.r_balance=1.5: High threshold protects already saturated reds from blowing out.
Example 3: Global Vibrance with Channel-Specific Corrections
You can combine the global intensity parameter with
individual RGB parameters. The channel-specific settings will build upon
the global value:
ffmpeg -i input.mp4 -vf "vibrance=intensity=0.8:g_intensity=-0.5:g_balance=2.0" output.mp4intensity=0.8: Applies a general vibrance boost to all colors.g_intensity=-0.5: Specifically dampens the green channel boost.g_balance=2.0: Ensures the green channel damping heavily targets highly saturated green areas.