[FFmpeg-user] BT.709 -color_primaries -color_trc -colorspace ?

Mark Filipak markfilipak.windows+ffmpeg at gmail.com
Mon Mar 30 11:12:49 EEST 2020

"Lions!" "And tigers!" "And bears!" "Oh, My!" -- The Wizard of Oz.

I did search for answers, but this subject is apparently too esoteric.

1, Do I need to explicitly specify BT.709 for an encoder or does ffmpeg default to it?

2, Should I specify '-color_primaries' or '-color_trc' or '-colorspace'?

Codec documentation (https://ffmpeg.org/ffmpeg-codecs.html) references to 'bt709' [1]
-color_primaries 0
-color_trc 0
-colorspace 1
[1] The integers I use assume that the documentation lists are ascending from zero.

Aside from the integer assigned, what's the difference between the '-color_primaries' & '-color_trc' 
& '-colorspace' directives?

As you can see below, the transcode 'Output' status doesn't say what it defaults to.


Input #0, mpegts, from 'IN.M2TS':
   Duration: 00:51:03.85, start: 600.000000, bitrate: 29370 kb/s
   Program 1
     Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, bt709, progressive), 
1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Output #0, matroska, to 'OUT.MKV':
     encoder         : Lavf58.31.104
     Stream #0:0: Video: hevc (libx265), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 59.94 fps, 
1k tbn, 59.94 tbc

More information about the ffmpeg-user mailing list