Hello,
With the proliferation of video sites lately, solutions related to this topic have also been increasing. We will try to explain the installation of FFmpeg and FFmpeg-php, widely used software underlying video portals, for Centos5. The same steps can also be easily used for other RPM-based Linux distributions with some minor changes.
First, we will add the Rpmforge mirrors containing FFmpeg packages to yum repos. You can find installation commands for all distributions at this link. This command will work for Centos5 (assuming we are running on 64-bit architecture):
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpmInstall all ffmpeg and related development packages:
yum install ffmpeg ffmpeg-devel -yDownload FFmpeg-php source codes from its own site:
wget http://heanet.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.3.1.tbz2
tar jxvf ffmpeg-php-0.5.3.1.tbz2
cd ffmpeg-php*Before compiling PHP modules, run the phpize command and compile:
phpize
./configure && makeInstall the compiled code (requires root access):
make installNow make this module available to Apache. Find the active php.ini file and open it for editing:
php -i | grep php.ini
vi /etc/php.iniAfter the extension_dir key, add the following line where modules are defined:
extension=ffmpeg.soSave, exit, and restart the service:
/etc/init.d/httpd restartTo verify the installation, copy the “test_ffmpeg.php” and “tests/test_media/” files from the source code directory to one of the active directories of the web server and call it from the browser. If you get output like the following, the installation was completed successfully:
ffmpeg-php version string: 0.5.3.1
libavcodec build number: 3352580
libavcodec version number: 3352580Now your only competition is YouTube…. Goodbye :)
Leave a Comment
* Your comment will be published after approval.
Comments
0No comments yet. Be the first to comment!