Install FFmpeg 7.0 via PPA in Ubuntu 22.04 | Ubuntu 24.04

FFmpeg announced new major 7.0 release yesterday! Here’s how to install it in Ubuntu 22.04, Ubuntu 24.04, Linux Mint 21.

The new version of this popular multi-media library came with name “Dijkstra”. It features native decoding support for VVC (aka H.266) through the libavcodec library, though it’s so far experimental.

The libavformat library can now read and write IAMF (Immersive Audio) files. And, a new -stream_group option is added into CLI tool to configure the IAMF structure.

As announced at the end of last year, the CLI (command-line) tool now is multi-threaded. Meaning, the transcoding process now runs in parallel that can be much faster than before.

FFmpeg 7.0 in Ubuntu MATE 22.04

FFmpeg 7.0 also introduced encoding support for DXV DXT1, decoding support for LEAD MCMP and QOA audio, as well as both encoding and decoding support for MPEG-5 Essential Video Coding (EVC).

The release also includes aap, tiltandshift, qrencode filter and qrencodesrc source, quirc, fsync filter, showinfo bitstream filters, and supports for reading QOA, DVD-Video, and writing AEA, Raw Captions with Time (RCWT) closed caption.

There are as well RISC-V optimizations for AAC, FLAC, JPEG-2000, LPC, RV4.0, SVQ, VC1, VP8, and more, Loongarch optimizations for HEVC decoding, and important AArch64 (arm64) optimizations for HEVC.

Other changes include:

  • demuxing, decoding, filtering, encoding, and muxing in the ffmpeg CLI now all run in parallel.
  • enable gdigrab device to grab a window using the hwnd=HANDLER syntax
  • D3D12VA hardware accelerated H264, HEVC, VP9, AV1, MPEG-2 and VC1 decoding
  • HDR10 metadata passthrough when encoding with libx264, libx265, and libsvtav1
  • Support for Ambient Viewing Environment metadata in MP4/ISOBMFF
  • Support for HEIF/AVIF still images and tiled still images
  • Support PacketTypeMetadata of PacketType in enhanced flv format
  • ffplay with hwaccel decoding support
  • Change the default bitrate control method from VBR to CQP for QSV encoders.
  • removed deprecated ffmpeg CLI options -psnr and -map_channel

How to Install FFmpeg 7.0 in Ubuntu

NOTE: FFmpeg is an IMPORTANT library that many graphical apps depend on it. Update FFmpeg MAY run into dependency issue and cause other issues! You MUST know what you’re going to do, and use the PPA at your own risk!!!

Besides building the media library from the source tarball, I’ve upload the new release packages into this unofficial PPA for Ubuntu 24.04 (still on the way, please wait) and Ubuntu 22.04 on x86_64 and arm64 platforms.

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

sudo add-apt-repository ppa:ubuntuhandbook1/ffmpeg7

Type user password (no asterisk feedback, just type in mind) when it asks and hit Enter to continue.

2. Ubuntu now auto-refresh system package while adding PPA, but some Ubuntu based system may NOT. Just in case, you can run the command below to do the refresh manually:

sudo apt update

3. Finally, run the command below to either install or upgrade to FFmpeg 7.0:

sudo apt install ffmpeg

Though it’s HIGHLY recommend to run sudo apt upgrade to update all the packages to the latest versions, to avoid in-completed installation.

4. After installation, run the command below in terminal to verify:

ffmpeg --version

The package in this PPA is backported from Deb Multimedia repository, with few modifications due to different dependency packages between Debian and Ubuntu.

If you found missing features, feel free to leave comment below, I’ll try to update if possible!

How to Downgrade FFmpeg:

In case you want to downgrade the FFmpeg library to the stock version available in system repository. Open terminal and run command:

sudo apt install ppa-purge && sudo ppa-purge ppa:ubuntuhandbook1/ffmpeg7

NOTE: Keep an eye in terminal output before answering yes to confirm! It MAY remove some other useful app packages, though it should be able to install them back later.