Blog
Keep updated with latest web technology.
Enjoy life same time.

Upgrade php to 5.3.x – ffmpeg

When we tried to upgrade Plesk PHP to 5.3.x ffmpeg-php does not work so we have to upgrade that as well.
Procedure is: login as root
mkdir /src
cd /src
wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fffmpeg-php%2Ffiles%2Fffmpeg-php%2F0.6.0%2F&ts=1313398332&use_mirror=ncu
tar -xjf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0

OK so we have ffmpeg 0.6.0 (latest, and it was very long time ago since its last commit), now try to compile it:
phpize
./configure
./make

Here we have errors:
error: 'PIX_FMT_RGBA32' undeclared (first use in this function)
With reference link: http://ubuntuforums.org/showpost.php?p=7022607&postcount=8, thank you Arvand
We solve the problem as follow commands:
vi ffmpeg_frame.c
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
:w
:q!
./configure
make
make install

Then finally add extension=”ffmpeg.so” inside php.ini, which normally can be found in /etc/php.ini
Or add that as a ffmpeg.ini file in /etc/php.d/ with content
extension=ffmpeg.so
Restart apache:
service httpd restart
And done, enjoy!

Comments

Leave a Reply

You must be logged in to post a comment.

Facebook Fans