feat: add video and gif wallpaper support#1512
Open
sumerchoudhary78 wants to merge 2 commits into
Open
Conversation
added 2 commits
June 4, 2026 13:33
The Images filter skipped any file QImageReader couldn't read, which dropped non-image files even when they were explicitly requested via nameFilters. Treat an explicit nameFilters match as authoritative so callers can let extra file types (e.g. videos) through the Images filter.
Allow videos (mp4/webm/mkv/mov/avi/m4v) and animated gifs to be used as wallpapers alongside static images, with cross-fade, per-frame colour scheme extraction, and automatic pausing when not visible.
439c9b7 to
5ec9354
Compare
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.
Adds support for videos and animated GIFs as wallpapers, alongside the existing static images. They appear in the wallpaper picker and launcher, cross-fade in the same way images do, and drive the Material colour scheme.
Usage
Drop a video (
.mp4,.webm,.mkv,.mov,.avi,.m4v) or a.gifinto your wallpapers directory, or pick one from the wallpaper picker / launcher (>wallpaper). Nothing to configure.Two optional runtime dependencies, only needed for video (gifs need neither):
qt6-multimedia— plays the video. If missing, the wallpaper falls back to a static extracted frame instead of failing.ffmpeg— extracts a frame from the video for the colour scheme and picker thumbnails.How it works
modules/background/Wallpaper.qmlused to hold twoCachingImageslots that cross-fade. They're now generic slots that load the right renderer per file type:WallpaperVideo(VideoOutput+MediaPlayer),WallpaperAnimated(AnimatedImagefor gifs), orWallpaperImage(the existingCachingImage, unchanged). The fade/scale transition is identical.caelestiaCLI generates the colour scheme but can't read videos, so for a video a representative frame is extracted with ffmpeg (1s in, to skip fade-from-black intros, falling back to the first frame), cached under~/.cache/caelestia/wallpapers/frames/, and the CLI / colour analysis runs on that frame. Picker and launcher thumbnails reuse it; the launcher shows a movie icon for videos.FileSystemModel'sImagesfilter dropped any fileQImageReadercouldn't read, which excluded videos. It now treats an explicitnameFiltersmatch as authoritative, so the wallpaper scan can include video files (separate commit).Performance / GPU
A playing video decodes continuously, so to keep idle cost down:
AnimatedImageand pause under the same conditions.Breaking changes / side effects
qt6-multimedia, videos degrade to a static frame.~/.cache/caelestia/wallpapers/frames/.Testing
Built the plugin and ran the shell on Hyprland. Verified:
qmlformat,qml-lint-conventions.py,clang-formatandqmllintall pass.