mpv icon indicating copy to clipboard operation
mpv copied to clipboard

HDR videos just display as a red screen

Open LloydLynx opened this issue 2 years ago • 11 comments

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: 2022-11-12-154314_1920x1980_scrot

"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

mpvlog.txt

LloydLynx avatar Nov 12 '22 21:11 LloydLynx

Does --vf=format=gamma=bt.1886 make the red go away?

haasn avatar Nov 12 '22 21:11 haasn

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. 2022-11-12-160225_1920x1980_scrot 2022-11-12-160532_1920x1980_scrot

ghost avatar Nov 12 '22 22:11 ghost

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.

jeeb avatar Nov 12 '22 22:11 jeeb

Can you try --gpu-api=vulkan and/or --vo=gpu-next?

haasn avatar Nov 12 '22 22:11 haasn

My GPU, Intel 945GM, doesn't support vulkan. --gpu-api=vulkan 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

ghost avatar Nov 12 '22 22:11 ghost

What about --tone-mapping=clip?

haasn avatar Nov 12 '22 23:11 haasn

2022-11-12-172623_1920x1980_scrot And again with -v. Time/buffer info didn't get sent to the log file, but played fine in the terminal. log.txt

ghost avatar Nov 12 '22 23:11 ghost

Finally, what about --tone-mapping=clip --vf=format=gamma=hlg?

haasn avatar Nov 12 '22 23:11 haasn

2022-11-12-174204_1920x1980_scrot With -v log.txt

ghost avatar Nov 12 '22 23:11 ghost

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)

haasn avatar Nov 12 '22 23:11 haasn

I'm not well versed in this stuff. How do you know it's a Mesa bug?

ghost avatar Nov 13 '22 00:11 ghost