Video, audio, convert, extract – once, these tasks were easy with QuickTime Pro, but now it’s gone. ffmpeg to the rescue – any OS, no money required.

It’s Friday, some deadlines (or the weekend) are looming, so seems as good a time as any to share this.

ffmpeg is a free, powerful tool for Mac, Windows, and Linux, with near magical abilities to convert audio and video in all sorts of ways. Even though it’s open source software with a lineage back to the year 2000, it very often bests commercial tools. It does more, better, and faster in a silly number of cases.

There’s just one problem: getting it to solve a particular task often involves knowing a particular command line invocation. You could download a graphical front end, but odds are that’ll just slow you down. So in-the-know media folks invariably make collections of little code bits they find useful.

Coder Jean-Baptiste Jung has saved you the trouble, with a cheat sheet of all the most useful code. And these bear striking resemblance to some of the stuff you used to be able to do in QuickTime Pro before Apple killed it.

19 FFmpeg Commands For All Needs [CatsWhoCode]

And on GitHub:

There are some particularly handy utilities there involving audio, which is where tools like Adobe’s subscription-only commercial options often fail. (Not to mention Adobe is proving it will cut off some localities based on politics – greetings, Venezuelan readers.)

It’s great stuff. But if you see something missing, put it here, and we’ll make our own little CDM guide.

More invaluable cheat sheets

We have a winner:

The above is great for a browse, but with everything covered and an interactive guide, you can’t beat this: – by

Thanks to reader Jim Bell for the tip!

One alternative resource: for community-sourced command line recipes, check commandlinefu, which has a bunch of ffmpeg-related ones (and community up-voting):

Thanks to reader Lenny Mastrototaro for the tip.

Wait, wait, there’s more!

If you’re working with audio, sox – also free and open source and command line – covers some of the areas ffmpeg misses. Thanks to comments for the reminder; I use this all the time.

It also works on Mac, Windows, and Linux – meaning you only need one tool. An in fact, someone has done a cheat sheet for it, too:

A three-platform alternative to ffmpeg is MP4Box. I’d have to do a precise breakdown to work out which capabilities are specific to each MP4Box and ffmpeg, but since they’re both free, you can install them side by side and be ready for any situation. (It might even be worth keeping these on a USB key for emergencies.)

MP4Box isn’t normally downloaded separately but as part of the GPAC open media framework:

Now, they have mercifully integrated all their recipes directly into the documentation, so you don’t need a separate cheat sheet:

Why not use a GUI?

It seems I’m getting this question a lot. I’m not anti-GUI or some kind of command line ninja by any stretch of the imagination. But a GUI causes four problems:

Functionality. The GUI front ends for tools like ffmpeg don’t always cover its full set of features, and they may not be as up to date as the direct ffmpeg build (since they’re maintained separately and unofficially).

Portability. Some of the GUIs are not cross-platform. With the command line, a single workflow works on every OS. And you can even use them on a machine that doesn’t have a windowing environment loaded. Front ends also are more likely to encounter OS version conflicts than command lines.

Scriptability. Command line tools are almost always more easy to script and automate – and again, I’m no ninja; this stuff is sort of Google/DuckDuckGo/StackExchange-able in a few minutes.

Speed. Because of the nature of transcoding, it may well be easier to copy-paste a solution from above than it is to learn how each GUI works and where it has hidden the feature you need. Again, I’m not anti-GUI, but this is a pretty particular use case that really fits the command line. Literally, I bet you could have solved your problem and transcoded in the time it took you to read this section.

There’s just one tool I recommend for cross-platform GUI operation, and that’s the excellent Handbrake. (Some mishaps with VLC have proven to me that it’s a decent player, but not a great transcoder/utility.) Shutter Encoder is new to me, but it has one major advantage as a GUI – it has some previewing capability. Mac/Windows only, though.

More tips? Keep them coming.