ffmpeg Format settings, Matrix bt709

user1722669 picture user1722669 · May 16, 2016 · Viewed 17.1k times · Source

Does anyone know how I can achieve the following color space (bt.709) via FFmpeg?
Here is what I have now in my files...

enter image description here

As you can see there is Format settings, Matrix as default, how can I set it like this :

  • Format settings (Matrix) : Custom or Standard
  • Component Color primaries : BT.709
  • Transfer characteristics : BT.709
  • Matrix coefficients : BT.709

Thank you

Answer

Gyan picture Gyan · May 18, 2016

With re-encoding, use

ffmpeg -i test.mxf -c copy -c:v mpeg2video -b:v 5000k \
       -color_primaries 1 -color_trc 1 -colorspace 1 out.mxf

In Mediainfo, at the end of the video stream attributes, you should see the three color-related entries. Note that Format settings (Matrix) is related to MPEG quantization and not color.