mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.87k stars 2.85k forks source link

Is MPV possible to enable HDR on Plasma6? #13078

Closed laichiaheng closed 7 months ago

laichiaheng commented 7 months ago

I've already known that there is no way to play HDR videos on Gnome45 with its experimental HDR feature #13070 However, KDE Plasma 6 beta has partial supported HDR, they have implemented color management in KWin, I can enable HDR in settings of Plasma 6, but MPV seems still convert HDR to SDR, is there any way to passthrough HDR in Plasma 6? Or it is still not possible for now?

Log file

Even if you think it's not necessary at first, it might help us later to find possible issues. Make a log file made with -v -v or --log-file=output.txt, paste it to https://0x0.st/ or attach it to the github issue, and replace this text with a link to it.

LaserEyess commented 7 months ago

No.

laichiaheng commented 7 months ago

OK

CounterPillow commented 7 months ago

Please open 3219453849314 more issues about HDR which you know Linux can't do, we all really like them

Hrxn commented 7 months ago

Exactly 3219453849314! Not one more!

laichiaheng commented 7 months ago

@LaserEyess @CounterPillow @Hrxn I was wrong! MPV does play HDR videos in Plasma6 Wayland, it just needs to install a package which is called vk-hdr-layer-kwin6-git, and append ENABLE_HDR_WSI=1 in /etc/environment After these steps, just run mpv --vo=gpu-next --target-colorspace-hint --gpu-api=vulkan --gpu-context=waylandvk <video>, it works!!!

Somebody sent me this article: https://zamundaaa.github.io/wayland/2023/12/18/update-on-hdr-and-colormanagement-in-plasma.html

YouTube HDR videos: 20231220_164906 20231220_171708

Inverse Tone Mapping: 20231220_164800 20231220_164809 20231220_170854

It's amazing!

By the way, where does the number 3219453849314 come from?

nitschis commented 3 weeks ago

Now that KDE Plasma 6.1 reports the correct HDR values to applications. Any chance HDR could "just work" with mpv?

ruihe774 commented 3 weeks ago

We need to wait for Wayland color management protocol to be merged. It is the only cross-desktop way to handle HDR in Wayland.

laichiaheng commented 2 weeks ago

Now that KDE Plasma 6.1 reports the correct HDR values to applications. Any chance HDR could "just work" with mpv?

Isn't it already working? 20240706_230921 20240706_230945 20240706_230956

It's amazing to watch it on Acer XV275K P3.

llyyr commented 2 weeks ago

Kwin has some hacks to make it work through https://github.com/Zamundaaa/VK_hdr_layer

I didn't know they were shipping things they themselves call hacks in vanilla installations though...