4

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

BENN XII
  • 41
  • 1
  • 2
  • What error are you getting? A recent [post](https://stackoverflow.com/questions/18123376/webm-to-mp4-conversion-using-ffmpeg) indicates that some conversions are supported. – harrymc Nov 22 '21 at 09:39
  • Please have have a look at the above link. – harrymc Nov 22 '21 at 19:35

2 Answers2

2

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.

Ricardo Bohner
  • 3,903
  • 2
  • 18
  • 12
1

Not supported by FFmpeg yet:

#4907: Support decoding animated WebP images

Anurag
  • 111
  • 3