FFmpeg is a cross platform suite of video tools that contains may libraries. It's very powerful command line functions often make it the best tool to remux or encode video files in Linux. In this quick tip we will show you how to install FFMpeg on just about any Linux system.
Table of Contents
Installing FFmpeg on CentOS 7 or Red Hat 7
The FFmpeg package is not available in the base repositories. You must first install the RPM Fusion repository like so:
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
Then use YUM to install the FFmpeg package via YUM.
yum install ffmpeg
Installing FFmpeg on CentOS 8
Installing FFmpeg on CentOS 8 takes several steps. Let's walk through them one by one.
First we need to install and enable the EPEL repository since it contains several required packages.
sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Next we install the RPM Fusion repository will provides the base FFmpeg and other required packages.
sudo dnf install --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm
The last step is to enable the PowerTools repository in CentOS 8.
sudo dnf config-manager --enable PowerTools
Now that we have all of our prerequisites installed, we can use DNF to install FFmpeg and all it's dependencies.
sudo dnf install ffmpeg
Installing FFmpeg on Red Hat 8
The steps required to install FFmpeg on Red Hat 8 are very similar to CentOS 8 above. In fact the first two steps are identical. Install the EPEL and RPMFusion repos.
sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf install --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm
Then use subscription manager to enable the codeready-builder repository.
sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-*-rpms"
Now you are ready to install FFmpeg via DNF.
sudo dnf install ffmpeg
Installing FFmpeg on Fedora
Installing FFmpeg on Fedora is much easier. Just enable the RPM Fusion repositories like so:
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
Then install FFmpeg with DNF.
sudo dnf install ffmpeg
Installing FFmpeg on Ubuntu
The FFmpeg packages are available in the base Ubuntu repositories. You simply need to install the packages via APT.
sudo apt install ffmpeg
Conclusion
Installing FFMpeg on Linux is fairly easy thanks to the RPM Fusion repositories. Learning all the features of this incredible tool is a whole different story. However, you should now be able to get the package installed and start learning!
Resources and Links
Join Our Newsletter
Categories
- Bash Scripting (17)
- Basic Commands (50)
- Featured (7)
- Just for Fun (5)
- Linux Quick Tips (98)
- Linux Tutorials (65)
- Miscellaneous (15)
- Network Tools (6)
- Reviews (2)
- Security (32)