How To Install FFmpeg In Linux

Install FFmpeg

In this guide, let me show you how to install FFmpeg on various Linux distributions. For those who don’t know, FFmpeg is one of the best multimedia framework that can be used to encode, decode, transcode, mux, demux, record, stream, filter, and play any type of media files. It is completely free multimedia framework that works on almost all operating systems, including Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. For more details, refer the official website link given at the end of this guide.

Install FFmpeg In Linux

Install FFmpeg on Arch Linux and its derivatives

FFmpeg is available in the default repositories of Arch Linux. You can install it using command:

$ sudo pacman -S ffmpeg

The latest development version is available in the AUR. You can use Yaourt or Packer to install the latest development version.

$ yaourt -S ffmpeg-git


$ packer -S ffmpeg-git

There is also ffmpeg-full package in AUR, which is built with as many optional features enabled as possible. You can install that too using Yaourt or packer as shown below.

$ yaourt -S ffmpeg-full-git


$ packer -S ffmpeg-full-git

Install FFmpeg on Debian

FFmpeg is available in the default repositories. Open your Terminal and run the following command to install it.

$ sudo apt-get install ffmpeg

Install FFmpeg on Ubuntu and its derivatives

In Ubuntu, FFmpeg is available in the official repositories, so you can install it using command:

$ sudo apt-get install ffmpeg

FFmpeg in the official repositories might be bit outdated. To install most recent version, use the FFmpeg PPA.

$ sudo add-apt-repository ppa:mc3man/trusty-media
$ sudo apt-get update
$ sudo apt-get dist-upgrade

Install FFmpeg on Fedora, RHEL, CentOS

FFmpeg is included in the official repositories of RPM based distributions, such as RHEL, Fedora, CentOS. You need to add EPEL and RPMFusion repositories in-order to install FFmpeg.

First, Add EPEL repository using command:

$ sudo yum install epel-release

Add RPMFusion repository as shown below depending upon the distribution you use:

To enable access to both the free and the nonfree repository use the following command:

Fedora 22 and later:

$ sudo dnf install$(rpm -E %fedora).noarch.rpm$(rpm -E %fedora).noarch.rpm

RHEL 6.x, CentOS 6.x:

$ sudo yum localinstall --nogpgcheck

RHEL 7.x, CentOS 7.x:

$ sudo yum localinstall --nogpgcheck

The above commands will install both free and non-free repositories.

After enabling EPEL, RPMFusion repositories, run the following command to install FFmpeg:

$ sudo dnf install ffmpeg ffmpeg-devel


$ sudo yum install ffmpeg ffmpeg-devel

Congratulations! You have successfully installed FFmpeg on your Linux box.

To verify the installed version, run:

$ ffmpeg

Sample output:

ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers
 built with gcc 6.3.1 (GCC) 20170306
 configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-netcdf --enable-shared --enable-version3
 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
 libavresample 3. 5. 0 / 3. 5. 0
 libswscale 4. 6.100 / 4. 6.100
 libswresample 2. 7.100 / 2. 7.100
 libpostproc 54. 5.100 / 54. 5.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'

Now, head over to the next tutorial for getting started with FFmpeg. I have included 20 useful FFmpeg in the following guide.

And, that’s all. If you find our guides useful, please share them on your social, professional networks and support OSTechNix.



Thanks for stopping by!

Help us to help you:

Have a Good day!!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.