How to: FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3 Encoder + Libogg + Libvorbis + AMR on a Linux Based Server
Lately I’ve been receiving a lot of queries and request to install this setup on quite a few boxes so I decided to write a guide (CentOS Based). It also includes copy & paste commands so it should be relatively easy to follow. Note: It shouldn’t be impossibly hard to modify this to work with other distros (Here’s one for a generic distro).
The following Guide will show you exactly how to install the following packages on a CentOS system:
- FFmpeg
- FFmpeg-PHP
- Mplayer + Mencoder
- flv2tool
- LAME MP3 Encoder
- AMR (for 3gp file conversions)
- Libogg
- Libvorbis
Setup the directory to use
(Wouldn’t want /root to start getting crowded, would we?)
mkdir /usr/local/src
cd /usr/local/src
Dowload the necessary files.
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://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.1.tbz2
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://ftp.penguin.cz/pub/users/utx/amr/amrnb-6.1.0.4.tar.bz2
wget http://ftp.penguin.cz/pub/users/utx/amr/amrwb-6.0.0.1.tar.bz2
Extract all the files
tar zxvf flvtool2_1.0.5_rc6.tgz
tar zxvf lame-3.97.tar.gz
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz
tar zxvf flvtool2_1.0.5_rc6.tgz
tar jxvf essential-20061022.tar.bz2
tar jxvf ffmpeg-php-0.5.1.tbz2
tar jxvf amrwb-6.0.0.1.tar.bz2
tar jxvf amrnb-6.1.0.4.tar.bz2
Create a folder to hold the codecs
mkdir /usr/local/lib/codecs/
Make sure we have all the necessary libraries as well as SVN + Ruby installed
yum -y install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran subversion ruby ncurses-devel
Get ffmpeg and mplayer via SVN
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer
svn update
cd /usr/local/src
Copy Codes for Mplayer
mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
Create a temp dir with 777 permissions (needed to install ffmpeg)
mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp
Installing LAME
cd /usr/local/src/lame-3.97
./configure
make && make install
cd /usr/local/src/
Installing LIBOGG:
cd /usr/local/src/libogg-1.1.3
./configure && make && make install
cd /usr/local/src/
Installing LIBVORBIS:
cd /usr/local/src/libvorbis-1.1.2
./configure && make && make install
cd /usr/local/src/
Installing FLVTOOL2:
cd /usr/local/src/flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
cd /usr/local/src/
cd /usr/local/src/mplayer
./configure && make && make install
cd /usr/local/src/
Installing AMR (for 3GP Conversion)
cd /usr/local/src/amrnb-6.1.0.4
./configure
make && make install
cd /usr/local/src/amrwb-6.0.0.1
./configure
make && make install
Installing FFMPEG:
cd /usr/local/src/ffmpeg/
./configure –enable-libmp3lame –enable-libogg –enable-libamr-nb –enable-libamr-wb –enable-libvorbis –disable-mmx –enable-shared
make
make install
ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
cd /usr/local/src/
Installing FFMPEG-PHP:
cd /usr/local/src/ffmpeg-php-0.5.0/
phpize
./configure
make
make install
Note: Make sure this is the correct php.ini for the box!!
echo ‘extension ffmpeg.so’ >> /usr/local/Zend/etc/php.ini
Restart and you’re done
service httpd restart
cd /usr/local/src
Testing
Direct your browser to view a phpinfo() php file. Scroll down and you should see the ffmpeg extension.
Wasn’t all that hard was it?
Comments(10)




































Another guide on how to view private myspace / facebook profiles. This time, no codes needed!
http://www.laatedaa.com/2008/09/10/utilizing-social-engineering-to-view-private-facebook-myspace-profiles/