After losing gallons of sweat trying to finally get your ffmpeg-php up and running, you try the toGDImage() method and the veins on your head start to pop!
PHP Fatal error: failed to convert frame to gd image in file.php on line #
Ok, chill, take a deep breath, this can be fixed in no time!
Download this patch into your ffmpeg-php source dir, run patch, re-make and re-install your ffmpeg-php, et voila!
Here’s the command list:
patch -p0 ffmpeg_frame.c < ffmpeg_frame.c.patch
make clean && make && make install
Now restart apache or run your cli script .