can't convert online gif to mp4 video using ffmpeg

339 Views Asked by At

I am trying to turn this gif into mp4 video using ffmpeg but it is not working https://media.giphy.com/media/H7T8UdGOvOQiDf9QXj/giphy.gif

I tried this code

-i https://media.giphy.com/media/H7T8UdGOvOQiDf9QXj/giphy.gif output.mp4

also I tried this code

-f gif -i https://media.giphy.com/media/H7T8UdGOvOQiDf9QXj/giphy.gif output.mp4

in both cases it did not work.

3

There are 3 best solutions below

0
On BEST ANSWER

ffmpeg provides a helpful error:

https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled.

Solution is to enable gnutls support in ffmpeg (--enable-gnutls). Read about potential problem regarding openssl: How to enable ffmpeg openssl in Flutter.

Alternative solution is to download the GIF separately, then run ffmpeg on the local copy.

0
On

Giphy allows you to share gif as mp4. There is a "share" icon that allows you to copy the mp4 link.

0
On

In Flutter, as of today, you've to use this package in pubspec.yaml

ffmpeg_kit_flutter_https_gpl: 5.1.0

https-gpl package already has gnutls

See https://github.com/arthenica/ffmpeg-kit/wiki/Packages for more.