How to install ffmpeg on CentOS

By | January 22, 2014

ffmpeg logoOne of the most useful tools for multimedia conversions (audio/video) is ffmpeg.

This tool has a long tradition: started in 2000, it is used by many Linux programs (both command line and with visual interface).

In order to install it, you will need to setup first RPMforge and Epel repositories. You can find here the steps needed to configure these nice yum repos on your machine.

Once they are configured, you can just useĀ yum install ffmpeg.

[[email protected] ~]# yum install ffmpeg
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ffmpeg.x86_64 0:0.6.5-1.el6.rf will be installed
--> Processing Dependency: libtheoradec.so.1(libtheoradec_1.0)(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libasound.so.2(ALSA_0.9)(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libpostproc.so.51(LIBPOSTPROC_51)(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libasound.so.2(ALSA_0.9.0rc4)(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: a52dec for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libtheoraenc.so.1(libtheoraenc_1.0)(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libspeex.so.1()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libdc1394.so.22()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libSDL-1.2.so.0()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libx264.so.107()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libva.so.1()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libasound.so.2()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libtheoraenc.so.1()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libmp3lame.so.0()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libpostproc.so.51()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libdirac_encoder.so.0()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: librtmp.so.0()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libtheoradec.so.1()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libopencore-amrnb.so.0()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libschroedinger-1.0.so.0()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libopencore-amrwb.so.0()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libXfixes.so.3()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libfaac.so.0()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Processing Dependency: libgsm.so.1()(64bit) for package: ffmpeg-0.6.5-1.el6.rf.x86_64
--> Running transaction check
---> Package SDL.x86_64 0:1.2.14-3.el6 will be installed
---> Package a52dec.x86_64 0:0.7.4-8.el6.rf will be installed
---> Package alsa-lib.x86_64 0:1.0.22-3.el6 will be installed
---> Package dirac-libs.x86_64 0:1.0.2-4.el6 will be installed
---> Package faac.x86_64 0:1.26-1.el6.rf will be installed
---> Package ffmpeg-libpostproc.x86_64 0:0.6.5-1.el6.rf will be installed
---> Package gsm.x86_64 0:1.0.13-4.el6 will be installed
---> Package lame.x86_64 0:3.99.5-1.el6.rf will be installed
---> Package libXfixes.x86_64 0:5.0-3.el6 will be installed
---> Package libdc1394.x86_64 0:2.1.2-3.4.el6 will be installed
--> Processing Dependency: libusb-1.0.so.0()(64bit) for package: libdc1394-2.1.2-3.4.el6.x86_64
--> Processing Dependency: libraw1394.so.11()(64bit) for package: libdc1394-2.1.2-3.4.el6.x86_64
---> Package librtmp.x86_64 0:2.3-1.el6.rf will be installed
---> Package libtheora.x86_64 1:1.1.0-2.el6 will be installed
--> Processing Dependency: libogg.so.0()(64bit) for package: 1:libtheora-1.1.0-2.el6.x86_64
---> Package libva.x86_64 0:1.0.15-1.el6 will be installed
--> Processing Dependency: mesa-dri-drivers for package: libva-1.0.15-1.el6.x86_64
--> Processing Dependency: libdrm.so.2()(64bit) for package: libva-1.0.15-1.el6.x86_64
--> Processing Dependency: libGL.so.1()(64bit) for package: libva-1.0.15-1.el6.x86_64
---> Package opencore-amr.x86_64 0:0.1.2-1.el6.rf will be installed
---> Package schroedinger.x86_64 0:1.0.10-1.el6.rf will be installed
--> Processing Dependency: liborc-0.4.so.0()(64bit) for package: schroedinger-1.0.10-1.el6.rf.x86_64
---> Package speex.x86_64 0:1.2-0.12.rc1.1.el6 will be installed
---> Package x264.x86_64 0:0.0.0-0.4.20101111.el6.rf will be installed
--> Running transaction check
---> Package libdrm.x86_64 0:2.4.45-2.el6 will be installed
--> Processing Dependency: libpciaccess.so.0()(64bit) for package: libdrm-2.4.45-2.el6.x86_64
---> Package libogg.x86_64 2:1.1.4-2.1.el6 will be installed
---> Package libraw1394.x86_64 0:2.0.4-1.el6 will be installed
---> Package libusb1.x86_64 0:1.0.9-0.6.rc1.el6 will be installed
---> Package mesa-dri-drivers.x86_64 0:9.2-0.5.el6_5.2 will be installed
--> Processing Dependency: mesa-dri1-drivers >= 7.11-6 for package: mesa-dri-drivers-9.2-0.5.el6_5.2.x86_64
--> Processing Dependency: mesa-dri-filesystem(x86-64) for package: mesa-dri-drivers-9.2-0.5.el6_5.2.x86_64
--> Processing Dependency: libLLVM-3.3-mesa.so(libLLVM-3.3-mesa.so)(64bit) for package: mesa-dri-drivers-9.2-0.5.el6_5.2.x86_64
--> Processing Dependency: libLLVM-3.3-mesa.so()(64bit) for package: mesa-dri-drivers-9.2-0.5.el6_5.2.x86_64
---> Package mesa-libGL.x86_64 0:9.2-0.5.el6_5.2 will be installed
--> Processing Dependency: libXxf86vm.so.1()(64bit) for package: mesa-libGL-9.2-0.5.el6_5.2.x86_64
--> Processing Dependency: libXdamage.so.1()(64bit) for package: mesa-libGL-9.2-0.5.el6_5.2.x86_64
---> Package orc.x86_64 0:0.4.16-6.el6 will be installed
--> Running transaction check
---> Package libXdamage.x86_64 0:1.1.3-4.el6 will be installed
---> Package libXxf86vm.x86_64 0:1.1.2-2.el6 will be installed
---> Package libpciaccess.x86_64 0:0.13.1-2.el6 will be installed
---> Package mesa-dri-filesystem.x86_64 0:9.2-0.5.el6_5.2 will be installed
---> Package mesa-dri1-drivers.x86_64 0:7.11-8.el6 will be installed
---> Package mesa-private-llvm.x86_64 0:3.3-0.3.rc3.el6 will be installed
--> Finished Dependency Resolution

Pretty simple, right?

To use it for an audio conversion, you need to something like this (please note that you might want to add more parameters based on the desired bitrate/channels):

ffmpeg -i input.mp3 -ar 8000 -ac 1 output.wav

You can do something very similar for video:

ffmpeg -i input.mpeg output.flv

For more information, you can always check the extensive ffmpeg documentation.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

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