FFMpeg on CentOS 6 and 7 doesn't have to be difficult to install.  And now it's not, with this simple guide!

(updated version 3/14/19:  Install FFMpeg on CentOS the Easy Way)

(Need CentOS 8?  Check out this Guide to Installing FFMpeg on CentOS 8)

Need support?  We offer a paid install service.  Subscribe to the mailing list for information about this service, including pricing and options available.

Installing FFMpeg

From time to time, I have to fire up my good friend (major search engine) to remember how to do certain tasks.  For example, today I was in the process of migrating a website from one web host to another.  In order to do so, I needed to make sure that FFMpeg was installed and working on the new host before migrating the site, or all of the cool website multimedia features (e.g. audio blogs) would stop working.  Using FFMpeg is really a quick way to convert massive files into manageable, portable, web ready files.  I digress.

To install FFMpeg on CentOS 6 or CentOS 7, you will need to follow a couple steps.


  • Running CentOS 6 / CentOS 7
  • Root Access (typical on a VPS) or have a sudo user (typical on a shared hosting environment or other VPS environments)
  • Comfortable with YUM and RPM commands (Please don't blindly copy and paste code, understand it!)

Update your system before anything

yum install epel-release -y && yum update -y

This will install the EPEL Repository which contains updated packages over the base packages provided with CentOS out of the box.  Many of these updated packages also contain security updates, so I would highly suggest installing and using the EPEL Repository as default behavior.  Also, further dependencies later will require the EPEL repository, so in our case it is required.  After the EPEL Repository is installed, an update command will be issued.  Notice the -y after each yum command, which means force yes to any questions (read: automatic, no prompts).

If after the update, there was any updates to the kernel, you will want to restart your machine.  To do so, issue a restart command:

shutdown -r now

Install the Nux Dextop YUM repository for FFMpeg packages


Since there is not an official release of FFMpeg in RPM packages, we need to use the Nux Dextop repository which does contain FFMpeg.  Don't be concerned with the name of the repository, as we are not installing any GUI on your server, instead only using the repository for the FFMpeg packages bundled with it.

With CentOS 7, you can install the GPG Key and Repository with the following:  
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

With CentOS 6, the same can be accomplished with the following:

rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro && rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm

Install FFmpeg Packages

Now that we have the repository installed for our version of CentOS, we can now install FFMpeg.  Typically, most installs you will want to install the base FFMpeg and the FFMpeg Development packages.  To do this, simply issue the following command:

yum install ffmpeg ffmpeg-devel -y

Check that FFMpeg installed without issues

To check that FFMpeg is installed correctly, you can issue a simple ffmpeg command:


This should result in something very similar to the following output:

ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers   built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.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   libavutil      54. 20.100 / 54. 20.100   libavcodec     56. 26.100 / 56. 26.100   libavformat    56. 25.101 / 56. 25.101   libavdevice    56.  4.100 / 56.  4.100   libavfilter     5. 11.102 /  5. 11.102   libavresample   2.  1.  0 /  2.  1.  0   libswscale      3.  1.101 /  3.  1.101   libswresample   1.  1.100 /  1.  1.100   libpostproc    53.  3.100 / 53.  3.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Use -h to get full help or, even better, run 'man ffmpeg'

You are ready to go, and FFMpeg is now installed.  Congratulations, you can now start converting your audio and video files on your server.

Looking for a version other than 2.6.8 for FFMpeg?  That is now also possible via an install script

Static Prebuilt Install of FFMpeg.

To do so, start by getting the install script:

wget https://raw.githubusercontent.com/q3aql/ffmpeg-install/master/ffmpeg-install

Then make the file executable:

chmod a+x ffmpeg-install

Now install a release version:

./ffmpeg-install --install release

Now double check that it works:

ffmpeg -version

ffmpeg version 3.3.2-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.1 (Debian 5.4.1-11) 20170519 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100