rpm -Uvh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm
To enable 9xhost YUM repository, create the file /etc/yum.repos.d/timewebhosting.repo
nano /etc/yum.repos.d/timewebhosting.repo
and add following repository configuration:
[9xhost]
name=timewebhosting Packages CentOS 6 - $basearch
baseurl=http://dl.timewebhosting.com/yumrepo/centos/6/$basearch/
enabled=1
gpgcheck=0
2. Install ffmpeg mplayer and mencoder
for x86 (32bit system)
yum install ffmpeg mplayer
for x86_64 (64bit system)
yum install ffmpeg mplayer --exclude "*.i386"
Note: there is no separate package for mencoder. It is also provided by mplayer package.
This will also install various dependency packages like libtheora, libvorbis, libogg, lame, opencore-amr, x264, xvidcore etc.
3. Install flvtool2
cPanel has its own ruby installer script. So install ruby using following cPanel script:
/scripts/installruby
Flvtool2 is available as a Ruby Gems package. Use following gem command to install flvtool2:
gem install flvtool2
4. Install MP4Box2
MP4Box is provided by gpac package. Install gpac and its library packages:
for x86 (32bit system)
yum install gpac gpac-libs
for x86_64 (64bit system)
yum install gpac gpac-libs --exclude "*.i386"
5. Install ffmpeg-php
Ffmpeg-php requires ffmpeg development package. Install it using yum:
for x86 (32bit system)
yum install ffmpeg-devel
for x86_64 (64bit system)
yum install ffmpeg-devel --exclude "*.i386"
Now download the latest ffmpeg-php package:
wget http://downloads.sourceforge.net/ffmpeg-php/ffmpeg-php-0.6.0.tbz2
Untar this package, build and install it with following commands:
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
make
make install
The make install command will show PHP extensions path where ffmpeg PHP extension is installed:
[email protected] [~/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
nano /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
You can verify the status of ffmpeg extension on a PHP info web page or from command line as given below:
[email protected] [~]# php -i | grep ffmpeg
ffmpeg
ffmpeg-php version => 0.6.0-svn
ffmpeg-php built on => Jun 2 2012 20:48:04
ffmpeg-php gd support => enabled
ffmpeg libavcodec version => Lavc52.123.0
ffmpeg libavformat version => Lavf52.111.0
ffmpeg swscaler version => SwS0.14.1
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0
OLDPWD => /root/ffmpeg-php-0.6.0
_SERVER["OLDPWD"] => /root/ffmpeg-php-0.6.0
_ENV["OLDPWD"] => /root/ffmpeg-php-0.6.0
6. Installation paths
Following are the file system paths of tools that we installed:
ffmpeg: /usr/bin/ffmpeg
mplayer: /usr/bin/mplayer
mencoder: /usr/bin/mencoder
flvtool2: /usr/bin/flvtool2
MP4Box: /usr/bin/MP4Box
——————-
Error 1
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie___construct':
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:318: error: 'list_entry' undeclared (first use in this function)
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:318: error: (Each undeclared identifier is reported only once
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:318: error: for each function it appears in.)
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:318: error: 'le' undeclared (first use in this function)
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:353: error: expected ';' before 'new_le'
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:363: error: 'new_le' undeclared (first use in this function)
solution
Changes in ffmpeg_movie.c:
row 311: list_entry *le; TO zend_rsrc_list_entry *le;
row 346: list_entry new_le; TO zend_rsrc_list_entry new_le;
row 360: hashkey_length+1, (void *)&new_le, sizeof(list_entry), TO
hashkey_length+1, (void *)&new_le,sizeof(zend_rsrc_list_entry),
After looking at a number of the blog posts on your website, I honestly like your way of blogging.
I book marked it to my bookmark site list and will be checking back in the near future.
Please check out my website as well and let me know
your opinion.
hello
It’s a nice post.Thank you for sharing.
It’s not my first time to go to see this website, i am browsing this web page dailly and obtain pleasant facts from here all the time.
Wow! In the end I got a web site from where I can really get helpful data regarding my study and knowledge.
My brother suggested I may like this blog. He was once totally right.
This put up truly made my day. You cann’t consider just how so
much time I had spent for this info! Thanks!
This post was amazinng i read your blog very often, and you’re always coming out with pretty great stuff.
I contributed this on my blog, and my followers loved it.
Keep upp the great work 🙂
I loved this post! i readd your blog fairly often, and you’re consistently coming out with pretty great stuff.
I contributed this onn my facebook, and my followers really liked it.
Continu the good work 🙂