前言
利用 ffmpeg 來直接修改影片的對比度、亮度、飽和度
Sample code
透過修改後面的數值,可以直接改變影片的結果 (替影片上一層濾鏡的感覺)。
- Set the contrast expression. The value must be a float value in range -2.0 to 2.0. The default value is “1”.
- Set the brightness expression. The value must be a float value in range -1.0 to 1.0. The default value is “0”.
- Set the saturation expression. The value must be a float in range 0.0 to 3.0. The default value is “1”.
ffmpeg -y -i input.mp4 -vf "eq=contrast=1:brightness=0:saturation=1" -pix_fmt yuv420p ./output.mp4
