In this tutorial we will show you how to install FFmpeg on CentOS 7. For those of you who didn’t know, FFmpeg is a cross-platform solution for streaming audio and video as well as recording and conversion. There’s also a great PHP package called ffmpeg-php that allows for easy use of FFmpeg from inside PHP scripts. In this tutorial i will show you the easy way to install ffmpeg and ffmpeg-php (php extension).
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation FFmpeg on a CentOS 7 server.
Install FFmpeg on CentOS 7
Step 1. First let’s start by ensuring your system is up-to-date.
1 2 3 | yumcleanall yuminstall-yepel-release yum-yupdate |
Step 2. Installing the Nux repository.
After enabling Epel repo, go ahead and install Nux Dextop repository:
1 2 | sudorpm--importhttp://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro sudorpm-Uvhhttp://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm |
Install ffmpeg and ffmpeg -devel packages:
1 | yuminstallffmpegffmpeg-devel-y |
To check for a installed ffmpeg version run:
1 | ffmpeg-version |
This should result in something very similar to the following output:
1 2 3 4 5 6 7 8 9 10 11 12 13 | [root@idroot.us~]# ffmpeg -version ffmpeg -version ffmpegversion2.6.8Copyright(c)2000-2016theFFmpegdevelopers builtwithgcc4.8.5(GCC)20150623(RedHat4.8.5-4) configuration:--prefix=/usr--bindir=/usr/bin--datadir=/usr/share/ffmpeg--incdir=/usr/include/ffmpeg--libdir=/usr/lib64--mandir=/usr/share/man--arch=x86_64--optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'--enable-bzlib--disable-crystalhd--enable-gnutls--enable-ladspa--enable-libass--enable-libcdio--enable-libdc1394--enable-libfaac--enable-nonfree--enable-libfdk-aac--enable-nonfree--disable-indev=jack--enable-libfreetype--enable-libgsm--enable-libmp3lame--enable-openal--enable-libopenjpeg--enable-libopus--enable-libpulse--enable-libschroedinger--enable-libsoxr--enable-libspeex--enable-libtheora--enable-libvorbis--enable-libv4l2--enable-libx264--enable-libx265--enable-libxvid--enable-x11grab--enable-avfilter--enable-avresample--enable-postproc--enable-pthreads--disable-static--enable-shared--enable-gpl--disable-debug--disable-stripping--shlibdir=/usr/lib64--enable-runtime-cpudetect libavutil54.20.100/54.20.100 libavcodec56.26.100/56.26.100 libavformat56.25.101/56.25.101 libavdevice56.4.100/56.4.100 libavfilter5.11.102/5.11.102 libavresample2.1.0/2.1.0 libswscale3.1.101/3.1.101 libswresample1.1.100/1.1.100 libpostproc53.3.100/53.3.100 |
If you want to learn more about FFmpeg, input:
1 | ffmpeg-h |
Congratulation’s! You have successfully installed FFmpeg. Thanks for using this tutorial for installing FFmpeg in CentOS 7 system. For additional help or useful information, we recommend you to check the official FFmpeg web site.