gcc -I. -I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include/ffmpeg -DHAVE_CONFIG_H -g -O2 -Wno-deprecated-declarations -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c -fPIC -DPIC -o .libs/ffmpeg_movie.o
/bin/sh /usr/local/src/ffmpeg-php-0.6.0/libtool –mode=compile gcc -I. -I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include/ffmpeg -DHAVE_CONFIG_H -g -O2 -Wno-deprecated-declarations -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_frame.c -o ffmpeg_frame.lo
gcc -I. -I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include/ffmpeg -DHAVE_CONFIG_H -g -O2 -Wno-deprecated-declarations -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_frame.c -fPIC -DPIC -o .libs/ffmpeg_frame.o
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_toGDImage’:
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_ffmpeg_frame’:
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1
I got to this using Google. We had this issue on CentOS but its the same error so I’m pretty sure it will solve your issues as well —
With the latest version of ffmpeg-php (0.6.0), update ffmpeg_frame.c and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32
then it compiled fine.
For those who don’t know how to do this –
vi ffmpeg_frame.c
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
:w
:q!
./configure
make
make install
add extension=”ffmpeg.so” inside php.ini .