HostOnNet Blog

ffmpeg-php error PIX_FMT_RGBA32

When i install ffmpeg-php, i get following error.

fno-strict-aliasing -c /usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c  -fPIC -DPIC -o .libs/ffmpeg_frame.o
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_toGDImage’:
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c:336: error: for each function it appears in.)
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_ffmpeg_frame’:
/usr/local/src/ffmpeg-php/trunk/
fno-strict-aliasing -c /usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c  -fPIC -DPIC -o .libs/ffmpeg_frame.o
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_toGDImage’:
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c:336: error: for each function it appears in.)
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_ffmpeg_frame’:
/usr/local/src/ffmpeg-php/trunk/ffmpeg-php/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this f

This is fixed by running

perl -i -p -e ‘s/PIX_FMT_RGBA32/PIX_FMT_RGBA/g;’ ffmpeg_frame.c


Posted in Linux. Bookmark the permalink.

  • great patch!!
    now compiled ffmpeg-php 0.6.0 on debian lenny with latest svn of ffmpeg with –enabled-shared , awesome!
    thanks