Are you looking for steps to install FFmpeg in CentOS? Take a peek at this blog.
FFmpeg is a tool that can record, convert, and stream audio and video files.
Here at Bobcares, we often receive requests to install FFmpeg and fix its errors as a part of our Server Management Services.
Today, let’s see how our Support Engineers enable this on the server and fix its related errors.
What is FFmpeg?
FFMPEG is one of the most leading multimedia frameworks. It easily decodes and encodes images and videos.
Also, it supports almost all audio and video formats. Moreover, it supports all streaming protocols as well.
For instance, to convert an MP3 file to an OGG file we run the below command:
ffmpeg -i input.mp3 output.ogg
And to convert MP4 to WebM we run the below command:
ffmpeg -i input.mp4 output.webm
Install FFmpeg on CentOS
Now, let’s get into the installation part and see how our Support Engineers install FFMPEG in CentOS.
Step 1: Updating the system
Initially, we update the system using the command:
sudo yum update -y sudo shutdown -r now
Step 2: Enabling the Nux repository
Actually, there are no FFMPEG rpm packages for CentOS. Instead, we can use any third-party YUM repo like NUX Dextop for that.
Nux repository depends on the EPEL software repository. So, to enable it we run the below command:
sudo yum install epel-release -y
Then, we import the GPG key and install the NUX repo. For that, we run the below command to import GPG key.
sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
Then, we install the NUX dextop release repo using the below command
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
Steps 3: Install FFmpeg
Next, we install FFMPEG and FFMPEG packages using the command:
sudo yum install ffmpeg ffmpeg-devel -y
Step 4: Testing
Finally, we test the installation of FFMPEG using the command
Common errors with FFmpeg install CentOS
Recently, one of our customers approached us telling us that he was not able to install FFmpeg in his server CentOS 7.
The customer used the below command for installing FFMPEG
yum install ffmpeg -y
But he received an error relating to some missing libraries in the server.
The error was as below
Error: Package: libva-1.0.16-3.el6.x86_64 (linuxtech) Requires: libudev.so.0()(64bit) Error: Package: libavdevice-2.6.8-3.el7.nux.x86_64 (forensics) Requires: libopenal.so.1()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (forensics) Requires: libass.so.5()(64bit)
Here, the command which customer was using was all correct. However, those libraries were missing in the server. And we can install those libraries from EPEL repository.
So, our Support Engineers suggested installing it using the below command:
sudo yum install epel-release
And then run the below commands to import the GPG key and then install the NUX desktop
sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
Then lastly, run yum, enabling the EPEL and Nux desktop repo, and install FFmpeg
yum -y --enablerepo=epel,nux-dextop install ffmpeg
Finally, this fixed the error.
[Need any assistance with FFMPEG? – We’ll help you]
In short, FFmpeg is a powerful tool that can do almost anything with multimedia files. Today we saw how our Support Engineers install FFMPEG on CentOS and fix its related errors.