Animated WebP

Started by ejball, May 07, 2014, 01:59:08 PM

Previous topic - Next topic

ejball

It isn't a high priority for us at this point, but one file format that exiftool doesn't appear to support (as of 9.59) is Animated WebP.

Sample image: http://downloads.webmproject.org/webp/images/dancing_banana2.lossless.webp
Source: https://developers.google.com/speed/webp/faq (near the bottom)

Phil Harvey

Why do you say it isn't supported?  ExifTool reads this file and sould extract any metadata if some existed.

- Phil

Edit:  Ah, I guess I could be decoding the VP8X chunk to get the ImageWidth/ImageHeight.  But there isn't much else that would be useful to decode from this file.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ejball

Yes, the image size would be great, akin to what exiftool extracts from non-animated WebP files, e.g. those found here: https://developers.google.com/speed/webp/gallery2

Animation metadata (especially duration) would also be useful to us, akin to what exiftool extracts from animated GIFs and WebM files.


Phil Harvey

#3
Looking at the spec, I would have to add up the durations of each individual frame to calculate the Duration.  Too much work.

But I should add support for their version of XMP.  Apparently they use a different chunk name than other RIFF formats (stupid), although I haven't seen a sample containing XMP yet.

- Phil

Edit:  I looked at the GIF code, and it sums the durations of each frame, so I should really do this for WebP too.  I figured out a way to do this without having to patch the parsing code like I did for GIF, so it won't be too much work after all.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ejball

That's great, thanks!