Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th September 2018, 07:29   #1  |  Link
zn
Registered User
 
Join Date: Jan 2009
Posts: 88
mpv vs ffmpeg (ffplay) contrast, brightness, saturation, gamma (equalizer settings)

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

Last edited by zn; 13th September 2018 at 07:41.
zn is offline   Reply With Quote
Old 13th September 2018, 09:32   #2  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 272
Short answer: you can not.

The eq/hue works in yuv colorspace while mpv one works in rgb.
richardpl is offline   Reply With Quote
Old 13th September 2018, 10:09   #3  |  Link
zn
Registered User
 
Join Date: Jan 2009
Posts: 88
I want approximate formula, 100% accuracy not needed. Looks like mpv gamma+20 f ≈ 1.6 in ffmpeg

gamma_r, gamma_g, gamma_b - may be these filters can help for rgb gamma correction?

Quote:
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".

Last edited by zn; 13th September 2018 at 11:38.
zn is offline   Reply With Quote
Reply

Tags
ffmpeg, mpv

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.