Is there any tool or script for batch converting animated webp images?
I want to create animated thumbnails from my animated webp images:
- resize image size
- reduce quality (lossy compression)
- reduce frame rate
I tried tools like ImageMagick, but they cannot change the frame rate.
ffmpeg can't decode animated WebP
See #4907: Support decoding animated WebP images.
Use another tool, such as
anim_dump, to extract the WebP frames. See How can I convert an animated WebP to a WebM? for more info and examples.Once you have the frames you can use
ffmpeg.Example
10 fps, half size:
To encode WebP,
ffmpegmust be compiled with--enable-libwebp.resize image size
Use the scale filter.
reduce quality (lossy compression)
-qualityoption for the encoder libwebp. Range is 0-100. Default is 75.-presetoption to match the content type.See
ffmpeg -h encoder=libwebpfor more options and info.reduce frame rate
Use the fps filter or the
-roption.