6

Goal :

  • convert Webp to mp4

what i have tried :

ffmpeg -i filename.webp filename.mp4

it's clearly not the good code. can anyone show me the way it can be with anything like imagemagick, sharp

1 Answers1

4

I guess you would have to use 2 programas like imagemagick + ffmpeg

First you extract the frames using imagemagick:

magick input.webp frames.png

Then you use ffmpeg to build an mp4 video from the extracted frames:

ffmpeg -r 25 -i frames-%0d.png -c:v libx264 -pix_fmt yuv420p "out.mp4"

For -r ## you specify the desired framerate...animated webp images don't have any sound but I guess you know that.