How to Install FFmpeg on CentOS 7

Install FFmpeg on CentOS 7

In this article, we will have explained the necessary steps to install FFmpeg on CentOS 7. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

FFmpeg is one the free and open source cross-platform solution for converting, recording and streaming media. FFmpeg is also used for converting media files to different formats, resize video, change sample rates for video and audio files.

Install FFmpeg on CentOS

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

sudo yum install epel-release
sudo yum update

Step 2. Install FFmpeg on CentOS.

Now we add Nux repository to do this import GPG key using below command:

sudo rpm -v --import
sudo rpm -Uvh

Install FFmpeg using following command:

sudo yum install ffmpeg ffmpeg-devel

Confirm the installation and check FFmpeg version typing below command:

$ ffmpeg -version
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)

Step 3. FFmpeg Basic Commands.

Here is the list of the ffmepg basic command options used with ffmpeg command line tool:

ffmpeg -version:            show version
ffmpeg -formats:            show available formats
ffmpeg -codecs:             show available codecs
ffmpeg -decoders:           show available decoders
ffmpeg -encoders:           show available encoders
ffmpeg -bsfs:               show available bit stream filters
ffmpeg -protocols:          show available protocols
ffmpeg -filters:            show available filters
ffmpeg -pix_fmts:           show available pixel formats
ffmpeg -layouts:            show standard channel layouts
ffmpeg -sample_fmts:        show available audio sample formats

Congratulation, you have learned how to install FFmpeg on CentOS 7. If you have any question, please leave a comment below.