(FFmpeg) How to Edit the Saturation of a Video?

Although the hue filter has a saturation variable, FFmpeg also has another filter called vibrance which is used to adjust the color intensity. Both filters give slightly different saturation effects but each has its place.

Figure 59.0: max boosted saturation

In this example, all colors are boosted in the video, as seen in figure 59.0:

 $ ffmpeg -i input.mp4 -filter_complex "vibrance=intensity=2" -pix_fmt yuv420p output.mp4  
Figure 59.1: negative intensity + green saturation

A specific color can also be set to apply a saturation. In this example, a negative intensity with a green saturation is applied. As seen in figure 59.1:

  $ ffmpeg -i input.mp4 -filter_complex "vibrance=intensity=-2:gbal=10" -pix_fmt yuv420p output.mp4  
intensity
	Indicates the strength of the saturation boost. Positive value boosts while negative value alters (2 to -2 with default 0)

rbal
	Indicates the red balance (10 to -10 with default 1)

gbal
	Indicates the green balance (10 to -10 with default 1)


bbal
	Indicates the blue balance (10 to -10 with default 1)

rlum
	Indicates the red luma coefficient (1 to 0 default 0)

glum
	Indicates the green luma coefficient (1 to 0 default 0)

blum
	Indicates the blue luma coefficient (1 to 0 default 0)

Love FFmpeg? Grab a copy of FFmpeg For Beginners on Kindle or Paperback to learn over 120 ways to master FFmpeg!

buy now on amazon

Related Posts