Introduction
FFmpeg is a command-line tool that records, transcodes, mixes, formats, and streams multimedia content. This cross-platform framework is open-source and shares audio and video libraries with users for free.
In this tutorial, you will learn how to install FFmpeg on Ubuntu using two methods.

Prerequisites
Install FFmpeg on Ubuntu with apt
The FFmpeg package is included in the Ubuntu repositories, though it may not always be the latest version. The apt command provides a simple and convenient way to install it.
Take the following steps to install FFmpeg using the APT package manager.
Step 1: Update the Repository
Update the system package repository to get the most recent FFmpeg version. Run the following command:
sudo apt update

Step 2: Install FFmpeg
After upgrading the repository, install FFmpeg with:
sudo apt install ffmpeg
Step 3: Verify the Installation
Confirm the FFmpeg installation was successful:
ffmpeg -version
The command verifies the 6.1.1 version of FFmpeg is on the system. The 6.1.1 is the latest stable FFmpeg version in the Ubuntu repositories at the time of writing this article. However, apps in Ubuntu repositories are not always up-to-date.
Therefore, to make sure you have the FFmpeg latest version, use the Snap package manager.
Install FFmpeg on Ubuntu with Snap
Snap packages bundle an application and its dependencies into a self-contained package that works across all Linux distributions. Unlike the FFmpeg packages in Ubuntu's official repositories, Snap updates automatically and continuously, ensuring users always have the latest version.
Take the following steps to install FFmper using Snap.
Step 1: Install Snap
Check whether the Snap package manager is already installed on the system with:
snap version
The output verifies Snap is installed. However, if Snap is not installed, follow these steps:
1. Update the repository with:
sudo apt update && sudo apt upgrade
2. Install Snap with:
sudo apt install snapd
3. Verify the installation using:
snap version
Step 2: Install FFmpeg
To install FFmpeg, run:
sudo snap install ffmpeg
Note: If you previously installed FFmpeg using apt, uninstall the tool, restart the system, and then use snap to install FFmpeg again.
Step 3: Verify the Installation
To verify FFmpeg is installed, run:
ffmpeg -version
Conclusion
This tutorial explained how to install FFmpeg using two different methods. Next, learn about the differences between Snap, Flatpack, and AppImage package formats.
If you are a Windows user, read our tutorial and learn how to install FFmpeg on Windows, and if you are a Mac user, learn how to install FFmpeg on MacOS.