The ffmpeg installed by yum cannot be used with ffmpeg-php, so we need to download and compile it:
cd ~admin/software
wget http://www.ffmpeg.org/releases/ffmpeg-0.6.tar.gz
tar zxfv ffmpeg-0.6.tar.gz
cd ffmpeg-0.6
./configure --enable-shared
make
make install
Now we need to download and configure ffmpeg-php:
cd ~admin/software
wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=puzzle&ts=1278667907
tar -xjf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0
phpize
./configure
There’s an error in this version (0.6) we need to correct or it won’t compile, so run:
vi ffmpeg_frame.c
We need to substitute PIX_FMT_RGBA32 for PIX_FMT_RGB32, so enter this command :%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
and hit return. Now compile and install:
make
make install
echo "extension=ffmpeg.so" > /etc/php.d/ffmpeg.ini
service httpd restart