Ffmpeg set a custom gamma value

1

0

I would like to force FFmpeg to add gamma information into a render. I managed with -movflags write_colr+write_gama like this :

/Users/xxx/Library/Application\ Support/FFmpegTools/ffmpeg  -probesize 50M -analyzeduration 100M -i /Users/xxx/Documents/TestGamma/dpx/Testsource.mov -map 0:0 -an -c:v prores_ks -r 24 -s 1920x1080 -aspect 16:9 -pix_fmt yuv444p10le **-movflags write_colr+write_gama** -profile:v 4 -coder ac -trellis 0 -color_primaries bt709 **-color_trc gamma22** -colorspace bt709 -subq 6 -me_range 16 -b_strategy 1 -sc_threshold 40 -keyint_min 24 -g 48 -qmin 3 -qmax 51 -metadata creation_time=now -sn -y /Users/xxx/Movies/Testoutput.mov

But the gamma should be 2.4 and I can't find the correct -color_trc to implement 2.4 gamma. Of course I can change this with JesExtensifier, but is there a solution to assign gamma 2.4 using FFmpeg?

Robin Erard

Posted 2020-01-21T10:57:12.870

Reputation: 13

You should mark Gyan's answer as solved, you were asking about .mov and he helped you configure the code. Please mark his answer with a green check mark which states problem is solved. Thank you. – vssher – 2020-01-22T03:20:28.530

Answers

1

The MOV muxer has a private option to set a custom gamma value. Add -mov_gamma 2.4. Range is 0 to 10.

Gyan

Posted 2020-01-21T10:57:12.870

Reputation: 21 016

Ok thanks, it works very well. Do you know if there is a same kind of tag for H264 encoding ? This one works with .mov – Robin Erard – 2020-01-21T16:27:39.823

MP4 only supports the standardized values via the colr tag. – Gyan – 2020-01-21T16:56:46.950