Search code examples
ffmpeg

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


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?


Solution

  • 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