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

2
  • What error are you getting? A recent post indicates that some conversions are supported.
    – harrymc
    Nov 22, 2021 at 9:39
  • Please have have a look at the above link.
    – harrymc
    Nov 22, 2021 at 19:35

2 Answers 2

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.

1
  • 2
    If you have an old version of imagemagick the command is convert instead of magick
    – LatinSuD
    Sep 3, 2022 at 17:35
1

Not supported by FFmpeg yet:

#4907: Support decoding animated WebP images

5
  • 1
    You copy-pasted an entire answer. It would have been nice to give the original author some credit.
    – harrymc
    Nov 22, 2021 at 9:26
  • oops, do you know any alternatives?
    – BENN XII
    Nov 22, 2021 at 10:40
  • @harrymc it is not a solution. Just a link to a ticket. If it was a unique answer would surely give credit.
    – Anurag
    Nov 22, 2021 at 16:45
  • 1
    @BENNXII there are online tools availabe like ezgif.com/webp-to-mp4. Have you tired them?
    – Anurag
    Nov 22, 2021 at 16:51
  • @Anurag.k The online tool worked for me. This could be an answer post.
    – Flimm
    Jul 11, 2022 at 13:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .