Table of Contents
Was this article helpful?
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $300 by adding new articles!

How to Install FFmpeg on CentOS

Last Updated: Mon, Jun 29, 2020
CentOS Server Apps System Admin

FFmpeg is a popular open source solution to record, convert, and stream audio and video, which is widely used in all kinds of online streaming services.


  • A newly deployed Vultr CentOS 6 or CentOS 7 server instance.
  • A sudo user.

1. Update the system

$ sudo yum install epel-release -y
$ sudo yum update -y
$ sudo shutdown -r now

2. Install the Nux Dextop YUM repo

There are no official FFmpeg rpm packages for CentOS for now. Instead, you can use a 3rd-party YUM repo, Nux Dextop, to finish the job.

On CentOS 7, you can install the Nux Dextop YUM repo with the following commands:

$ sudo rpm --import
$ sudo rpm -Uvh

For CentOS 6, you need to install another release:

$ sudo rpm --import
$ sudo rpm -Uvh

3. Install FFmpeg and FFmpeg development packages

$ sudo yum install ffmpeg ffmpeg-devel -y

4. Test drive

  1. Confirm the installation of FFmpeg:

    $ ffmpeg

    This command provides detailed info about FFmpeg installed on your system. If you want to learn more about FFmpeg, input:

    $ ffmpeg -h
  2. Convert an mp3 audio file to an ogg audio file.

    You need to determine the appropriate parameters when using FFmpeg. For example, you can convert an mp3 file to an ogg file using the following commands:

    $ cd
    $ wget
    $ ffmpeg -i MLKDream_64kb.mp3 -c:a libvorbis -q:a 4 MLKDream_64kb.ogg
  3. Convert an flv video file to an mp4 video file.

    Here is an example of lossless conversion from flv to mp4:

    $ cd
    $ wget
    $ ffmpeg -i beeen.flv -y -vcodec copy -acodec copy beeen.mp4

Want to contribute?

You could earn up to $300 by adding new articles