mpv
mpv copied to clipboard
HDR videos just display as a red screen
Important Information
- mpv 0.34.1, also tested git master with same result
- Void Linux, kernel 5.19.17_1
- Void repo
- i3wm 4.21.1
- i915, mesa-22.1.7_1
- Screenshot:

"If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases" I tried building from git master and am encountering the exact same issue.
Reproduction steps
Using --no-config changes nothing.
Some Youtube videos, such as https://www.youtube.com/watch?v=LXb3EKWsInQ, cause the video played in MPV to be completely red. UI elements are still functional. Downloading the video with yt-dlp first and playing locally changes nothing.
Expected behavior
Video to play clearly, without artifacts
Actual behavior
Video is entirely red
Log file
Does --vf=format=gamma=bt.1886 make the red go away?
Yes, --vf=format=gamma=bt.1886 makes the red go away. Though the video plays now, it looks kinda washed out/lifeless
compared to viewing on Youtube.

Checked with a recent'ish build I made based off of 25906514c3aec87589833043f6281584946c98b4 on Windows+nvidia and a downloaded version of the clip (yt-dlp formats were 337+251), and I cannot reproduce it with either the default gpu-api d3d11 or opengl, so doesn't seem like a general problem at least.
Of course windows doesn't have EGL, does it? So that plus the different GPU driver.
Can you try --gpu-api=vulkan and/or --vo=gpu-next?
My GPU, Intel 945GM, doesn't support vulkan.
--gpu-api=vulkan
--vo=gpu-next failes to load
[james@voidD620 ~]$ mpv https://www.youtube.com/watch?v=LXb3EKWsInQ --vo=gpu-next
(+) Video --vid=1 (*) (vp9 1920x1080 59.940fps)
(+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
File tags:
Uploader: Jacob + Katie Schwarz
Channel_URL: https://www.youtube.com/channel/UCYq-iAOSZBvoUxvfzwKIZWA
[vo] Video output gpu-next not found!
Error opening/initializing the selected video_out (--vo) device.
Video: no video
Exiting... (Errors when loading file)
--vo=gpu-next with -v
vo.txt
What about --tone-mapping=clip?
And again with -v. Time/buffer info didn't get sent to the log file, but played fine in the terminal.
log.txt
Finally, what about --tone-mapping=clip --vf=format=gamma=hlg?
With -v
log.txt
Doesn't seem like it can be narrowed down to something more specific than 'any HDR video', I guess. There's probably little we can do to work around it then, either.
I guess at this point your only hope is that Mesa fixes the bug eventually, which is unlikely as active development goes into more recent hardware. (But you could try submitting a ticket nonetheless)
I'm not well versed in this stuff. How do you know it's a Mesa bug?