As fallow-up to previous post (link).
After toying with fresh ffmpeg-php 0.6.0 I kept getting error:
Fatal error: failed to convert frame to gd image
Problem lies in broken function _php_avframe_to_gd_image in ffmpeg_frame.c, in the base ffmpeg-php package.
To fix this problem download this patch file and apply it to ffmpeg_frame.c like so:
cd /path/to/ffmpeg-php-0.6.0/ wget http://hazaah.com/download/ffmpeg_frame.c.patch patch -p0 ffmpeg_frame.c < ffmpeg_frame.c.patch
Reinstall ffmpeg-php && restart apache.
Thats all.
May 1st, 2009 at 7:08 pm
Thanks.
June 2nd, 2009 at 6:00 pm
thanks a lot. it’s helpful and you just saved me :)
August 17th, 2009 at 5:50 pm
Thanks!
This bug has bitten me several times now. Debian’s ffmpeg-php package has patched it, but Gentoo’s package hasn’t.
I’m amazed upstream hasn’t released an updated version yet.
February 3rd, 2010 at 5:54 pm
FFmpeg version SVN-r21080
ffmpeg-php-0.6.0
My tests:
I can make a still using ffmpeg at the command line.
I can use php gdimage to make an image.
OK!
But using ffmpeg-php I can not get an image using this:
$frame = $movie->getFrame(105); //returns Object id #3
$im = $frame->toGDImage(); //returns Resource id #4
Looks like it’s working, but does not produce any image file.
Advise?
February 4th, 2010 at 12:22 am
Duh..
I needed to convert the ownership of the videos to apache before it would work.
Thanks Anyway.