4

Are there any examples on how to encode animated WebP for Android,

or maybe someone was successful and can guide me through it?

I have a batch of webP images, and I want to create an animated one from them,

There is the libwebp library, however, it does not support animated webP, If I understood correctly from what I read, I need to use 'webpmux' and I have no idea how to integrate and use it.

I saw this post from 08/11, it's not relevant for me because I need to create an animated webP, not a single one.

Even if there is any GIF to webP library, that's good enough.

Thanks in advance, any help will be greatly appreciated!

Nirel
  • 1,855
  • 1
  • 15
  • 26

1 Answers1

0

Amongst its many capabilities, ffmpeg will encode a series of PNGs as a webp animation with alpha.

In this eample, files 0001.png to XXXX.png, where all the images are the same size.

ffmpeg -i %04d.png animation.webp
  • OK, I'll check it out, how can I use it in android application? How can I use ffmpeg to convert gif to webp? – Nirel May 24 '19 at 08:14
  • check out [FFmpeg for Android](https://sourceforge.net/projects/ffmpeg4android/), yes it will convert gif to webp, but as gif is limited to 256 colors, and webp has 32bit color depth, so encoding from the original the images will look better. – pixelwhisperer May 24 '19 at 17:20