Adjust Video Saturation and Gamma with FFmpeg eq Filter

This guide explains how to use the FFmpeg eq (equalizer) filter to adjust video saturation and gamma. You will learn the basic syntax, the specific parameters for saturation and gamma, and practical command-line examples to fine-tune your video's visual appearance.

The eq filter in FFmpeg is a powerful tool for adjusting video properties like contrast, brightness, saturation, and gamma.

Understanding the Parameters

  • saturation: Controls the intensity of colors. The default value is 1.0. A value of 0.0 produces a grayscale (black and white) video, while values greater than 1.0 increase color intensity. The allowed range is 0.0 to 3.0.
  • gamma: Controls the midtone brightness without affecting the absolute black and white points. The default value is 1.0. Values below 1.0 will darken the midtones, while values above 1.0 will brighten them. The allowed range is 0.1 to 10.0.

How to Adjust Saturation

To change the saturation of a video, use the saturation parameter within the eq filter.

For example, to increase video saturation by 50% (setting it to 1.5):

ffmpeg -i input.mp4 -vf "eq=saturation=1.5" -c:a copy output.mp4

To decrease saturation by 50% (setting it to 0.5):

ffmpeg -i input.mp4 -vf "eq=saturation=0.5" -c:a copy output.mp4

How to Adjust Gamma

To change the gamma of a video, use the gamma parameter.

To brighten the midtones of a dark video (setting gamma to 1.4):

ffmpeg -i input.mp4 -vf "eq=gamma=1.4" -c:a copy output.mp4

To darken the midtones (setting gamma to 0.8):

ffmpeg -i input.mp4 -vf "eq=gamma=0.8" -c:a copy output.mp4

Combining Saturation and Gamma Adjustments

You can adjust both parameters simultaneously by separating them with a colon (:) inside the filter argument.

For example, to increase the saturation to 1.3 and slightly brighten the midtones with a gamma of 1.2:

ffmpeg -i input.mp4 -vf "eq=saturation=1.3:gamma=1.2" -c:a copy output.mp4