How to Install FFmpeg on CentOS, RHEL and Ubuntu

FFmpeg is a cross-platform solution for streaming audio and video as well as recording and conversion. Its also useful to convert multimedia files between various formats. FFmpeg includes libavcodec audio/video codec library in it.

ffmpeg-main-logo

This article will describe you to how to install FFmpeg on CentOS/RHEL 6/5 and Ubuntu 12.04/12.10 systems with easy steps. Also provides basic uses of ffmpeg. CentOS/RHEL uses must have enable atrpms rpm repository on his systems.

1. Install FFmpeg

CentOS/RHEL and Fedora users make sure that you have enabled atrpms repository in system. Let’s begin installing FFmpeg as per your operating system.

CentOS/RHEL and Fedora Users:
# yum install ffmpeg
Ubuntu and Debian Users:
$ sudo apt-get update
$ sudo apt-get install ffmpeg

2. Check FFmpeg Version

After successfully install FFmpeg, let’s check the version installed on system.

# ffmpeg -version

ffmpeg version 2.0.2
built on Oct 27 2013 11:21:04 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
....

3. FFmpeg Basic Commands

Here is the list of few ffmepg basic commands list.

    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

Click here to read more about ffmpeg on its official site.

Rahul

Founder of TecAdmin.net. I love to work with Linux and other open source application. Also I like to share knowledge with my friends and other Linux users. Follow me on Twitter, Add me on Google+ or Like Facebook page.

3 Comments

  1. I finally found a solution which allows to install ffmpeg in Centos 7:

    1. wget ftp://rpmfind.net/linux/centos/6.5/os/x86_64/Packages/libdc1394-2.1.2-3.4.el6.x86_64.rpm
    2. yum -y localinstall libdc1394-2.1.2-3.4.el6.x86_64.rpm
    3. rpm -ivh http://dl.atrpms.net/el7-x86_64/atrpms/stable/atrpms-repo-7-7.el7.x86_64.rpm
    4. yum -y install ffmpeg

    I hope it will help somebody.

  2. Dear sysadmin

    Thank you very much, i tried a lot of site to install the new ffmpeg those code were not working, maybe old or mine had problem.
    but this code you posted i tried this and it worked the new ffmpeg install to my vps.
    thanks for your help

  3. Hi ,

    I have tried above steps successfully done everything , I am able to check FFMPEG verion and basic command as well but when I check when I am checking the extension ” extension_loaded(‘ffmpeg’) or die(‘Error in loading ffmpeg’);” — it throws error “Error in loading ffmpeg” .

    Also I tried checking “phpinfo();” , but it does not shows that ffmpeg is installed. What else I need to do to configure FFMPEG in cent OS 6.5 , PHP 5.5 .

    Question : http://stackoverflow.com/questions/27226157/how-to-setup-ffmpeg-for-centos-release-6-5-server

Leave a Reply