Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support other animated wallpaper formats #171

Open
nametable opened this issue Sep 17, 2023 · 6 comments
Open

Support other animated wallpaper formats #171

nametable opened this issue Sep 17, 2023 · 6 comments

Comments

@nametable
Copy link

It seems like most places that provide animated wallpapers are providing mp4 downloads rather than gif. Is it feasible to add support for mp4/webm/etc?

Or is there a performance reason for using gif, in which case the best solution would be to convert mp4/webm to gif?

@LGFae
Copy link
Owner

LGFae commented Oct 2, 2023

Decoding mp4 would increase our dependencies significantly. Maybe I will be able to do something about it by changing from the image crate to a system dependency on ffmpeg. That would let us support mp4, but it would take a while for me to implement, I believe.

@nonetrix
Copy link

Also it uses CPU currently to my understanding as well, so GPU decoding would be ideal for cards that actually support it well unlike mine (thanks AMD real cool)

@LGFae
Copy link
Owner

LGFae commented Nov 30, 2023

I mean, we only decode once, in the client (we read all frames at once). If we were to support entire videos, then yeah, we would probably need the GPU to do stream decoding, but that would never be the goal (there's mpvpaper for that). Even if we were to support mp4, it would only be for small short videos, if anything.

Right now, the best way to use animated wallpapers would be gifs that don't change a lot. This was on purpose, since those are the type of images I believe work best as wallpapers. I have no intention of having great support for absolutely any kind of video, since that would be very hard (because we wouldn't be able to read all frames of a long video at once -- too much memory usage) and increase our dependencies.

So I don't think CPU decoding is a problem; swww doesn't really have to be that fast at decoding.

@KAGEYAM4
Copy link

@LGFae Do you have some automation setup for -> getting wallpapers/gifs > rotating through them > deleting old ones > loop

Any resource you can point for gifs?

@NaiveInvestigator
Copy link

I have found this awesome tool which converts mp4s into gifs fairly well! It is not a solution but atleast it works for now:
https://github.com/ImageOptim/gifski

Do you have some automation setup for -> getting wallpapers/gifs > rotating through them > deleting old ones > loop

I dont have anything that complex, but i do have a simple script which just cycles randomly in my wallpaper dir

#!/bin/bash

# Get a random file from ~/Pictures
random_file=$(find ~/Pictures -type f -follow | shuf -n 1)

# Check if a file was selected
if [[ -z "$random_file" ]]; then
    echo "No files found in ~/Pictures directory"
    exit 0
fi

# Execute swww with the random file
swww img "$random_file"

@KAGEYAM4
Copy link

KAGEYAM4 commented Mar 6, 2024

I have found this awesome tool which converts mp4s into gifs fairly well! It is not a solution but atleast it works for now: https://github.com/ImageOptim/gifski

Do you have some automation setup for -> getting wallpapers/gifs > rotating through them > deleting old ones > loop

I dont have anything that complex, but i do have a simple script which just cycles randomly in my wallpaper dir

#!/bin/bash

# Get a random file from ~/Pictures
random_file=$(find ~/Pictures -type f -follow | shuf -n 1)

# Check if a file was selected
if [[ -z "$random_file" ]]; then
    echo "No files found in ~/Pictures directory"
    exit 0
fi

# Execute swww with the random file
swww img "$random_file"

anything for automating gettings images/videos/gifs ( mostly gifs )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants