HomeThe ClassicsFarai's Codelab

How To Convert Animated WebP Images to Videos

Published:

I’m working on a post comparing various video and animated image formats using a tool called vmaf. To use it, I need to make the encoded media lossless so that vmaf can evaluate it. When it comes to animated webp images, ffmpeg couldn’t convert them into video.

In order to turn an animated webp into a video, do the following.

  1. Get/Compile the builds
  2. run anim_dump <image> -prefix <output_dir>
  3. ffmpeg -framerate 25 -i dir/dump_%04d.tiff <settings> output.

Note that this merely extracts an animated webp’s frames and turns them into a video with a set frame rate. WebPs allow frames to be displayed for varying length. I don’t know how to extract that information, let along pass it to ffmpeg so I’ll update this post once I figure it out.