Quantcast

Convert gif to mp4 using ffmpeg

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Convert gif to mp4 using ffmpeg

aris sirajawali
Hello Everyone,

I need to know how to convert gif to mp4 using ffmpeg best quality results ?
please advise :)

Thanks
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert gif to mp4 using ffmpeg

Moritz Barsnick
On Thu, Mar 10, 2016 at 16:20:23 +0700, aris wrote:
> I need to know how to convert gif to mp4 using ffmpeg best quality results ?

Using the image2 demuxer:
https://www.ffmpeg.org/ffmpeg-formats.html#image2-1

Something like
$ ffmpeg -framerate 25 -pattern_type glob -i "*.gif" out.mp4

You may need to play with the quality settings, e.g. "-crf" if your
ffmpeg supports libx264, or "-q:v" for the mpeg4 codec.

(Did you mean mp4 container with such a file extension, or the mpeg4
codec?)

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert gif to mp4 using ffmpeg

aris sirajawali
Hi barsnick,

Thanks for advice, I've tried running the following command, but I get an
error as follows:

./ffmpeg -framerate 25 -pattern_type glob -i
/root/video-source/gif/yeay.gif /root/video-source/gif/outgif/outyeay.mp4
                            ffmpeg version 2.6.git Copyright (c) 2000-2015
the FFmpeg developers
  built with gcc 4.7 (Debian 4.7.2-5)
  configuration: --prefix=/root/ffmpeg_build
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl
--enable-libass --enable-libfdk-aac --enable-libfreetype
--enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
  libavutil      54. 26.101 / 54. 26.101
  libavcodec     56. 41.101 / 56. 41.101
  libavformat    56. 34.100 / 56. 34.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Option framerate not found.

please help and input

On Thu, Mar 10, 2016 at 4:34 PM, Moritz Barsnick <[hidden email]> wrote:

> On Thu, Mar 10, 2016 at 16:20:23 +0700, aris wrote:
> > I need to know how to convert gif to mp4 using ffmpeg best quality
> results ?
>
> Using the image2 demuxer:
> https://www.ffmpeg.org/ffmpeg-formats.html#image2-1
>
> Something like
> $ ffmpeg -framerate 25 -pattern_type glob -i "*.gif" out.mp4
>
> You may need to play with the quality settings, e.g. "-crf" if your
> ffmpeg supports libx264, or "-q:v" for the mpeg4 codec.
>
> (Did you mean mp4 container with such a file extension, or the mpeg4
> codec?)
>
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert gif to mp4 using ffmpeg

Michael Koch
> Thanks for advice, I've tried running the following command, but I get an
> error as follows:
>
> ./ffmpeg -framerate 25 -pattern_type glob -i
> /root/video-source/gif/yeay.gif /root/video-source/gif/outgif/outyeay.mp4

Do you have many gif images, or do you have one animated gif?
The answer from Moritz was for many gif images.

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert gif to mp4 using ffmpeg

Moritz Barsnick
In reply to this post by aris sirajawali
On Thu, Mar 10, 2016 at 17:01:31 +0700, aris wrote:
> Thanks for advice, I've tried running the following command, but I get an
> error as follows:
>
> ./ffmpeg -framerate 25 -pattern_type glob -i
> /root/video-source/gif/yeay.gif /root/video-source/gif/outgif/outyeay.mp4

(That version is a bit old.)

You only have a single animated gif? Ah, you didn't say so. You always
have to be very specific on what you have and what you are trying to
achieve. Multimedia processing is a wide and complex field, and there
are so many things you could be meaning.

To convert an animated git, it's probably sufficient to do
$ ffmpeg -i yeay.gif outyeay.mp4

You do need to read some introductions on ffmpeg. :-)

(And you need to stop working as root.)

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert gif to mp4 using ffmpeg

zoyasikdh3r
This post has NOT been accepted by the mailing list yet.
In reply to this post by aris sirajawali
You may choose from several websites available in the web. Website like Convert.world and zamzar can do this in a speedy manner. My fav. is Convert.world. It has such a great interface and does the job in No Time.
Loading...