How to correct color matrices during playback

Introduction

Encodes made from Blu-rays should be displayed with the BT709 color matrix, while encodes made from DVDs should use BT601.

Most video players will try to automatically determine the correct color matrix of the file being played. Typically it works like this:

1. Check if the video has an embedded colormatrix tag, use it
2. If no tag is found, assume BT709 for HD resolution and BT601 for SD resolution

This works most of the time, except for Blu-ray sourced SD encodes that fail to include the colormatrix tag. In that case, virtually all players will assume the video comes from a DVD based on the resolution and apply the incorrect BT601 color matrix. Unfortunately, a lot of Blu-ray sourced SD encodes on PTP fall under that case.

This mistake is not easily spotted as comparisons in avspmod will always use the same matrix for the resized source and the encode. The difference will be only noticeable on playback, when the video player tries to guess or apply the tag embedded during the encoding process.

Example: Incorrect, Correct: Show comparison

Note: HANDJOB encodes are typically unaffected, as Handbrake adds the appropriate tags automatically.

How can I tell if my video uses an incorrect color matrix?

1. Make sure your encode is sourced from a Blu-ray and is in Standard Definition. Click on the file name to expand the Mediainfo.
https://i.ibb.co/0DvXQcX/bgc6d0.png

2. In the Video section, look for the line "Matrix coefficients : BT.709".
https://i.ibb.co/FbjgCHN/7me900.png
If you can find it there, all is good. Close this page and enjoy the movie. If it is missing, you might have to correct it.

It is possible, although unlikely, that the encoder transformed the color matrix so it would be correctly played as bt601 but left it untagged. Read the torrent description and use your own eyes to make sure the correction is needed.

How do I correct the color matrix on playback?

If you downloaded an untagged Blu-ray-sourced SD encode you can override your video player's settings to display it correctly.
Remember to turn it off when you are done.

If you use standard mpc-hc (LAV Filters): Show

If you use mpc-hc+madVR: Show

If you use mpc-hc+Haali Video Renderer: Show

If you use Potplayer: Show

If you use VLC (on Windows): Show

Appendix: I am an encoder. How do I make sure my Blu-ray-sourced SD encodes are correct?

There are two strategies you can adopt. There is no clear consensus which one is better. Tagging as bt709 is foolproof and covers the majority of players, while converting to bt601 and tagging as bt601 ensures wider compatibility but is a bit more involved. In addition, the color primaries should be defined. Tagging the transfer characteristics is not necessary.

Tag as BT709: Show

OR

Convert to BT601 and tag it as such: Show

What about DVDs?
To be on the safe side, tag them in the following way:

PAL: --colormatrix bt470bg --colorprim bt470bg
NTSC: --colormatrix smpte170m --colorprim smpte170m

References
https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.601-7-201103-I!!PDF-E.pdf
https://www.itu.int/rec/T-REC-H.264