[ADD] animated video player func for the wallpaper script - #35
Open
lebgdu543 wants to merge 2 commits into
Open
Conversation
Refactor wallpaper script for improved functionality Need to install `mpvpaper` yay -S mpvpaper-git
Removed redundant pkill command for mpvpaper before playing video.
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 Video Wallpaper Support
Summary
Extended the wallpaper script to support video files (
.mp4,.mkv) in addition to static images (.jpg,.jpeg,.png,.gif).Changes Made
Extended file format support - Updated the
findcommand to include.mp4and.mkvfiles alongside existing image formatsGenerated video thumbnails - Created a
generate_video_thumbnail()function that:ffmpegto extract the first frame from each video at 1 second~/.cache/wallpaper_thumbnails/to avoid regenerating themUpdated menu display - Modified
menu()to:img:prefix that wofi uses for image previewsVideo playback - Added video file detection in
main()that:mpvpaperto play videos as animated wallpapers on Waylandwal, so color schemes still update properlyMaintained existing functionality - Static images continue to use
awww imgas before, with no impact to the original workflowDependencies
ffmpeg- for thumbnail generationmpvpaper- for playing videos as wallpapersTesting
Videos now appear in the wallpaper selector with thumbnails and play as animated backgrounds while maintaining automatic color scheme generation.
Feel free to adjust the tone or detail level!
build with
claude-haiku-4.5:duck.ai-> https://nc.eren.ynh.fr/s/kMFA2q2SGob87tY