The error message “Unable to load dynamic library ‘/usr/lib64/php/modules/ffmpeg.so” is received when you add the ffmpeg.so extension to the PHP configuration file i.e. php.ini file and tries to run PHP. You can easily reproduce the error message by executing “php -v”:
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/ffmpeg.so’ – /usr/lib64/php/modules/ffmpeg.so: undefined symbol: _php_create_ffmpeg_frame in Unknown on line 0
You may also notice the “PIX_FMT_RGBA32” error message while compiling ffmpeg-php
ffmpeg-php-0.5.0/ffmpeg_frame.c:495: error: ‘PIX_FMT_RGBA32′ undeclared (first use in this function)
The above error messages is the result of incorrect function declared in the ffmpeg_frame.c file under the ffmpeg-php-0.x.0 directory.
Solution:
Goto the the ffmpeg-php-0.x.0 directory and edit the ffmpeg_frame.c file
vi ffmpeg-php-0.x.0/ffmpeg_frame.c
Now replace every instance of ‘PIX_FMT_RGBA32’ with ‘PIX_FMT_RGB32’ in the file by executing
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
OR
replace “PIX_FMT_RGBA32” “PIX_FMT_RGB32” — ffmpeg_frame.c
Save the file and compile ‘ffmpeg-php’ again using the following steps
cd ffmpeg-php-0.x.0
make clean
./configure
make
make install
Once done, ffmpeg should work along with PHP now.
March 24th, 2011 at 6:05 am
Thank you So much……My ffmpeg-php works nowwwww
June 3rd, 2011 at 11:36 am
Thanks! Replacing the lines in ffmpeg_frame.c and redoing configure, make and make install got my php-ffmepg running!
August 10th, 2011 at 11:19 am
You are wonderful. Thank you for writing up this help!
November 29th, 2011 at 1:02 am
Thank you!! Saved my day!
December 1st, 2011 at 12:51 pm
Thanks. Works.
February 10th, 2012 at 11:31 am
thanks it helped me …
Wounder why this article has not been pickedup by search engine while searching ..
February 11th, 2012 at 6:22 am
It’s right there at the top for common words/tags of this post but yes, it might not be there for the keywords you used. What were the keywords you used while searching for this solution?