Skip navigation
BLOG  |  JANUARY, 2009

FFMPEG on Red Hat Enterprise 4 (RHEL4)

January 21, 2009 at 11:30 am
by Mike

I based my setup guide on the Austin Constable's blog post. My version contains some tweaks that I had to make to the original guide in order to get it to work on my server. I hope it helps!

Preparation

1. Remove ffmpeg, x264 and faad2 to avoid confusion.

up2date -e ffmpeg x264 faad2 faad2-devel

2. Install the necessary build tools

up2date gcc gcc-c++ automake autoconf libtool subversion

3. Install the necessary libraries

up2date -u zlib-devel libmad-devel libvorbis-devel libtheora-devel lame-devel faac-devel a52dec-devel xvidcore-devel freetype-devel

Compile supporting libraries

1. Setup work area

cd ~
mkdir ffmpeg
cd ffmpeg

2. Compile and Install faad2

wget http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz
tar xzvf faad2-2.6.1.tar.gz
cd faad2
autoreconf -vif
./configure
make
make install

3. Compile and install gpac

cd ..
wget http://downloads.sourceforge.net/gpac/gpac-0.4.4.tar.gz
tar -xzvf gpac-0.4.4.tar.gz
cd gpac
./configure

vi applications/Makefile
*** edit applications/Makefile and comment out the following lines:
#INSTDIRS+=osmozilla
#APPDIRS+=osmozilla
***

make
make install
make install-lib

4. Update the links to the shared libs

echo '/usr/local/lib/' > /etc/ld.so.conf.d/gapc-1386.conf
ldconfig

5. Compile & Install x264

cd ..
wget http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090119-2245.tar.bz2
tar xvjf x264-snapshot-20090119-2245.tar.bz2
cd x264-snapshot-20090119-2245
./configure --enable-pthread --enable-mp4-output --enable-shared --disable-asm
make
make install
ldconfig

Install ffmpeg

# You may need to install the subversion client
up2date -u subversion

cd ..
svn export -r16711 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --prefix=/usr/local --disable-debug --enable-shared --enable-gpl --enable-nonfree --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-liba52 --enable-libx264 --enable-libxvid --enable-libvorbis --enable-libfaac --enable-libfaad --enable-libmp3lame
make
make install

Done... That was easy! :)


Comments
Chris | January 21, 2009 11:50 AM

Mike,

Wow, your first blog post! Thankfully, I speak Robot, so I got it all.

Seriously, though, I'll bet that a bunch of our clients will be interested in info on FFMPEG.

Chris
Justin | January 21, 2009 1:28 PM

Mike,
Great post. Made me cry.
Seriously though, does FFMPEG convert formats on the fly? In other words, if a client uploads a .mov file through the CMS can FFMPEG serve it up on the site as an .flv file?
Mike | January 21, 2009 1:43 PM

FFMPEG is just the utility to do the conversion and is not currently tied into the NFCMS. The new CMS5 media library feature will have the ability to do conversions in the near future.
Oukiman | November 21, 2009 12:24 AM

I am getting a permission denied in number 3. when I do ./configure
Any thoughts?
Mike Boulet | November 21, 2009 8:06 PM

Make sure that you are logged in as root. If that doesn't work please post the results of the configure.