I’m adding 4K HDR content to my Plex library that I am recording to my PC using FFmpeg as MKV files. The HDR metadata is in the MKV header, and plays back properly in VLC and MPC-HD. However in Plex, the colors are very washed out on every device (too magenta and cyan). After spending a lot of time looking at this on FFmpeg focused forums, it would appear the issue is that Plex is not reading the container level HDR metadata in the MKV. 4K HDR content from other sources (Blu-ray rips, OBS, video recorded on an HDR camera, etc.) work fine in Plex. Any idea how to fix it?
Format : Matroska
Format version : Version 4
File size : 2.75 GiB
Duration : 7 min 41 s
Overall bit rate : 51.3 Mb/s
Writing application : Lavf60.4.100
Writing library : Lavf60.4.100
ErrorDetectionType : Per level 1
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : V_MPEGH/ISO/HEVC
Duration : 7 min 40 s
Bit rate : 49.8 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.250
Stream size : 2.67 GiB (97%)
Writing library : Lavc60.6.100 hevc_nvenc
Default : No
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : BT.2020 (10-bit)
transfer_characteristics_Original : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 300
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : A_AC3
Duration : 7 min 41 s
Bit rate mode : Constant
Bit rate : 448 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 32 bits
Compression mode : Lossy
Stream size : 24.6 MiB (1%)
Writing library : Lavc60.6.100 ac3
Service kind : Complete Main
Default : No
Forced : No
Some of this info is in the data above, but I’ve verified the MKV header for this file (and others with this problem) have this info, and play properly in VLC and MPC-HD: