How to Install FFmpeg 5.0 in Ubuntu 20.04 or Ubuntu 18.04 via PPA

Last updated: February 18, 2022 — 1 Comment

The popular FFmpeg multi-media library released version 5.0 recently. Here’s how to install it in Ubuntu 20.04, Ubuntu 18.04 and/or Ubuntu 16.04 via PPA.

FFmpeg 5.0, codename “Lorentz”, is a new major release that features:

  • remove the old encode/decode APIs and replace them with an N:M-based API.
  • new easy to use AVframe-based API for libswscale.
  • remove the entire libavresample library.
  • Many new filters.
  • ADPCM IMA Westwood encoder, Apple Graphics (SMC) encoder, VideoToolbox ProRes encoder
  • ADPCM IMA Acorn Replay decoder, GEM Raster image decoder.
  • DoVi support, and more in ffmpeg.org.

Install FFmpeg 5.0 in Ubuntu:

IMPORTANT: Upgrading FFmpeg is not recommended for beginners! It may conflict with other packages in your system. Use it at your own risk!

Rob Savoury has built the FFmpeg 5.0 packages into PPA for all the current Ubuntu LTS releases. Though the updates is suspend due to lack of donations. The PPA still works, and if you find it’s useful you may help by making donations (see the previous link).

1.) Add the PPAs

Firstly, press Ctrl+Alt+T on keyboard to open a terminal window. When it opens, run command to add the PPA:

sudo add-apt-repository ppa:savoury1/ffmpeg5

Also add the FFmpeg4 PPA which contains the dependency libraries:

sudo add-apt-repository ppa:savoury1/ffmpeg4

2.) Update package cache:

If you’re running Ubuntu 18.04 or Ubuntu 16.04, you need to manually refresh the system package cache by running command:

sudo apt update

3.) Upgrade FFmpeg to 5.0:

Finally, run the command below to install all the available updates including FFmpeg 5:

sudo apt full-upgrade

NOTE: This command may remove some apps on your system due to package conflict! DO CHECK the terminal output before typing ‘y‘ to confirm installation!

When everything’s done successfully, verify via ffmpeg -version command.

How to Restore:

You may purge the two PPAs which also downgrade all the installed packages. Firstly, install the ppa-purge tool via command:

sudo apt install ppa-purge

Then purge the PPAs via the commands below one by one:

sudo ppa-purge ppa:savoury1/ffmpeg5
sudo ppa-purge ppa:savoury1/ffmpeg4

NOTE: The downgrade process may also remove some other apps. Keep an eye on terminal output before performing the action!

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to remind me outdated tutorial! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

One response to How to Install FFmpeg 5.0 in Ubuntu 20.04 or Ubuntu 18.04 via PPA

  1. Thanks for the guide, but this doesn’t work. There seems to be a missing dependency on:
    “`
    libavcodec59 : Depends: libx264-163 (>= 2:0.163.3060+git5db6aa6) but it is not installable
    “`

    see:

    “`
    $ sudo apt install ffmpeg
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    ffmpeg : Depends: libavcodec59 (= 7:5.0-2ubuntu0~20.04.sav1)
    Depends: libavdevice59 (= 7:5.0-2ubuntu0~20.04.sav1) but it is not going to be installed
    Depends: libavfilter8 (= 7:5.0-2ubuntu0~20.04.sav1)
    Depends: libavformat59 (= 7:5.0-2ubuntu0~20.04.sav1)
    E: Unable to correct problems, you have held broken packages.
    “`
    and more specifically:
    “`
    sudo apt-get install libavcodec59
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    libavcodec59 : Depends: libx264-163 (>= 2:0.163.3060+git5db6aa6) but it is not installable
    E: Unable to correct problems, you have held broken packages.
    “`

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.