FFmpeg is an essential open-source tool for anyone working with audio and video files. It allows you to convert, edit, and stream multimedia files seamlessly. If you’re a Linux user, installing FFmpeg can be done quickly using either your package manager or by building it from source. In this guide, we will walk you through all the steps to install FFmpeg on Linux distribution.
Let’s dive into how you can get FFmpeg up and running on your Linux system in no time!
What is FFmpeg?
FFmpeg is a free software project that provides a comprehensive suite of tools to handle multimedia files. It’s widely used for video and audio conversion, file compression, streaming, and editing tasks. FFmpeg supports nearly every multimedia format, making it incredibly versatile for handling various file types.
Some of the features that make FFmpeg indispensable include:
- Conversion: Convert media files from one format to another (e.g., MP4 to MKV, MP3 to WAV).
- Editing: Trim, cut, and join videos, as well as modify resolutions and frame rates.
- Streaming: Broadcast live media streams or record from different sources.
- Compression: Reduce file sizes without significant quality loss.
FFmpeg is available for all major operating systems, and in this guide, we’ll show you how to install it on your Linux system.

How to Install FFmpeg on Linux Using Package Managers?
Most Linux distributions come with FFmpeg packages available in their default repositories. The easiest way to install FFmpeg is through your package manager. Here’s how to do it for popular Linux distributions.
1. Install FFmpeg on Ubuntu/Debian-based Systems
On Ubuntu and other Debian-based distributions, FFmpeg can be installed easily using the apt package manager.
Step 1: Update Your Package List
Open a terminal window and update the package list to ensure you have the latest repository information:
sudo apt update
Step 2: Install FFmpeg
After updating your package list, run the following command to install FFmpeg:
sudo apt install ffmpeg
This command will download and install FFmpeg along with its dependencies.
Step 3: Verify the Installation
To check if FFmpeg is installed correctly, run the following command:
ffmpeg -version
This will display the version of FFmpeg installed on your system.
2. Install FFmpeg on Fedora
If you’re using Fedora, FFmpeg can be installed using the dnf package manager.
Step 1: Install FFmpeg
To install FFmpeg on Fedora, open a terminal and run:
sudo dnf install ffmpeg
Step 2: Verify the Installation
Check the FFmpeg version to confirm it’s properly installed:
ffmpeg -version
3. Install FFmpeg on Arch Linux
On Arch Linux, FFmpeg can be installed using the pacman package manager.
Step 1: Install FFmpeg
Run the following command to install FFmpeg:
sudo pacman -S ffmpeg
Step 2: Verify the Installation
Once installed, verify the installation with:
ffmpeg -version
How to Install FFmpeg on Linux by Building from Source?
While using the package manager is the easiest method, you may want to build FFmpeg from source to get the latest version or customize your installation. Here’s how to do it:
Step 1: Install Dependencies
Before building FFmpeg from source, you’ll need to install some dependencies. Open a terminal and install the necessary libraries using the following commands (for Ubuntu/Debian-based systems):
sudo apt update
sudo apt install autoconf automake build-essential libtool pkg-config
sudo apt install libx264-dev libx265-dev libvpx-dev libfdk-aac-dev
For other Linux distributions, you can find equivalent packages using your package manager.
Step 2: Download FFmpeg Source Code
Now, you’ll need to download the FFmpeg source code. Navigate to the FFmpeg download page and get the latest stable release.
Alternatively, you can download it directly via git:
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
Step 3: Configure and Build FFmpeg
Run the following commands to configure the build process:
./configure --enable-gpl --enable-nonfree --enable-libx264 --enable-libx265 --enable-libvpx --enable-fdk-aac
This configuration enables support for several important codecs. If you don’t need some of them, you can modify the configuration accordingly.
After configuring, start building FFmpeg:
make
This step might take a while, depending on your system’s performance.
Step 4: Install FFmpeg
Once the build is complete, install FFmpeg on your system:
sudo make install
Step 5: Verify the Installation
Finally, confirm that FFmpeg is installed by checking its version:
ffmpeg -version
If everything is set up correctly, this command should show you the version of FFmpeg you just compiled.
FFmpeg on Linux: Updating FFmpeg
FFmpeg regularly releases new versions that come with bug fixes, performance improvements, and new features. Here’s how you can keep your FFmpeg installation up-to-date:
- Using Package Manager: On most Linux distributions, you can update FFmpeg with the package manager. For example:
- Ubuntu/Debian:
sudo apt update && sudo apt upgrade ffmpeg
- Fedora:
sudo dnf upgrade ffmpeg
- Arch:
sudo pacman -Syu ffmpeg
- Ubuntu/Debian:
- From Source: If you installed FFmpeg from source, you can fetch the latest updates by running:
git pull ./configure --enable-gpl --enable-nonfree --enable-libx264 --enable-libx265 make sudo make install
Troubleshooting Common FFmpeg Installation Issues on Linux
- Missing Dependencies: If you receive errors during installation, it’s likely because some dependencies are missing. Make sure to install all the necessary libraries before proceeding.
- Permission Issues: If you encounter permission errors, ensure you have superuser (sudo) privileges and that you are installing FFmpeg in a directory where you have write access.
- Outdated Package Repositories: Some Linux distributions may have outdated FFmpeg versions in their default repositories. You can either add a third-party repository that offers newer versions or build FFmpeg from source.
Conclusion: Enjoy FFmpeg on Linux
FFmpeg is an essential tool for handling multimedia files, and install ffmpeg on Linux is a straightforward process. Whether you choose to use your distribution’s package manager or build FFmpeg from source for the latest features, the installation steps are simple and quick. With FFmpeg installed, you can start converting, editing, and streaming your media files with ease.
If you run into any issues, remember to check the FFmpeg documentation or community forums for solutions. Happy media processing!