gd-2.0 or higher (the version of GD bundled with PHP works too)
如果没有 phpize ,则需要安装 php-devel
1
2
3
4
5
6
7
8
tar xjf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0/
phpize
./configure --with-ffmpeg=/usr/local/ffmpeg
可以先使用make test查看是否有报错
然后在使用make clean 重新编译
make
make install
在安装 php-ffmpeg 出现如下报错
1
2
3
4
5
6
7
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_ffmpeg_frame’:
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_toGDImage’: