[FFmpeg-user] Encode mov from exr [linear>logC>rec709]
Clement Poulain
clpo at dupevfx.com
Fri Feb 22 18:56:25 EET 2019
Hey guys,
I am working with an exr image sequence (colorspace: linear)
I have a lut file to go from AlexaV3LogC to rec709.
Obviously to do the encoding i need to change the colorspace first.
I can't use apply_trc flag as AlexaV3LogC is different from ffmpeg logC
colorspace.
To counter that in Nuke i used a Expression node with this value in every
channels (channel r example):
*r>0.0106232?(log10((r + 0.00937677) / 0.18)*0.2471896) +
0.385537:(((r+0.00937677) / 0.18) + 0.04378604) * 0.9661776*
Which is the same than using a OCIOColorSpace node with in=linear and
out=AlexaV3LogC
As i want to do that with ffmpeg, i updated those expressions with ffmpeg
convention:
*"lutrgb=r='if(gt(val, 0.0106232), log((val + 0.00937677) /
0.18)/log(10)*0.2471896 + 0.385537, (((val + 0.00937677) / 0.18) +
0.04378604) * 0.9661776)':g='if(gt(val, 0.0106232), log((val + 0.00937677)
/ 0.18)/log(10)*0.2471896 + 0.385537, (((val + 0.00937677) / 0.18) +
0.04378604) * 0.9661776)':b='if(gt(val, 0.0106232), log((val + 0.00937677)
/ 0.18)/log(10)*0.2471896 + 0.385537, (((val + 0.00937677) / 0.18) +
0.04378604) * 0.9661776)'"*
Theoretically, and double checked in a python shell:
for a val=0.2 val will be 0.40..
for a val=0.01 val will be 0.14..
But it seems that I can't use the log(x) function in lutrgb.
I get black frames with no data: every pixel [0,0,0]
By removing all log(x) functions, obviously the values are wrong, but I can
see my images..
And I don't have any error message.
Did someone already use log(x) function in lutrgb?
Is there a clever way to do it?
Any help is welcome.
Thank you.
Clement
More information about the ffmpeg-user
mailing list