Skip to content
Nosce Te Ipsum
  • Home
  • About me
  • My COETAIL Blogs
    • Course 1
    • Course 2
    • Course 3
    • Course 4
  • Testimonials
    • Professional
    • Personal
Site Search

install ffmpeg with codecs on Linux Redhat / CentOS

  • June 23, 2010June 23, 2010
  • by Muhammad
Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Pin on Pinterest
Pinterest
Share on Reddit
Reddit
Email this to someone
email
Share on StumbleUpon
StumbleUpon
Digg this
Digg

this guide is from http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat

There are a couple of different ways to install FFMpeg and the required libraries. We are showing both ways here.

Recommended way

Install the additional repo

rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

Update repository

yum -y update

Install all necessary packages

yum install SDL-devel a52dec a52dec-devel alsa-lib-devel faac faac-devel faad2 faad2-devel
yum install freetype-devel giflib gsm gsm-devel imlib2 imlib2-devel lame lame-devel libICE-devel libSM-devel libX11-devel
yum install libXau-devel libXdmcp-devel libXext-devel libXrandr-devel libXrender-devel libXt-devel
yum install libid3tag libogg-devel libvorbis-devel mesa-libGL-devel mesa-libGLU-devel xorg-x11-proto-devel xvidcore xvidcore-devel zlib-devel
yum install amrnb-devel amrwb-devel
yum install libtheora libtheora-devel
yum install glibc gcc gcc-c++ autoconf automake libtool
yum install subversion
yum install ncurses-devel
yum install libdc1394 libdc1394-devel
yum install yasm nasm

Install the essential codecs from FFmepg

wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2
bunzip2 all-20071007.tar.bz2; tar xvf all-20071007.tar

mkdir /usr/local/lib/codecs/
mkdir /usr/local/lib64/codecs/
cp all-20071007/* /usr/local/lib/codecs/
cp all-20071007/* /usr/local/lib64/codecs/
chmod -R 755 /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib64/codecs/

Grab FFmpeg

svn checkout -r 20525 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

Grab the x264 library

wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20091031-2245.tar.bz2

bunzip2 x264-snapshot-20091031-2245.tar.bz2; tar xvf x264-snapshot-20091031-2245.tar

Make sure x264 has not been installed

yum erase x264*

Compile x264

cd x264
./configure --enable-shared --prefix=/usr
make
make install

Compile FFmpeg (the configure options have to be on one line)

cd ffmpeg
./configure --enable-gpl --enable-nonfree --enable-postproc --enable-libfaad --enable-avfilter --enable-pthreads \
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libfaac --disable-ffserver --disable-ffplay \
--enable-libtheora --enable-libvorbis --disable-ffplay --enable-shared --enable-avfilter-lavf --arch=x86_64
make
make install

(The –arch=x86_64 option should only be used if you are on a 64Bit System!)

Edit ld.so.conf

vi /etc/ld.so.conf

add this new line

/usr/local/lib

Activate the shared libraries

ldconfig

That’s it. This should give you a full functional FFMpeg installation for Razuna. Test it now with;

ffmpeg

This should give you the following back (yours might vary a bit);

FFmpeg version SVN-r20525, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-nonfree --enable-postproc --enable-libfaad --enable-avfilter
--enable-pthreads --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libfaac
--disable-ffserver --disable-ffplay --enable-libamr-nb --enable-libamr-wb --enable-libtheora
--enable-libvorbis --disable-ffplay --enable-shared
libavutil     50. 4. 0 / 50. 4. 0
libavcodec    52.39. 0 / 52.39. 0
libavformat   52.39. 2 / 52.39. 2
libavdevice   52. 2. 0 / 52. 2. 0
libavfilter    1. 8. 0 /  1. 8. 0
libswscale     0. 7. 1 /  0. 7. 1
libpostproc   51. 2. 0 / 51. 2. 0

(your output might vary a bit)

Try to convert a movie with;

ffmpeg -i movie.mov -vcodec libx264 -vpre hq -acodec libfaac movie.mp4

If above fails you can try to compile each library on your own.

Please follow the below steps one by one to install FFMpeg on CentOS/RedHat 5.x. successfully.

Getting Started

razuna:$
razuna:$ mkdir -p ./tmp/ffmpeg-packages
razuna:$ cd ./tmp/ffmpeg-packages

Installing a52

razuna:$ wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz

razuna:$ tar -zxf a52dec-0.7.4.tar.gz
razuna:$ cd a52dec-0.7.4
razuna:$ ./configure --enable-shared=PKGS
razuna:$ make && make install
razuna:$ cd ..

Installing FAAD2

razuna:$ wget http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz
razuna:$ tar zxf faad2-2.6.1.tar.gz
razuna:$ cd faad2
razuna:$ autoreconf -vif
razuna:$ ./configure --disable-drm --disable-mpeg4ip
razuna:$ make && make install
razuna:$ cd ..

Installing FAAC

razuna:$ wget http://downloads.sourceforge.net/faac/faac-1.26.tar.gz
razuna:$ tar zxfv faac-1.26.tar.gz
razuna:$ cd faac
razuna:$ ./bootstrap
razuna:$ ./configure --disable-mp4v2
razuna:$ make && make install
razuna:$ cd ..

Installing LAME

razuna:$ wget http://superb-east.dl.sourceforge.net/sourceforge/lame/lame-3.98b8.tar.gz
razuna:$ tar zxfv lame-3.98b8.tar.gz
razuna:$ cd lame-3.98b8
razuna:$ ./configure
razuna:$ make && make install
razuna:$ cd ..

Installing yasm

YASM is a modular assembler, it is required by the x264 package.

razuna:$ wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.0.tar.gz

razuna:$ tar zfvx yasm-0.7.0.tar.gz
razuna:$ cd yasm-0.7.0
razuna:$ ./configure
razuna:$ make && make install
razuna:$ cd ..

Installing x264

razuna:$ git clone git://git.videolan.org/x264.git
razuna:$ cd x264
razuna:$ ./configure --enable-shared --prefix=/usr && make && sudo make install

Installing Xvid

razuna:$ wget http://downloads.xvid.org/downloads/xvidcore-1.2.1.tar.gz
razuna:$ tar zxfv xvidcore-1.2.1.tar.gz
razuna:$ cd xvidcore-1.2.1/build/generic
razuna:$ ./configure
razuna:$ make && make install
razuna:$ cd ../../..

Installing FFmpeg

For FFMPEG, you will need to get the latest out of SVN. FFMPEG doesn’t ever make releases. To do so, run:

(the configure options have to be on one line)

razuna:$ svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
razuna:$ cd ffmpeg
razuna:$ ./configure --enable-gpl  --enable-postproc --enable-nonfree --enable-postproc \
--enable-libfaad --enable-avfilter --enable-pthreads --enable-libxvid \
--enable-libx264 --enable-libmp3lame --enable-libfaac --disable-ffserver --disable-ffplay
razuna:$ make
razuna:$ make install
Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Pin on Pinterest
Pinterest
Share on Reddit
Reddit
Email this to someone
email
Share on StumbleUpon
StumbleUpon
Digg this
Digg
Hide/Show MAC OS X user
Room Booking system
Muhammad
codecs ffmpeg redhat

Related articles

Dynamic DNS client setup for…
Install Nginx, MySQL and PHP…
Attaching an external storage with…
Setting up L2TP/IPSEC server using…
(c) Raspberry Pi
Starting with Raspberry Pi
Using GeoIP database to identify…
…after a long absence
ISOLINUX: No DEFAULT or UI…
Installing and Running MinecraftEdu on…
clean mail queue with Perl…

Leave a Reply Cancel reply

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

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

Follow Me!

Follow Me On TwitterFollow Me On LinkedInFollow Me On PinterestFollow Me On About.meFollow Me On Wordpress
May 2025
M T W T F S S
« Oct    
 1234
567891011
12131415161718
19202122232425
262728293031  

2009 2010 2011 Amelie apache beijing birthday clearos crèpes debian december 2009 dubai email february firewall guide holidays ill install internet kuala lumpur linux list mac maheen mobile october 2009 outlook Pakistan raspberry raspberry pi router search Sharepoint smtp snow spring ubuntu unix VLAN VPN windows 7 winter xian Zimbra

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Categories

Licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Theme by Colorlib Powered by WordPress
  • Home
  • About me
  • My COETAIL Blogs
  • Testimonials