

Let’s break down this command and its constituent arguments. $ ffmpeg -i benji.gif -f mp4 -pix_fmt yuv420p benji.mp4 Say you have a gif of my ancient, computer illiterate pug, Benji, and you want to convert it to a video format. The easiest way to do that is to go here and find a static build for whatever platform you’re working on. To follow along you’ll need FFmpeg installed. In that light, I wrote this post to share and explain some of its functionality, especially as it relates to GIF transcoding. Maybe you can read the documentation and make some sense of it, or maybe you feel the same way about reading words as me. It’s packed with an enormous amount of functionality.

It supports the most obscure ancient formats up to the cutting edge.” “FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. For those of you who are unfamiliar, in their words: If you’ve worked with media encoding in the past decade it’s likely that you’ve come across FFmpeg. Skip the first 10 seconds of the video and make a 5 second gifĪdd -ss 10 and -t 5 to the ffmpeg command.To follow along, download media files here: - layers Optimize - : optimizes the resulting gif greatly reduces file size especially if the frames have a lot of similar images (e.g.


-t : duration specify the length of gif to create.-ss : start time offset specify the time of the video to start extracting the frames/creating the gif.You can check the help or man pages of ffmpeg and convert for more details about the available options but here are a few that I’ve found to be the most useful. Ffmpeg -i -r 10 -f image2pipe -vcodec ppm - | convert -delay 10 -loop 0 -layers Optimize.
