Missing color metadata led to wrong colors when re-encoding

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
Message
Author
mambojambo
Posts: 6
Joined: Mon Jan 19, 2026 8:33 pm

Missing color metadata led to wrong colors when re-encoding

#1 Post by mambojambo » Tue Mar 31, 2026 9:12 pm

Hey everyone, I am currently working on ripping my BD collection and encoding it to AV1 to save space. After quite some discs I noticed a color difference between source and encoded material and again after quite some testing I found that the issue was the 10-bit color conversion that is always recommended with AV1. Since ffmpeg doesn't know which color space the source is in, it assumed full range and falsely converted it.
So replacing `-pix_fmt yuv420p10le` in the command with `-vf "setparams=range=limited:colorspace=bt709:color_primaries=bt709:color_trc=bt709,format=yuv420p10le"` fixed it for me.

Can this fix maybe be applied to MakeMKV? My UHD discs are tagged correctly it seems, but for the normal BDs color metadata is missing completely:

Code: Select all

ffprobe Beauty\ and\ the\ Beast.mkv 2>&1 | grep "Stream #0:0" 
  Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn

ffprobe Treasure\ Planet.mkv 2>&1 | grep "Stream #0:0" 
  Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn
This could potentially save some people a lot of headaches and time :)

Post Reply