Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting a dark output when converting .exr sequence to .mp4

Tags:

ffmpeg

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?

like image 914
Gambit2007 Avatar asked May 27 '16 18:05

Gambit2007


2 Answers

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
like image 198
Gyan Avatar answered Oct 20 '22 01:10

Gyan


With the latest version of ffmpeg (version git-2020-03-24):

  • start_frame is replaced by start_number
  • $04d is replaced by %04d

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
like image 35
jesaisplus Avatar answered Oct 20 '22 01:10

jesaisplus