×


FFmpeg on CentOS

Are you trying to install FFmpeg in CentOS?

This guide will help you.


ffmpeg is a command-line tool that converts audio or video formats. It can also capture and encode in real-time from various hardware and software sources such as a TV capture card. 

ffplay is a simple media player utilizing SDL and the FFmpeg libraries.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform Packages and Software Installation Tasks on their Linux Server.

In this context, we shall look into install, enable FFmpeg on the server and fix its related errors.


More information about 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


How to install FFmpeg on CentOS ?

To install FFMPEG in CentOS, follow the process outlined below.


1. Updating the system

Initially, we update the system using the command:

sudo yum update -y
sudo shutdown -r now


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


3. Install FFmpeg

Next, we install FFMPEG and FFMPEG packages using the command:

sudo yum install ffmpeg ffmpeg-devel -y


4. Testing FFmpeg

Finally, we test the installation of FFMPEG using the command:

ffmpeg


Troubleshooting some 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 the 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 Experts 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 urgent assistance with FFMPEG installation and Setup? – We'll help you. ]


Conclusion

This article will guide you on how to install FFMPEG on #CentOS and fix its related #errors. FFmpeg is a powerful tool that can do almost anything with #multimedia files.

FFmpeg is a standard package on many #linux systems. 

You can check if it is installed with a #command like dpkg -s ffmpeg . 

If it is not installed, you should be able to install with your system's package manager. i.e. sudo apt-get install ffmpeg or search 'ffmpeg' in the Software Center on Ubuntu.

To run #FFmpeg in #Linux:

1. Start by updating the packages list: sudo apt update.

2. Next, install FFmpeg by typing the following command: sudo apt install ffmpeg.

3. To validate that the package is installed properly use the ffmpeg -version command which prints the FFmpeg version: ffmpeg -version.