Safest way to install latest stable ffmpeg (>= 4.3) on Ubuntu 20.04 (ppa not working)?

I'm trying to use ffmkv, which requires a version of ffmpeg that supports zscale.

Their README says this is the default under 18.04, but my version under 20.04 is 4.2.4-1ubuntu0.1, which doesn't seem to include zscale support.

If I run apt-get install ffmpeg, it says ffmpeg is already the newest version (7:4.2.4-1ubuntu0.1). but it's clear from ffmpeg.org that the current stable release is 4.3.2-0.

I tried adding ppa:jonathonf/ffmpeg-4 to pick up the latest, but that fails to update ("doesn't have a Release file").

What's the safest way to update it? Ideally, there's a PPA that will work, that my googling hasn't surfaced. Or, should I be downloading that ffmpeg_4.3.2-0+deb11u2ubuntu1_amd64.deb file and installing it with dpkg?

I'm always paranoid about side-channel installing anything, especially when it involves anything to do with Video. What's the best "won't break future system APT updates" way to install the current stable ffmpeg?


Solution 1:

There are other PPAs with newer ffmpeg. The most recent is FFmpeg 4 - media tool (Xenial & newer) from Rob Savoury. To add this PPA to your system use commands below:

sudo add-apt-repository ppa:savoury1/ffmpeg4
sudo apt-get update
sudo apt-get install ffmpeg

As the result you will get the version with --enable-libzimg compile flag and ffmkv will not complain about "HDR to SDR conversion or resolution changes".

Note: you can search PPAs by yourself using special local application named Y PPA Manager, .

Solution 2:

Simple solution

  1. Download an already compiled ffmpeg from johnvansickle.com. zscale support is included.
  2. Place the downloaded ffmpeg into your PATH by moving the downloaded ffmpeg into /usr/local/bin or ~/bin (re-login or run source ~/.profile if you move it into ~/bin).

This will not interfere with any system files or other packages. To uninstall simply delete the ffmpeg file.

I'm not a big fan of PPAs. They can be messy, are often overkill, and can cause problems by interfering with the package management system.