Activities

February 2011
M T W T F S S
« Jan   Mar »
 123456
78910111213
14151617181920
21222324252627
28  

FFMPEG error : ‘PIX_FMT_RGBA32’ undeclared

I uses rpmforge to install all ffmpeg libraries and binaries which is easy. php-ffmepg installation obviously less pain if you have adopted yum type ffmepg. installation.

Pls note that you will have install all libjpeg,libpng and GD libraries and devel package before compiling php-ffmpeg extension.

This time I got an error as shown below,
0.6.0/ffmpeg_frame.c -fPIC -DPIC -o .libs/ffmpeg_frame.o
/tmp/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_toGDImage’:
/tmp/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
/tmp/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/tmp/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/tmp/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_ffmpeg_frame’:
/tmp/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)

Quick fix is
update ffmpeg_frame.c (can be found inside the source folder) and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32

in command line,
open the file in vi,

:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32

press enter,
save and exit
:wq

This error should be vanished ( if you have luck). Excuse me if you had installed ffmpeg manually, this fix won’t work for you,

1 comment to FFMPEG error : ‘PIX_FMT_RGBA32’ undeclared

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>