Extracting Animated Webp

1628 views
Skip to first unread message

Julian Lugod

unread,
Aug 18, 2017, 10:05:26 AM8/18/17
to WebP Discussion
Hi, noob question. How do I extract all sequential frames  from an Animated Webp to PNG. 

Vincent Rabaud

unread,
Aug 21, 2017, 12:12:47 PM8/21/17
to webp-d...@webmproject.org
Hi Julian,

what you are looking for is the webpmux utility in the examples folder: https://developers.google.com/speed/webp/docs/webpmux

The following example is given to get the 2nd frame from an animated WebP file:

webpmux -get frame 2 anim_container.webp -o frame_2.webp

On Fri, Aug 18, 2017 at 4:05 PM, Julian Lugod <anamar...@gmail.com> wrote:
Hi, noob question. How do I extract all sequential frames  from an Animated Webp to PNG. 

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss+unsubscribe@webmproject.org.
To post to this group, send email to webp-d...@webmproject.org.
Visit this group at https://groups.google.com/a/webmproject.org/group/webp-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.

Pascal Massimino

unread,
Aug 28, 2017, 10:10:04 AM8/28/17
to WebP Discussion
Hi,

On Mon, Aug 21, 2017 at 6:12 PM, Vincent Rabaud <vincent...@gmail.com> wrote:
Hi Julian,

what you are looking for is the webpmux utility in the examples folder: https://developers.google.com/speed/webp/docs/webpmux

The following example is given to get the 2nd frame from an animated WebP file:

webpmux -get frame 2 anim_container.webp -o frame_2.webp

Actually, this will save the raw .webp data, which may not be what you expect. In particular, it will
not reconstruct the frames (taking the DISPOSE method into account).

It's actually relatively easy to reconstruct and extract the frames with the API. This is what the
small tool 'anim_diff' is doing, for instance. But using anim_diff to dump frames, even if possible,
feels a bit awkward.

So, out of simplicity, i just went ahead and quickly coded a small tool to call the API and dump
the reconstructed frames from an animation. It's called 'anim_dump', and the patch is here:


You just need to call './examples/anim_dump my_anim.webp' to get the frames 'dump_xxxx.png'.

hope it helps,
skal/

Phil Warren

unread,
Nov 8, 2022, 4:25:44 AM11/8/22
to WebP Discussion, pascal.m...@gmail.com
Hello,

Was curious how to apply the patch?  New to this, thank you in advance!

On Monday, August 28, 2017 at 7:10:04 AM UTC-7 pascal.m...@gmail.com wrote:
Hi,

On Mon, Aug 21, 2017 at 6:12 PM, Vincent Rabaud <vincent...@gmail.com> wrote:
Hi Julian,

what you are looking for is the webpmux utility in the examples folder: https://developers.google.com/speed/webp/docs/webpmux

The following example is given to get the 2nd frame from an animated WebP file:

webpmux -get frame 2 anim_container.webp -o frame_2.webp

Actually, this will save the raw .webp data, which may not be what you expect. In particular, it will
not reconstruct the frames (taking the DISPOSE method into account).

It's actually relatively easy to reconstruct and extract the frames with the API. This is what the
small tool 'anim_diff' is doing, for instance. But using anim_diff to dump frames, even if possible,
feels a bit awkward.

So, out of simplicity, i just went ahead and quickly coded a small tool to call the API and dump
the reconstructed frames from an animation. It's called 'anim_dump', and the patch is here:


You just need to call './examples/anim_dump my_anim.webp' to get the frames 'dump_xxxx.png'.

hope it helps,
skal/
On Fri, Aug 18, 2017 at 4:05 PM, Julian Lugod <anamar...@gmail.com> wrote:
Hi, noob question. How do I extract all sequential frames  from an Animated Webp to PNG. 

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.

James Zern

unread,
Nov 8, 2022, 9:19:54 PM11/8/22
to webp-d...@webmproject.org
Hi,

On Tue, Nov 8, 2022 at 1:25 AM Phil Warren <jagge...@gmail.com> wrote:
Hello,

Was curious how to apply the patch?  New to this, thank you in advance!

That patch landed quite some time ago [1]; anim_dump has been available since v0.6.1.

Gerrit offers various ways to download the diff, though. Click on the overflow menu (3 vertical '.'s) in the upper right corner (or hit the 'd' key) to see some ways to download using git or via an archive.

 
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages