Login into the server via ssh(root access is needed).
========
cd /usr/local/src/
========
DOWNLOAD MODULES :
========
wget www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
wget rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
wget easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.1.tbz2
wget downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
wget mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2
wget ffmpeg.org/releases/ffmpeg-0.5.tar.bz2
========
Note : If you don't get the module, please search the module in goolge using following keywords.
example : download + flvtool2_1.0.5_rc6.tgz or download + flvtool2_1. Try to download latest version so that dependencies will not be there.
EXTRACT MODULES :
=========
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 MPlayer-1.0rc2.tar.bz2
tar jxvf ffmpeg-0.5.tar.bz2
mkdir /usr/local/lib/codecs/
yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran subversion ruby ncurses-devel -y
=========
DOWNLOAD FFMPEG and MPLAYER by snv :-
=========
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/
mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
=========
Note : please note that you can get the "connection time out error". I got it. So, please stop the iptables, csf or apf or any other firewalls. Else it'll be blocked by the firewall.
LAME:
=========
cd /usr/local/src/lame-3.97
./configure
make && make install
=========
LIBOGG
=========
cd /usr/local/src/
cd /usr/local/src/libogg-1.1.3
./configure --enable-shared && make && make install
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
=========
LIBVORBIS
==========
cd /usr/local/src/
cd /usr/local/src/libvorbis-1.1.2
./configure && make && make install
==========
FLVTOOL2
=========
cd /usr/local/src/
cd /usr/local/src/flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
=========
Note : You can get the error like "ruby" not found on the server. Here are the steps to install ruby on the server :
--------------
Install Ruby
Before installing Ruby, first check if zlib is installed in PHP. You can do this by running a simple script with this code.
Now you are all set to start the installation.
cd /usr/local/src
wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.2.tar.gz
tar xvzf ruby-1.8.2.tar.gz
cd ruby-1.8.2
./configure
make
make install
ruby rubytest.rb
--------------
MPLAYER
========
cd /usr/local/src/
cd /usr/local/src/MPlayer-1.0rc2
./configure && make && make install
========
FFMPEG:
========
cd /usr/local/src/
cd /usr/local/src/ffmpeg-0.5
./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared
make
make install
export LD_LIBRARY_PATH=/usr/local/lib/
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
===========
Note : You may get the error message like "/tmp has enabled with noexec". Just go to /etc/fstab and /etc/mtab and remove the "noexec" option for tmp partition. Then try again. After finishing the installation please revert back it.
FFMPEG-PHP:
============
cd /usr/local/src/
cd /usr/local/src/ffmpeg-php-0.5.1/
phpize
./configure
make
make install
=============
NOTICE: Make sure this is the correct php.ini for the box!!
echo 'extension=ffmpeg.so' >> /usr/local/lib/php/php.ini
Note: php -i | grep php.ini //to find out the exact path of the php.ini
==============
Now check the binary like :
which lamp; which flvtool2l; which mplayer; php -m|grep ffmpeg
PS: You can also ref the URL :
http://www.booser.com/ffmpeg-mplayer/how-to-install-latest-ffmpeg-mplayer-mencoder-flvtool2-x264-yamdi-on-centos.html
By : singlehop.com

Responses
0 Respones to "How to Installing FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3 Encoder?"
Post a Comment
»Thank you for reading this article
If you have questions or comments, please leave a comment
»You can click on the Subscribe by email to subscribe comments of this post
»You can register directly link pictures, mp3, video on the comment form.
»You may use some HTML tags such
»Please post comments polite and typing accented Vietnamese if possible
»Thank the good faith comment