Repository navigation
feat: native animated video backgrounds via libmpv - #1032
Open
dhia-gharsallaoui wants to merge 2 commits into
Open
dhia-gharsallaoui wants to merge 2 commits into
dhia-gharsallaoui wants to merge 2 commits into
Conversation
Add optional libmpv-backed video decoding to the background widget. When
`path` points at a video file (mp4, mkv, webm, mov, gif, ...) it is decoded
with hardware acceleration and played, looping, as the lock background,
reusing the existing cover-fit, blur, crossfade and color-fallback paths.
- New CMpvVideo (src/renderer/MpvVideo.{hpp,cpp}) wraps libmpv's render API,
decoding into an offscreen FBO that is composited like any other texture.
- The background widget detects video paths and renders a frame each draw(),
keeping the per-output frame-callback loop alive while the video plays.
- New background options: video_loop, video_mute, video_hwdec,
video_fps_cap, video_pause_on_battery.
- libmpv is an optional dependency (HYPRLOCK_WITH_MPV). Without it the build
is unchanged and video paths fall back to the background color.
- Errors (missing file, no video track, decode failure) fall back to the
background color with a clear log; a watchdog stops a frameless file from
spinning the render loop. Teardown frees the mpv render context with the
EGL context current, before EGL shutdown.
ext-session-lock-v1 isolates the lock surface from all other layers, so
external players (mpvpaper overlay, etc.) can no longer show through on
current Hyprland; rendering the video as part of the lock surface itself is
the only approach that works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add optional libmpv-backed video decoding to the background widget. When
pathpoints at a video file (mp4, mkv, webm, mov, gif, ...) it is decoded with hardware acceleration and played, looping, as the lock background, reusing the existing cover-fit, blur, crossfade and color-fallback paths.