It took me a couple of days to figure out the right way to install ffmpeg-php extension for php, so i documented all the instructions to not waste another 2 days for me and anyone interested
i started with http://www.amman-dj.com/Slim/2008/01/29/how-to-installing-ffmpeg-mplayer-flvtool-2-and-ffmpeg-php-4-youtube-clone-script/ but didn’t work with me and i needed more plugins, so i modified it and added the other packages
enjoy
##########################
# add dag repository
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
##########################
# update system
yum -y update##########################
# Download Packages
mkdir ~/ffmpeg-packages cd ~/ffmpeg-packages wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2 wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz wget http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz wget http://downloads.sourceforge.net/faac/faac-1.26.tar.gz wget http://superb-east.dl.sourceforge.net/sourceforge/lame/lame-3.98b8.tar.gz wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.0.tar.gz wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20080630-2245.tar.bz2 wget http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz wget http://www.linux1394.org/dl/libraw1394-1.3.0.tar.gz wget http://mesh.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.3.1.tbz2
##########################
# Install SVN/Ruby
yum install subversion yum install ruby yum install ncurses-devel
##########################
# Extract all the source files
bunzip2 essential-20061022.tar.bz2; tar xvf essential-20061022.tar tar zxvf flvtool2_1.0.5_rc6.tgz bunzip2 ffmpeg-php-0.5.3.1.tbz2; tar xvf ffmpeg-php-0.5.3.1.tar tar zxvf libogg-1.1.3.tar.gz tar zxvf libvorbis-1.1.2.tar.gz tar -zxf a52dec-0.7.4.tar.gz tar zxf faad2-2.6.1.tar.gz tar zxfv faac-1.26.tar.gz tar zxfv lame-3.98b8.tar.gz tar zfvx yasm-0.7.0.tar.gz bunzip2 < x264-snapshot-20080630-2245.tar.bz2 | tar -xf - tar zxfv xvidcore-1.1.3.tar.gz tar zxfv libraw1394-1.3.0.tar.gz
##########################
#Create the codecs directory & import them
mkdir /usr/local/lib/codecs/ mv essential-20061022/* /usr/local/lib/codecs/ chmod -R 755 /usr/local/lib/codecs/
##########################
# Install Lame
cd lame-3.98b8 export LD_LIBRARY_PATH=/usr/local/lib ./configure make make install cd ..
##########################
# Install libOGG
cd libogg-1.1.3 ./configure make make install cd ..
##########################
# Install libVorbis
cd libvorbis-1.1.2 ./configure make make install cd ..
##########################
# Install flvtool2
cd flvtool2_1.0.5_rc6 ruby setup.rb config ruby setup.rb setup ruby setup.rb install cd ..
##########################
# Install a52
cd a52dec-0.7.4 ./configure --enable-shared=PKGS make make install cd ..
##########################
# Install FAAD2
cd faad2 autoreconf -vif ./configure --disable-drm --disable-mpeg4ip make make install cd ..
##########################
# Install FAAC
cd faac ./bootstrap ./configure --disable-mp4v2 make make install cd ..
##########################
# Install yasm
cd yasm-0.7.0 ./configure make make install cd ..
##########################
# Install x264
cd x264-snapshot-20080630-2245 ./configure --enable-shared make make install cd ..
##########################
# Install Xvid
cd xvidcore-1.1.3/build/generic ./configure make make install cd ../../..
##########################
# Install libraw1394
cd libraw1394-1.3.0 ./configure make dev make make install cd ..
##########################
# Install libdc1394
yum install libdc1394 libdc1394-devel##########################
# Install libtheora
yum install libtheora libtheora-devel##########################
# Install vlc & mplayer
yum install vlc mplayer
##########################
# Install ffmpeg
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg cd ffmpeg ./configure --enable-gpl --enable-postproc --enable-nonfree --enable-postproc --enable-libfaad --enable-avfilter --enable-pthreads --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-liba52 --enable-libfaac --disable-ffserver --disable-ffplay --enable-libtheora --enable-libvorbis --enable-shared make make install export LD_LIBRARY_PATH=/usr/local/lib cd ..
##########################
# Install FFMPEG-PHP (make sure the php.ini path is correct.)
cd ffmpeg-php-0.5.3.1 phpize ./configure make make install echo 'extension=ffmpeg.so' >> etc/php.ini cd .. service httpd restart php -r 'phpinfo();' | grep ffmpeg