ffmpeg-php error

While compiling ffmpeg-php Error: /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_toGDImage’: /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function) /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.) /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_ffmpeg_frame’: /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function) ————————————————————————————–

Fix: 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

vi ffmpeg_frame.c

:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32

:w :q!

./configure make make install add extension=”ffmpeg.so” inside php.ini .

Advertisements
10 comments
  1. wilco said:

    fantastic and timely post for me. i needed to get this compiled and ran into the same problem and your post saved the day. thanks!

  2. Elcorin said:

    Hi,
    gnufreakz.wordpress.com – da best. Keep it going!
    Thank you

  3. Burak said:

    Thanks!
    This simple fix saved me a lot of time.

  4. edward said:

    HEY! this helped me get ffmpeg-php install on centos 5.2

    many thankz!

  5. Shiju V Joseph said:

    Hi…
    Thanx for posting this fix…

    it worked for me

    Thanks
    Shiju V.Joseph

  6. achmadz said:

    Thanks..
    Your solution solved my problem compiling ffmpeg-php on CentOS 5.5

  7. OMG! I have been trying to compile ffmpeg for an entire week and tried numerous guides. I always got stuck on the installation of ffmpeg-php because of this error you pointed out. This came as I was about to give up. I now have the latest amazon ami ec2 instance running with centos 5.5 and ffmpeg plugins. Thank you so much!

  8. Sundar said:

    Useful post

  9. Great!!

    Many thanks dude!!

    Worked like a charm!
    Keep the good work!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: