As some of you know, I have been converting my servers from Windows to Linux. Namely, CentOS. I have been finding a LOT of good information on the web on how to configure my system how I like.
Recently, I have been interested in doing a YouTube like site and wanted to have my users view videos using a built in flash player and upload videos in any format they want (well almosy any).
So, I found clipshare and other scripts that do this, but they all require the following to be installed:
I had diffuclty just installing from downloading the downloads on these sites and found a way to do it using the YUM system built into CentOS.
Here’s my process:
First be sure you have ruby, subversion and ncurses-devel installed:
yum install ruby subversion ncurses-devel
Then install ffmpeg, mplayer, mencoder:
yum install ffmpeg ffmpeg-devel mplayer mencoder
Now flvtool2:
cd /usr/local/src
svn co http://svn.inlet-media.de/svn/flvtool2/trunk flvtool2
cd flvtool2
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
ffmpeg-php install:
cd /usr/local/src
svn co https://svn.sourceforge.net/svnroot/ffmpeg-php/trunk/ffmpeg-php ffmpeg-php
cd ffmpeg-php
phpize
./configure && make
make install
Open your PHP.INI file and in the Dynamic extensions section put:
extension=ffmpeg.so
To test if ffmpeg is working properly:
copy the tests directory to /var/www/html/ffmpeg/tests
my way:
mkdir /var/www/html/ffmpeg
cp -r ./tests /var/www/html/ffmpeg
open http:///ffmpeg/tests/test_ffmpeg.php in your browser
At this point you should see a text output describing the various tests it did etc.
All done!
NOTE: I installed the ffmpeg/tests scripts on saturday and it was working fine. I set this up on an additional server and now it does not work right. It shows all the proper data but leaves blank the test media conversions etc.
SO, I found this http://www.clone.gr/fox/test.html it’s for phpFox but it works great at testing if your ffmpeg-php is working properly.
TheJoe
November 8, 2007 | 11:14 pm1
PHP5 update:
Don’t do the Dynamic extension update!
Instead:
touch /etc/php.d/ffmpeg-php.ini
vim /etc/php.d/ffmpeg-php.ini
add:
extension=ffmpeg.so
restart httpd