FFMPEG is a leading solution to record, convert and stream audio and video files in Linux. We often use FFMPEG as a library in PHP or Python. In this step by step article we will know how to install and configure FFmpeg on CentOS 7 as it not as simple as ‘yum install *’.
To follow the steps be sure you have a dedicated or VPS server with installed CentOS 7 and ‘root’ access to a server.
As stated above we will use another repo for installing FFMPEG:
$ sudo yum install epel-release -y $ sudo yum update -y
After new repo addition we should reboot the server
$ sudo shutdown -r now
FFmpeg is installing from RPM packages, they are not available in CentOS official repo, so we will use a 3rd-party YUM repo, which named Nux Dextop. To start an installation from Nux Dextop Yum repo we will request:
$ 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
Other versions:
[ ] nux-dextop-release-0-1.el7.nux.noarch.rpm 27-Apr-2014 10:07 9.6K
[ ] nux-dextop-release-0-2.el7.nux.noarch.rpm 30-Jul-2014 14:12 9.7K
[ ] nux-dextop-release-0-3.el7.nux.noarch.rpm 31-Jul-2014 08:53 9.8K
[ ] nux-dextop-release-0-4.el7.nux.noarch.rpm 10-Aug-2014 00:07 9.8K
[ ] nux-dextop-release-0-5.el7.nux.noarch.rpm 10-Aug-2014 00:11 9.7K
Now we are ready to install FFMPEG with development packages
$ sudo yum install ffmpeg ffmpeg-devel -y
We see the output on a screen while installer setup packages and dependencies.
Great, you have done it.
How to check FFMPEG is working on a server?
Call FFmpeg from the console:
$ ffmpeg
and see the results:
ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg -- incdir=/ [skipped]
Also you may use command ‘ffmpeg -h’ to get full help info or run ‘man ffmpeg’.