[HDR Metadata Passthrough] - Plex HTPC for Windows

Note:

1.28.1 has been released which has a GUI checkbox to enable HDR metadata passthrough. This:

  • Sets vo=gpu-next and target-colorspace-hint=yes when you play HDR content (it sets vo=gpu when playing SDR content so if you want to always use vo=gpu-next you should keep this in your mpv.conf file).
  • When switching the display from HDR → SDR and target-colorspace-hint was set along with using a Vulkan GPU context, it will play a short SDR video to kick the drivers out of outputting HDR all the time. This is a workaround for the Vulkan output remaining in HDR even when the display is switched back to SDR.

So, today you should make these changes from what’s stated in the first post (at the time of writing):

  • Remove target-colorspace-hint=yes from your mpv.conf file
  • (optionally) remove vo=gpu-next from your mpv.conf file (keep it if you want to use gpu-next for SDR content)
  • Turn on HDR switching in HTPC’s settings (even if you are using Vulkan)
  • Turn on HDR Metadata Passthrough in HTPC’s settings

This was accomplished by moving the UI window behind the video, capturing an image of the UI whenever it changes (and only on change; no polling), and adding that image as an overlay to MPV. You may notice upon exiting playback that the UI is momentarily in the upper-left quarter of the screen before quickly resizing the the full screen. This is for performance reasons to capture image of the UI at 1080p instead of 4k.

On the non-passthrough front:

In playing with an HDFury Arcana, we have discovered that Windows is pretty consistently outputting MaxFall/CLL values which match what the display indicates in its EDID. Currently missing is MPV reading this values and tone-mapping itself to what Windows is outputting. If this were added (setting target-peak), then MPV it should produce similar (and possibly better) results to HDR metadata passthrough.

3 Likes