How to Install and Use FFmpeg on CentOS 7


Install and Use FFmpeg ,FFmpeg is a loose and open source collection of equipment for handling multimedia files. It contains a hard and fast of shared audio and video libraries which includes libavcodec, libavformat, and libavutil. With FFmpeg, you may convert among diverse video and audio codecs, set pattern costs, seize streaming audio/video and resize videos.

This educational walks you via putting in FFmpeg on CentOS 7.

Install and Use FFmpeg ,Prerequisites

In order for you to add new repositories and install packages for your CentOS device, you ought to be logged in as a consumer with sudo privileges.

Install and Use FFmpeg ,Installing FFmpeg on CentOS

FFmpeg is not available in CentOS 7 core repositories. You can choose to build the FFmpeg gear from source or to install it the usage of yum from the Nux Dextop repository. We’ll go with the second one choice.

Perform the subsequent steps to install FFmpeg on CentOS 7:

1.The Nux repository depends on the EPEL software repository. If the EPEL repository is not enabled to your machine, permit it via typing:

sudo yum install epel-release

2. Next, import the Repository GPG key and enable the Nux repository’s by installing the rpm package:

sudo rpm -v –import rpm -Uvh

3. Once the repository is enabled, start install FFmpeg:

sudo yum install ffmpeg ffmpeg-devel

4. Verify the FFmpeg installation by running the ffmpeg -version command:

ffmpeg -version

At the time of writing this article, the current version of FFmpeg available in the Nux Dextop repository is 2.8.15.

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) …

That’s it. FFmpeg has been installed on your CentOS machine.

Install and Use FFmpeg ,FFmpeg Examples

In this section, we will look at some basic examples on how to use the ffmpeg utility.

Basic conversion

While changing audio and the video files,with ffmpeg you do no longer need to specify the input and output formats. The enter file layout is automobile detected and the output layout is guessed from the document extension.

Convert a video document from mp4 to webm:

$ffmpeg -i input.mp4 output.webm

Convert an audio file from mp3 to ogg:

$ffmpeg -i input.mp3 output.ogg

Specifying codecs

When converting the documents you could specify the formats which you need to use with the -c preference. The codec may be the call of any supported decoder/encoder or a completely unique price duplicate which really copies the enter motion.

Convert a video file from mp4 to webm using the libvpx video codec and libvorbis audio codec:

$ffmpeg -i input.mp4 -c:v libvpx -c:a libvorbis output.webm

Convert an audio file from mp3 to ogg encoded with the libopus codec.

$ffmpeg -i input.mp3 -c:a libopus output.ogg