|
Search:
Advanced search
|
Browse by category:
|
Contact Us |
Steps to install FFMPEG as an module in PHP |
|||||
FFMPEG-PHP is an extension for PHP that adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. It has methods for returning frames from movie files as images that can be manipulated using PHP's image functions. This works well for automatically creating thumbnail images from movies. FFMPEG-PHP is also useful for reporting the duration and bit-rate of audio files (mp3, wma...). FFMPEG-PHP can access many of the video formats supported by FFMPEG (mov, avi, mpg, wmv...) The following step shows the installation of FFMPEG using RPM. You can follow the steps below to add it with PHP as a module. NOTE : You should have root privilege for doing this. For installing FFMPEG, do the following steps: 1. cd /root 2. wget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 3. rpm -vi rpmforge-release-0.3.6-1.el5.rf.i386.rpm 4. rm -f /root/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 5. yum -y install ffmpeg ffmpeg-devel mplayer mencoder flvtool2 libogg libvorbis lame 6. yum clean all Here I am using the version 0.5.3 of FFMPEG-PHP. Follow the steps to install FFMPEG-PHP: 1. wget http://internap.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.3.tbz2 2. tar jxf ffmpeg-php-0.5.3.tbz2 3. cd ffmpeg-php-0.5.3 4. /usr/local/bin/phpize 5. ./configure 6. make 7. make install 8. echo "extension=ffmpeg.so" >> /usr/local/lib/php.ini 9. cd /root 10. rm -rf ffmpeg-php-0.5.3 ffmpeg-php-0.5.3.tbz2 At the end restart HTTP service (or apache): service httpd restart The following command will help you to check the installation of ffmpeg is correct or not: ffmpeg -i inputfile.avi flashfile.flv where, inputfile.avi is the input file and flashfile.flv is the output file. |
|||||
Powered by
Deru Communications (Webhosting Knowledgebase)