How I can translate mpv contrast, brightness, saturation, gamma setting (adjustable via command line and using hot keys F1-F6) into ffmpeg eq filter range?
For example, if I want to get the same color in ffmpeg (ffplay) using -vf "eq=gamma=0.X" (range 0.1..1.0), as I get with mpv gamma +20 (range -100..+100)
mpv:
Quote:
Equalizer
--brightness=<-100-100>
Adjust the brightness of the video signal (default: 0). Not supported by all video output drivers.
--contrast=<-100-100>
Adjust the contrast of the video signal (default: 0). Not supported by all video output drivers.
--saturation=<-100-100>
Adjust the saturation of the video signal (default: 0). You can get grayscale output with this option. Not supported by all video output drivers.
--gamma=<-100-100>
Adjust the gamma of the video signal (default: 0). Not supported by all video output drivers.
--hue=<-100-100>
Adjust the hue of the video signal (default: 0). You can get a colored negative of the image with this option. Not supported by all video output drivers.
|
ffmpeg (ffplay) eq filter (-vf "eq=gamma=0.5"):
Quote:
10.50 eq
Set brightness, contrast, saturation and approximate gamma adjustment.
The filter accepts the following options:
contrast
Set the contrast expression. The value must be a float value in range -2.0 to 2.0. The default value is "1".
brightness
Set the brightness expression. The value must be a float value in range -1.0 to 1.0. The default value is "0".
saturation
Set the saturation expression. The value must be a float in range 0.0 to 3.0. The default value is "1".
gamma
Set the gamma expression. The value must be a float in range 0.1 to 10.0. The default value is "1".
gamma_r
Set the gamma expression for red. The value must be a float in range 0.1 to 10.0. The default value is "1".
gamma_g
Set the gamma expression for green. The value must be a float in range 0.1 to 10.0. The default value is "1".
gamma_b
Set the gamma expression for blue. The value must be a float in range 0.1 to 10.0. The default value is "1".
gamma_weight
Set the gamma weight expression. It can be used to reduce the effect of a high gamma value on bright image areas, e.g. keep them from getting overamplified and just plain white. The value must be a float in range 0.0 to 1.0. A value of 0.0 turns the gamma correction all the way down while 1.0 leaves it at its full strength. Default is "1".
|
Quote:
10.89 hue
Modify the hue and/or the saturation of the input.
It accepts the following parameters:
h
Specify the hue angle as a number of degrees. It accepts an expression, and defaults to "0".
s
Specify the saturation in the [-10,10] range. It accepts an expression and defaults to "1".
H
Specify the hue angle as a number of radians. It accepts an expression, and defaults to "0".
b
Specify the brightness in the [-10,10] range. It accepts an expression and defaults to "0".
|