
This is important for many video codecs which require even dimensions, such as H.264. It means to stay as close to the aspect ratio but round to an even number.

2 has a similar meaning to -1 in the scale filter. It means I want the filter to maintain the aspect ratio or proportions of the video while resizing the other dimension I specified. 1 has a special significance to the scale]( ) filter. Here's one example:Īny way you write it, I've specified that I want to scale the input video to width 480 pixels and I want the height to be -1 pixels. 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 it's 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.

For those of you who are unfamiliar, in their words:įFmpeg 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. If you've worked with media encoding in the past decade it's likely that you've come across FFmpeg.
