Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.

DO NOT MERGE - Add HDR playback on Wayland (vulkan, gpu-next)#1068

Closed
andrewrabert wants to merge 6 commits intomasterfrom
libmpv-vulkan-gpu-next-wayland-hdr
Closed

DO NOT MERGE - Add HDR playback on Wayland (vulkan, gpu-next)#1068
andrewrabert wants to merge 6 commits intomasterfrom
libmpv-vulkan-gpu-next-wayland-hdr

Conversation

@andrewrabert
Copy link
Copy Markdown
Member

@andrewrabert andrewrabert commented Dec 21, 2025

Hacked-together, but provides functioning HDR playback on Plasma Wayland (Arch Linux). This likely will not be merged for quite a while. It relies upon non-upstream changes to mpv [1] [2].

Compile with:

cmake -B build -G Ninja -DUSE_WAYLAND_SUBSURFACE=ON
cmake --build build

Partially resolves (Wayland only) https://github.com/jellyfin/jellyfin-desktop/issues/362, https://github.com/jellyfin/jellyfin-desktop/issues/523

Tested on:

  • Arch Linux
  • Kernel 6.18.2.arch2-1
  • KDE Plasma 6.5.4 Wayland
  • Qt 6.10.1
  • AMD Radeon 6900 XT
  • ASUS PG42UQ

Appears visually identical to standalone mpv running with this config:

vo=gpu-next
gpu-api=vulkan
gpu-context=waylandvk
target-colorspace-hint

@andrewrabert andrewrabert force-pushed the libmpv-vulkan-gpu-next-wayland-hdr branch from c49fd79 to bfabe82 Compare December 21, 2025 11:25
@andrewrabert andrewrabert changed the title DO NOT MERGE - libmpv vulkan gpu-next wayland hdr DO NOT MERGE - Add HDR playback on Wayland (vulkan, gpu-next) Dec 21, 2025
@andrewrabert andrewrabert force-pushed the libmpv-vulkan-gpu-next-wayland-hdr branch 2 times, most recently from 19f3979 to 892d17d Compare December 27, 2025 20:28
@andrewrabert andrewrabert force-pushed the libmpv-vulkan-gpu-next-wayland-hdr branch from 892d17d to 4b47cf3 Compare December 27, 2025 20:35
mpv outputs PQ/BT.2020 regardless of source content when HDR swapchain
is active. Signal this output colorspace to Wayland instead of the
source colorspace.
Pass pause=no option to loadfile command. Without this, mpv keeps
the previous pause state which causes subsequent files to stay paused.
Fixes WebEngine overlay alpha blending (OSD fade) over mpv video.
Qt Vulkan caused crashes on Radeon GPUs and broke transparency.

- Remove QVulkanInstance and setGraphicsApi(Vulkan) for Qt
- Add alpha buffer to surface format for subsurface blending
- mpv subsurface retains its own Vulkan instance for HDR
When the window resizes, immediately render a frame with the new
swapchain dimensions instead of waiting for mpv's update signal.
Fixes subsurface not resizing when video is paused.
@andrewrabert
Copy link
Copy Markdown
Member Author

Continuing work on this at https://github.com/jellyfin-labs/jellyfin-desktop-cef

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant