Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active November 5, 2021 14:40
Show Gist options
  • Save plembo/9573f12a8a076062e9fa4765f3f2bfa7 to your computer and use it in GitHub Desktop.
Save plembo/9573f12a8a076062e9fa4765f3f2bfa7 to your computer and use it in GitHub Desktop.
Latest ffmpeg on Ubuntu 18.04 LTS

Installing the latest ffmpeg on Ubuntu 18.04 LTS

The version of ffmpeg that ships with Ubuntu 18.04 LTS is hopelessly old. If you find yourself working with this tool often, you'll probably want to get the latest version. There are two ways to go here: precompiled binaries or a PPA, although you may find yourself having to use the latter because a packaged ffmpeg is a dependency for other packages you want to install.

Precompiled binaries

I've been using John VanSickle's precompiled static binaries for Linux since forever:

https://johnvansickle.com/ffmpeg/

As John recommends, use the "git master" build for your platform (for most of us that's amd64).

https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz

The builds come archived as tar.xz, decompress with:

$ tar xJf ffmpeg-git-amd64-static.tar.xz

To install, cd into the ffmpeg-git-amd64-static directory and copy the binaries into /usr/local/bin:

$ cd ffmpeg-git-amd64-static
$ sudo cp ff* /usr/local/bin
$ sudo cp qt* /usr/local/bin

You should also make the vmaf filter available:

$ sudo cp -r models /usr/local/share/

By default, Ubuntu will find and run binaries from /usr/local/bin before /usr/bin. As a result, you can safely install these static binaries to /usr/local/bin without disturbing the shipping package installation (which may be a dependency for other things on your system). So before trying to remove the shipping package, run "apt remove --purge ffmpeg" and check the out put carefully before confirming.

PPA

Information on the ffmpeg-4 PPA for Ubuntu can be found here:

https://launchpad.net/~jonathonf/+archive/ubuntu/ffmpeg-4

This PPA is well maintained and will keep all the relevant libraries up to date. While I actually prefered the binaries, I've come to rely on this PPA because an ffmpeg package is a dependency for other packages I use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment