Install ffmpeg mplayer mencoder MP4Box flvtool2 in cpanel server

ARUN Post in INSTALLATION
0

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/5/x86_64/rpmfusion-free-release-5-0.1.noarch.rpm

rpm -Uvh http://download1.rpmfusion.org/nonfree/el/updates/testing/5/x86_64/rpmfusion-nonfree-release-5-0.1.noarch.rpm

yum install ffmpeg mplayer mencoder

** * FLVTOOL * **

/scripts/installruby

gem install flvtool2

** * MP4Box * **

yum install gpac gpac-libs

** * FFMPEG-PHP * **

yum install ffmpeg-devel

wget http://downloads.sourceforge.net/ffmpeg-php/ffmpeg-php-0.6.0.tbz2

tar xjf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0
phpize
./configure
make

make install

NOTE : Most often when you try to run  ./configure you will end up with error

” configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the –enable-shared option”

If so use the below commands :

================

mkdir /usr/local/include/ffmpeg/

cp -par /usr/include/ffmpeg/* /usr/local/include/ffmpeg/

find /usr/include/ffmpeg/ -name “*.h” -exec cp {} /usr/local/include/ffmpeg/ \;

===============

If it still doesnt work use

================================

cp -p /usr/local/src/ffmpeg/libavformat/avio.h /usr/local/include/ffmpeg
cp -p /usr/local/src/ffmpeg/libavformat/avformat.h /usr/local/include/ffmpeg
cp -p /usr/local/src/ffmpeg/libavcodec/avcodec.h /usr/local/include/ffmpeg

cp -p /usr/local/include/libswscale/swscale.h /usr/local/include/ffmpeg

=================================

If any other files are missing run updatedb and then locate the file and paste that to the above location.

After that continue with installation :

root@server [~/ffmpeg-php-0.6.0]# make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20060613/

Now edit php.ini file (/usr/local/lib/php.ini) and make sure that value of extension_dir is set to PHP extension directory as given by above ‘make install’ command:

extension_dir = “/usr/local/lib/php/extensions/no-debug-non-zts-20060613?

Add following line just below extension_dir and this will enable ffmpeg PHP extension:

extension=”ffmpeg.so”

Restart Apache to make this change effective:

/scripts/restartsrv_httpd

« Prev: :Next »

Leave a Reply

You must be logged in to post a comment.