下载ffmpeg安装包地址:
http://ffmpeg.mplayerhq.hu/download.html使用该命令下载ffmpeg: svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
./configure --enable-share --prefix=/usr
make clean && make && make install
下载ffmpeg-php安装包地址:
http://ffmpeg-php.sourceforge.net/tar -xvf ffmpeg-php-0.4.9.tar
mv ffmpeg-php-0.4.9 php-4.3.6/ext/ffmpeg
cd php-4.3.6/ext/ffmpeg
phpize
cd /opt/software/php-4.3.6
rm configure
./buildconf –force
第二次编译php,让它支持ffmpeg-php
./configure --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-freetype --without-gdbm --with-gettext --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-png --enable-ftp --enable-sockets -with-xml --with-dom --with-zlib --enable-track-vars --with-mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-ffmpeg=/user/local/include
make && make install
红字为需要注意的地方,路径或参数不同会造成无法加载ffmpeg.so的错误.
错误提示如:
Warning: dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini
红字为需要注意的地方,路径或参数不同会造成无法加载ffmpeg.so的错误.
错误提示如:
Warning: dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini