Install ffmpeg on CentOS-5 cPanel server
CentOS / x86_64:
# rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
CentOS / i386:
# rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
Installing ffmpeg and related dependencies
# yum install ffmpeg ffmpeg-devel
Installing ffmpg-php
# cd /usr/local/src
# 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
# sed -i ‘s/PIX_FMT_RGBA32/PIX_FMT_RGB32/g’ ffmpeg_frame.c
# phpize
# ./configure --prefix=/usr --enable-shared
# make
# make install
The make install command will show PHP extensions path where ffmpeg PHP extension is installed:
root@server [~/ffmpeg-php-0.6.0]# make install
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
Make sure that value of extension_dir is set to PHP extension directory as given by above make install command:
Add following line in php.ini, this will enable ffmpeg PHP extension:
extension=ffmpeg.so
Restart Apache to make this change effective:
# /scripts/restartsrv_httpd
Verify that FFmpeg is working properly by running the following:
# php -m | grep ffmpeg
# php -i | grep ffmpeg
# php -r ‘phpinfo();’ | grep ffmpeg