How to Install FFmpeg on AlmaLinux and CentOS with RPM Fusion

You need to record, stream, or convert media files on your server, and FFmpeg is the cross-platform command line interface (CLI) tool built for the job. It works as both an audio editor and a video editor. This guide shows you how to install FFmpeg on AlmaLinux 8, 9, and 10, or on CentOS 7, using the EPEL and RPM Fusion repositories.

Whether you manage a cPanel server or an unmanaged cloud server, EPEL and RPM Fusion make it straightforward to install FFmpeg on AlmaLinux or CentOS. The EPEL (Extra Packages for Enterprise Linux) repository adds packages that these distributions don’t ship by default. RPM Fusion builds on EPEL to provide the FFmpeg packages themselves.

Important: The RPM Fusion repo for FFmpeg is behind the latest version available. For the latest FFmpeg version, install FFmpeg from source code or email InMotion Hosting’s 24/7 Live Support to request a free installation on your managed VPS or dedicated server.

Install FFmpeg on AlmaLinux

AlmaLinux 8, 9, and 10 use the same commands to install FFmpeg, because the RPM Fusion packages detect your major release automatically. Run the following steps as root or a user with sudo privileges.

  1. Log in to SSH as root or a user with sudo access.
  2. Install the EPEL repository:
sudo dnf install epel-release
  1. Enable the CRB (CodeReady Builder) repository, which most EPEL packages depend on. On AlmaLinux 8 this command enables the PowerTools repository instead:
sudo /usr/bin/crb enable
  1. Install the RPM Fusion free and nonfree repositories. RPM Fusion’s official setup command enables both:
sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm
  1. Install FFmpeg:
sudo dnf install ffmpeg ffmpeg-devel
  1. Check your FFmpeg version:
ffmpeg -version

Note: The $(rpm -E %rhel) part of the RPM Fusion command fills in your major AlmaLinux version automatically, so the exact same command works on AlmaLinux 8, 9, and 10, and on Rocky Linux. If crb enable is not found on your server, run sudo dnf config-manager --set-enabled crb on AlmaLinux 9 or 10, or sudo dnf config-manager --set-enabled powertools on AlmaLinux 8.

Install FFmpeg on CentOS 7

CentOS 7 uses YUM instead of DNF, but the pattern to install FFmpeg is the same: add EPEL, add RPM Fusion, then install the FFmpeg packages.

  1. Log in to SSH as root or a user with sudo access.
  2. Install the EPEL software repository:
sudo yum install epel-release
  1. Install the RPM Fusion free and nonfree repositories:
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
  1. Install FFmpeg with YUM:
sudo yum install ffmpeg ffmpeg-devel
  1. Check your FFmpeg version:
ffmpeg -version

Warning: CentOS 7 reached end of life on June 30, 2024, and no longer receives security updates. RPM Fusion also no longer publishes package trees for Enterprise Linux 7 on its mirrors, so these steps may not complete on a current CentOS 7 server. We recommend AlmaLinux for new servers.

Rebuild your secure website today with our VPS Hosting.

Using FFmpeg

FFmpeg showwaves visualization of an audio waveform
Showwaves Screenshot

Ready to put your newly installed FFmpeg to work? Here are a few ways to get started.

With FFmpeg installed, you’re ready to start converting, streaming, and analyzing media files from the command line. If you run into a package conflict or a permissions error along the way, InMotion Hosting’s 24/7 Live Support can help you troubleshoot the installation on your VPS or dedicated server.

Summarize and Research with AI
Share on Social Media
InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting