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.

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.

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.mp4

Example 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.mp4

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.mp4

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.mp4