Home Command line utilities How To Install FFmpeg In Linux
Install FFmpeg in Linux

How To Install FFmpeg In Linux

By sk

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

FFmpeg is packaged for most Linux distributions and is available in the default repositories. Here I have included installation instructions for popular Linux distros.

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. , so you can install it using any AUR hepers, for example Yay.

$ yay -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 if you want.

$ yay -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 can be installed via EPEL and RPMFusion repositories on RPM based distributions, such as RHEL, Fedora, CentOS.

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 https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

RHEL 6.x, CentOS 6.x:

$ sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-6.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-6.noarch.rpm

RHEL 7.x, CentOS 7.x:

$ sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm

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 -version

Sample output:

ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100

To get full help, run:

$ ffmpeg -h

or, even better, refer man pages:

$ man ffmpeg

Now, head over to the next tutorial to learn to use FFmpeg. I have included most commonly and frequently used 20+ FFmpeg commands in the following guide.


Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

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

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More