Activities

June 2010
M T W T F S S
« May   Jul »
 123456
78910111213
14151617181920
21222324252627
282930  

Installing FFMPEG on WHM/Cpanel server

Today, I’ve got a task to install ffmpeg and enable it on php in whm/Cpanel live server. I’m planning to use rpmforge repository to get all ffmpeg packages for yum install.


[root@host.domain.com] installation >> uname -i
x86_64

My OS architecture using 64 bit OS. So I need to use 64bit binary from rpmforge.

#rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
#yum clean all
#yum update
#yum install ffmpeg ffmpeg-devel
#yum install mplayer mencoder

while installing flvtool2 which throws me an error,
no ruby package installed on the server and yum will not help to install from Red/centos repository. What I’m doing is I have uploaded the ruby binary from my Centos5.4 repository which kept on locally.

[root@host.domain.com] installation >> ls
./   phpMyAdmin-3.3.2-english.zip*   ruby-devel-1.8.5-5.el5_3.7.i386.rpm*
../  ruby-1.8.5-5.el5_3.7.i386.rpm*  ruby-libs-1.8.5-5.el5_3.7.i386.rpm*
[root@host.domain.com] installation >><strong> rpm -ivh ruby-libs-1.8.5-5.el5_3.7.i386.rpm</strong>
Preparing...                ########################################### [100%]
   1:ruby-libs              ########################################### [100%]
[root@host.domain.com] installation >> <strong>rpm -ivh ruby-1.8.5-5.el5_3.7.i386.rpm</strong>
Preparing...                ########################################### [100%]
   1:ruby                   ########################################### [100%]
[root@host.domain.com] installation >> <strong>rpm -ivh ruby-devel-1.8.5-5.el5_3.7.i386.rpm</strong>
Preparing...                ########################################### [100%]
   1:ruby-devel             ########################################### [100%]
#yum install flvtool2*
#wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=nchc
tar -xjf ffmpeg-0.5.2.1.tbz2
#phpize
#./configure
#make
#make install

now I can see that ffmpeg is installed on php cli mode

[root@host.domain.com] ~ >> php -r 'phpinfo();' | grep "ffmpeg"
ffmpeg
ffmpeg-php version => 0.6.0-svn
ffmpeg-php built on => Jun 19 2010 14:41:11
ffmpeg-php gd support  => enabled
ffmpeg libavcodec version => Lavc52.20.1
ffmpeg libavformat version => Lavf52.31.0
ffmpeg swscaler version => SwS0.7.1
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0
[root@host.com] ~ >>

The second issue I’m facing is, I can’t find any “php.ini” which is using on server level. Lastly I found there is any php.ini placed under ‘/etc’ directory and I found one php.ini file is placed under ‘/usr/lib/php.ini“. I just add the ffmpeg extension information on that file and linked it to “/etc/php.ini”. After restarting the Webserver it’s showing the extension correctly on the browser.

[root@host.domain.com] ffmpeg-php-0.6.0 >> ln -s /usr/local/lib/php.ini /etc/php.ini
root@host.domain.com] ffmpeg-php-0.6.0 >> /usr/local/apache/bin/apachectl  restart

FFMPEG install errors commonly getting on Amazon 64 bit server

I got the following error when I’m installing ffmpeg from rpmforge repository to one of amazon server. I spend few minutes to troubleshoot this issue.. installed SDL package manually from the web and create symbolic link to “/usr/lib” nothing has got work for me ?

error: package: ffmpeg-devel-0.6.1-1.el5.rf.x86_64 (rpmforge) requires: sdl-devel

The work around for this
a. install SDL package from pbone.net and install devel package from the same web

[root@ip-10-35-97-169 install]#  wget ftp://ftp.isu.edu.tw/pub/Linux/CentOS/5.7/fasttrack/x86_64/RPMS/SDL-1.2.10-9.el5.x86_64.rpm
[root@ip-10-35-97-169 install]# wget ftp://ftp.muug.mb.ca/mirror/centos/5.7/fasttrack/x86_64/RPMS/SDL-devel-1.2.10-9.el5.x86_64.rpm

These are the steps I executed

[root@ip-10-35-97-169 install]# yum install libjpeg*
[root@ip-10-35-97-169 install]# yum install libjpng*
[root@ip-10-35-97-169 install]# yum install libtiff*
[root@ip-10-35-97-169 install]# yum install freetype*
[root@ip-10-35-97-169 install]# yum install libXrandr*
[root@ip-10-35-97-169 install]# yum install libXt*
[root@ip-10-35-97-169 install]# rpm -ivh SDL-1.2.10-9.el5.x86_64.rpm  --nodeps
[root@ip-10-35-97-169 install]# rpm -ivh SDL-devel-1.2.10-9.el5.x86_64.rpm
[root@ip-10-35-97-169 install]# yum install ffmpeg ffmpeg-devel

-Njoy

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>