Hello,
How To Install FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3 Encoder? There are few automated scripts out there that install FFMPEG for you but you may find difficult to track a problem if something goes wrong. The better way is to install everything manually so that we can keep track of errors and resolve it before proceeding with the further installation:
Quote:
Change directory to ’src’ where we are going to download all the modules:
cd /usr/local/src/
# Download all the below modules:
wget http://www3.mplayerhq.hu/MPlayer/rel...061022.tar.bz2
wget http://rubyforge.org/frs/download.ph..._1.0.5_rc6.tgz
wget http://easynews.dl.sourceforge.net/s...me-3.97.tar.gz
wget http://superb-west.dl.sourceforge.ne...php-0.5.1.tbz2
wget http://downloads.xiph.org/releases/o...g-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/v...s-1.1.2.tar.gz
# Extract the Modules:
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
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:
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/
# Configure LAME:
cd /usr/local/src//lame-3.97
./configure
make && make install
# Configure 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
# Configure LIBVORBIS:
cd /usr/local/src//libvorbis-1.1.2
./configure && make && make install
# Configure flvtool:
cd /usr/local/src//flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
# Configure MPLAYER:
cd /usr/local/src/mplayer
./configure && make && make install
# Configure FFMPEG:
cd /usr/local/src//ffmpeg/
./configure –enable-libmp3lame –enable-libvorbis –disable-mmx –enable-shared
######### IGNORE THIS ECHO LINE The dev’s fixed the issue in svn. Im only
leaveing it here in case it comes up again ###############
echo ‘#define HAVE_LRINTF 1 ‘>>config.h
################################################## ##########################
################################################## #######
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
# Configure FFMPEG-PHP:
cd /usr/local/src/ffmpeg-php-0.5.1/
phpize
./configure
make
make install
Now, you need to add the ffmpeg extension in your php.ini file. Locate the php.ini file and use the below commend to insert it:
echo ‘extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so’ >> /path/to/php.ini
Make sure to restart apache once you insert the extension:
service httpd restart
|
At the end, during FFMPEG-PHP configuration you may face problem with /tmp been mounted as noexec (if your /tmp is mounted as noexec), in this case unmount /tmp temporarily and proceed with the installation.
Regards,
Jason.