Yesterday i have a problem with my php-ffmpeg it shows "failed to convert frame to gd image" from one of my web applications
So after searching and testing here is the solution to fixed this issue :
First, make sure your php supported gd (compiled with gd)
#php -i | grep gd
Install re2c
What is re2c ?
re2c is a tool for writing very fast and very flexible scanners. Unlike any other such tool, re2c focuses on generating high efficient code for regular expression matching. As a result this allows a much broader range of use than any traditional lexer offers. And Last but not least re2c generates warning free code that is equal to hand-written code in terms of size, speed and quality.
We can install re2c simply using yum / apt-get or other repository
#zypper in re2c
Download and Install ffmpeg lasted version
#cd /root
#svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
#cd ffmpeg
#./configure --disable-mmx --enable-shared \
--enable-gpl --enable-pthreads --disable-static --disable-demuxer=v4l \
--disable-demuxer=v4l2 --enable-libx264 --enable-gpl --enable-libmp3lame \
--enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-nonfree --enable-version3 --enable-swscale
#make && make install
Download and Install ffmpeg-php to lasted version
#cd /root
#svn co https://ffmpeg-php.svn.sourceforge.net/svnroot/ffmpeg-php ffmpeg-php
#cp -rf ffmpeg-php/trunk/ffmpeg-php /usr/local
#cd /usr/local/ffmpeg-php/
#phpize
#./configure && make && make install
Setup ffmpeg-php on php.ini
#vi /usr/local/lib/php.ini
### add this line below in the end of php.ini ###
extension="ffmpeg.so"
Restart httpd services
#/usr/local/apache2/bin/apachectl stop
#/usr/local/apache2/bin/apachectl start
0 comments
Post a Comment