First download the expansion pack
Extension: http://nchc.dl.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2
Enter the ffmpeg-php directory to compile the extension
/usr/local/php/bin/phpize
./configure--with-php-config=/usr/local/php/bin/php-config
Make error
Error condition
Make: * * [Ffmpeg-php.lo] Error 1 Solve: # MV Ffmpeg-php.lot Ffmpeg-php.lo Make: * * [Ffmpeg_movie.lo] Error 1 Solve: # MV Ffmpeg_movie.lot Ffmpeg_movie.lo Make: * * [Ffmpeg_frame.lo] Error 1 Solve: # MV Ffmpeg_frame.lot Ffmpeg_frame.lo Make: * * [Ffmpeg_errorhandler.lo] Error 1 Solve: # MV Ffmpeg_errorhandler.lot Ffmpeg_errorhandler.lo Make: * * [Ffmpeg_tools.lo] Error 1 Solve: # MV Ffmpeg_tools.lot Ffmpeg_tools.lo |
As follows:
Error:
Make: * * * [Ffmpeg_movie.lo] Error 1
Solve:
Vim ffmpeg_movie.c
Row 311:list_entry *le; instead of Zend_rsrc_list_entry *le;
Row 346:list_entry New_le; changed to Zend_rsrc_list_entry New_le;
Row:hashkey_length+1, (void *) &new_le, sizeof (list_entry), changed to Hashkey_length+1, (void *) &new_le,sizeof ( Zend_rsrc_list_entry),
After the change, recompile the PHP ffmpeg extension
Run FFmpeg error as follows:
Ffmpeg:error while loading shared libraries:libavdevice.so.52:cannot open Shared object file:no such file or directory
Solve:
Vim/etc/ld.so.conf
Add a line:/usr/local/lib
Then execute Ldconfig
Add extension=ffmpeg.so to PHP.ini
Restart PHP. In Phpinfo (), see if there is any ffmpeg information.
Some words will be OK
or perform
/usr/local/php/bin/php-i |grep FFmpeg
If there's an output, OK.
Workaround, and then recompile the installation ffmpeg-php
Install PHP extension ffmpeg-php