Open SampaioLeal opened 7 months ago
Is this normal?
No, it shouldn't be.
Could you please post the swww
version you are using? Also, is that for a static image or an animation?
It's an animation (GIF) 33M
swww 0.8.2
Mmm... Does your gif have a lot of frames that change a lot? Right now we've optimized compression for animation frames for the case where they remain mostly the same from one frame to the other.
https://moewalls.com/anime/totoro-satsuki-live-wallpaper/
this is the exact animation this site provides only a mp4 file and i do some conversion to GIF using an online tool
right now i started swww and it seems way faster than yesterday, but for my surprise its using the same amount of memory
this site provides only a mp4 file and i do some conversion to GIF using an online tool
Ah, this is most certainly the problem. Mp4 to GIF conversions will sometimes add many artifacts throughout the frames. This fucks up our compression scheme because it means most of the frame will be different from the next, just in a way that humans find it hard to perceive.
From a different issue, a user reported some success using the ffmpeg
:
ffmpeg -i input.gif -filter_complex "mpdecimate,setpts=N/FRAME_RATE/TB,fps=30,scale=1920:1080,split[a][b]; [a]palettegen=stats_mode=full [palette]; [b][palette]paletteuse=dither=sierra2_4a" -an output.gif
I've tried with the gif you've linked. It is generating a gif that moves far too fast, so you may have to play around with some arguments a bit (lowering fps does not seem to make it slower, for some reason). Also, unfortunately, it seems that memory usage only went down to 700MB. Overall, this is pretty strange. I might have to investigate this particular gif
. It may be that there's just a lot of hidden variation in the pixels, in which case it is simply a bad fit for us currently.
So, i'll try other animations and maybe use this ffmpeg script Do you have any recommendations about where i can find some GIF wallpapers? Not only mp4
Is this normal? Which info should i include here so that you guys can tell if i'm doing something wrong
I'm using Fedora (sway spin) and Hyprland btw