swww icon indicating copy to clipboard operation
swww copied to clipboard

animated webp are not working properly (the transition is done but actual animation is not working)

Open bohanubis opened this issue 1 year ago • 7 comments

output.txt rename the file into output.webp or something than swww img ouput.webp transition works but the actual image animation doesn't

bohanubis avatar Apr 04 '24 19:04 bohanubis

https://github.com/LGFae/swww/assets/77834479/f3982d11-f822-4914-8cf0-413aad883b65

a video that pretty much explains everything

bohanubis avatar Apr 04 '24 19:04 bohanubis

I think you also mentioned you are on the latest version, 0.9.1, right?

LGFae avatar Apr 04 '24 19:04 LGFae

yes I am

bohanubis avatar Apr 04 '24 19:04 bohanubis

I honetly believe that image you've sent is simply corrupted somehow. The browser will animate, but neither imv or ffmpeg will.

If you try this animated image instead, swww seems to works fine.

EDIT: scratch that; ffmpeg and imv just don't display animated webp in general. This appears to be a mistake on the image's crate side, but I will have to investigate further.

LGFae avatar Apr 04 '24 20:04 LGFae

ohhh yeah that seems like it I guess its with the way I convert video into webp thanks this is solved I guess I will post here if I find a solution

bohanubis avatar Apr 04 '24 20:04 bohanubis

@LGFae I found the issue in ffmpeg there are two webp encoders image images coming from libwebp work seemlessly in swww but images coming in libwebp_anim show the formentioned behaviour FWIW I would say the file size difference is considerable image

so the question is (is this supposed to be supported)

bohanubis avatar Apr 04 '24 21:04 bohanubis

This would be an issue in either ffmpeg, libwebp_anim, or possibly even in the rust image crate, but not here. You'd have to investigate further to figure it out. Seems like a bit of a pain to be honest. I'd recommend just using the larger file and calling it a day.

Alternatively, have you tried generating an APNG image? Maybe the size will be smaller.

LGFae avatar Apr 05 '24 17:04 LGFae