Installing FFmpeg Hosting

Posted by Bounceweb in FFmpeg Hosting

1 Star2 Stars (No Ratings Yet)

Installing FFmpeg Hosting – For Dedicated/VPS servers.

FFMPEG is an open source application that allows you to convert video and audio files easily between a variety of different formats. It supports most industry-standard codec and can convert from one file format to another quickly and easily. This guide is intented for the installatiion of ffmpeg, ffmpeg-php, mplayer, mencoder, lame mp3 encoder, flvtool2, libVorbis, and libogg and tested on CentOS5 and RHEL3 systems with Cpanel.

To start:

cd /usr/src

Download MPlayer and Codes, FlvTool2, Lame, and ffmpeg-php:

MPlayer codecs (check for latest release):


MPlayer (check for latest release):


FlvTool2 (check for latest release):


Lame MP3 Encoder (check for latest release):


FFMPEG-PHP (check for latest release):


Extract downloaded files:

tar -zxvf flvtool2-1.0.6.tgz
tar -zxvf lame-3.97.tar.gz
bunzip2 essential-20071007.tar.bz2; tar xvf essential-20071007.tar
bunzip2 MPlayer-1.0rc2.tar.bz2; tar xvf MPlayer-1.0rc2.tar
bunzip2 ffmpeg-php-; tar xvf ffmpeg-php-

Create and import the Codecs directory:

mkdir /usr/local/lib/codecs/
mv essential-20071007/* /usr/local/lib/codecs/
chmod -Rf 755 /usr/local/lib/codecs/

Install Subversion and Ruby using Yum:

yum install subversion (You may need to open SVN port 3690)
yum install ruby (If you’re on cPanel you can alternatively use /scripts/installruby)
yum install ncurses-devel

Get FFMPEG and MPlayer from SVN:

svn checkout svn:// ffmpeg
svn checkout svn:// mplayer

Install LAME:

cd /usr/src/lame-3.97
./configure && make && make install

Install libOgg and libVorbis:

yum install libogg.i386 libvorbis.i386 libvorbis-devel.i386

Install flvtool2:

cd /usr/src/flvtool2-1.0.6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

Install MPlayer:

cd /usr/src/MPlayer-1.0rc2
./configure && make && make install

Install ffMPEG:

cd /usr/src/ffmpeg/
mkdir tmp
chmod 777 tmp
export TMPDIR=./tmp
./configure –enable-libmp3lame –enable-libvorbis –disable-mmx –enable-shared
echo ‘#define HAVE_LRINTF 1? >> config.h
make && make install
export TMPDIR=/tmp

Finalize the codec setups:
ln -s /usr/local/lib/ /usr/lib/
ln -s /usr/local/lib/ /usr/lib/
ln -s /usr/local/lib/ /usr/lib/
ln -s /usr/local/lib/ /usr/lib/
ln -s /usr/local/lib/ /usr/lib/

You may get an error about a library path not being found, if so, run:
export LD_LIBRARY_PATH=/usr/local/lib


cd /usr/src/ffmpeg-php-0.5.0/
./configure && make && make install
ln -s /usr/local/bin/ffmpeg /usr/bin/ffmpeg
ln -s /usr/local/bin/mplayer /usr/bin/mplayer

Add extension to php.ini (find the correct php.ini file):

Restart Apache and check that the module is loaded in PHP:

/etc/init.d/httpd restart

Test ffmpeg from command line and if you get this errors:

ffmpeg: error while loading shared libraries:…

execute: /usr/local/lib >>/etc/ and reload library cache with ldconfig -v

Verify ffmpeg installation:

php -r ‘phpinfo();’ | grep ffmpeg

If you get the folowing results then FFMPEG and all it’s components are installed correctly:
ffmpeg support (ffmpeg-php) => enabled
ffmpeg-php version =>
ffmpeg-php gd support => enabled
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0

Be Sociable, Share!

One Response to “Installing FFmpeg Hosting”

Leave a Reply

You must be logged in to post a comment.