I have a 16bit .exr image sequence in an RGB colorspace. When I convert it to .mp4 using:
ffmpeg -start_frame 1100 -i input.$04d.exr output.mp4
The resulting .mp4 file is very dark. I tried importing it to a video compositing software (like NUKE) and apply a linear lut, it looks correct. How can I do the same thing using ffmpeg?
The EXR decoder has a parameter to assign color transfer characteristics.
For sRGB, it is
ffmpeg -apply_trc iec61966_2_1 -start_number 1100 -i input%04d.exr output.mp4
Other available values are
bt709 .D.V.... BT.709
gamma .D.V.... gamma
gamma22 .D.V.... BT.470 M
gamma28 .D.V.... BT.470 BG
smpte170m .D.V.... SMPTE 170 M
smpte240m .D.V.... SMPTE 240 M
linear .D.V.... Linear
log .D.V.... Log
log_sqrt .D.V.... Log square root
iec61966_2_4 .D.V.... IEC 61966-2-4
bt1361 .D.V.... BT.1361
iec61966_2_1 .D.V.... IEC 61966-2-1
bt2020_10bit .D.V.... BT.2020 - 10 bit
bt2020_12bit .D.V.... BT.2020 - 12 bit
smpte2084 .D.V.... SMPTE ST 2084
smpte428_1 .D.V.... SMPTE ST 428-1
With the latest version of ffmpeg (version git-2020-03-24):
I had to add the -vcodec argument to have the expected result.
ffmpeg -y -apply_trc iec61966_2_1 -start_number 1 -i input.%04d.exr -vcodec mpeg4 output.mp4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With