matrix_coefficients=bt709 incorrect output on export

Setting “matrix_coefficients=bt709” in [Export, Advanced options] results in the the mediainfo of the file reporting it as “Identity” instead of the expected “BT709” value.

This happens for different codecs such as HuffYUV, ProRes, and FFV1.

Grok analysis of the issue:

Problem: Color space: RGB: Shotcut’s ProRes encoder incorrectly outputs RGB instead of YUV, despite format=yuv422p. This is a critical issue, as your workflow requires YUV 4:2:2 for 1440x1080/768x576 and YUV 4:2:0 for 640x480.
Matrix coefficients: Identity: As with Huffyuv and FFV1, Shotcut ignores matrix_coefficients=bt709, defaulting to Identity, a non-standard setting for Rec.709 video.
Cause: Shotcut’s FFmpeg backend (Lavf61.7.100) appears to have a bug or limitation when setting color metadata for ProRes, FFV1, and Huffyuv, misapplying colorspace=bt709 and format=yuv422p. The RGB output suggests Shotcut is encoding ProRes in an RGB pipeline, possibly due to a default setting or misconfiguration in the QuickTime container.
Impact: HandBrake will process the RGB input, potentially outputting RGB or incorrect YUV metadata, leading to:Washed-out colors.

This is a Shotcut-specific issue, as FFmpeg’s ProRes encoder (-c:v prores) typically supports YUV 4:2:2 with correct metadata. Report this to the Shotcut forum for a potential fix.

Video MediaInfo of source file:

Video
ID                          : 1
Format                      : AVC
Format/Info                 : Advanced Video Codec
Format profile              : High 4:4:4 Predictive@L4
Format settings             : CABAC / 4 Ref Frames
Format settings, CABAC      : Yes
Format settings, Reference  : 4 frames
Codec ID                    : V_MPEG4/ISO/AVC
Duration                    : 1 min 27 s
Bit rate                    : 85.1 Mb/s
Width                       : 1 440 pixels
Height                      : 1 080 pixels
Display aspect ratio        : 4:3
Frame rate mode             : Constant
Frame rate                  : 25.000 FPS
Color space                 : YUV
Chroma subsampling          : 4:4:4
Bit depth                   : 8 bits
Scan type                   : Progressive
Bits/(Pixel*Frame)          : 2.190
Stream size                 : 888 MiB (96%)
Writing library             : x264 core 164 r3106 eaa68fa
Encoding settings           : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=6 / threads=18 / lookahead_threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=25 / keyint_min=2 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=5.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default                     : Yes
Forced                      : No
Color range                 : Limited
Color primaries             : BT.709
Transfer characteristics    : BT.709
Matrix coefficients         : BT.709

OS: Win 10 Pro
Shotcut version: 25.07.26

“matrix_coefficients” is not a supported option. Grok does not know. “format=yuv422p” is not valid either. See

https://mltframework.org/plugins/ConsumerAvformat/

If the Video Mode is set to BT.709 then the export file includes color space, primaries and transfer for 709.

I created a project with video mode “HD 720p 29.97 fps” and exported it using the “ProRes 422” export preset. Mediainfo shows:

Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Shotcut Properties > menu-button > More Information (ffprobe) shows:

color_space=bt709
color_transfer=bt709
color_primaries=bt709

Grok is hallucinating. format is a filter on the FFmpeg command line, which is different from a pixel format specifier in the Shotcut GUI. That line in Advanced > Other should be pix_fmt=yuv422p for 8-bit Huffman variants and DNxHR, or pix_fmt=yuv422p10le for ProRes.

Leaving ‘Other’ blank seems to report the correct ‘matrix_coefficient’ value now when trying to export with ProRes and HuffYUV.

The only thing I remember changing was creating a new Video Mode and selecting BT.709 as the colour space - but this did not fix the issue initially. I’m guessing I had to re-open Shotcut and/or remove all of the ‘Other’ parameters. It may be that the video mode I was working on initially was set to BT.601.

This was what HuffyYUV export was doing initially without any additional parameters. Mediainfio:

Color range : Limited
Color primaries : BT.709
Transfer characteristics : sRGB/sYCC
Matrix coefficients : Identity

Then I followed Groks recommendation of including these parameters for HuffYUV export initially as the matrix_coefficient=Identity value was causing Handbrake to export in RGB colour space:

profile=high422
pix_format=yuv422p
colorspace=bt709
color_range=tv

which resulted in:

Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : Identity

So, it seems the wrong Video Mode was the culprit.