57 lines
1.3 KiB
Plaintext
57 lines
1.3 KiB
Plaintext
## - install prerequisites
|
|
## -
|
|
apt-get install ffmpeg re2c libavcodec-dev libavformat-dev libswscale-dev libpostproc-dev
|
|
|
|
cd /usr/local/src/apache2
|
|
|
|
## - download ffmpeg-php from sourceforge
|
|
## -
|
|
## - http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/
|
|
## -
|
|
|
|
|
|
## - If configure script ends up in error
|
|
## -
|
|
## - configure: error: ffmpeg shared libraries not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option
|
|
## -
|
|
## - library libavcodec.so was not found.
|
|
## -
|
|
## - You can solve it, by symlinc libavcodec.so to directory /usr/lib
|
|
## -
|
|
cd /usr/lib
|
|
ln -s x86_64-linux-gnu/libavcodec.so
|
|
|
|
|
|
|
|
bunzip2 < ffmpeg-php-0.6.0.tar.bz2 | tar -xf -
|
|
cd ffmpeg-php-0.6.0
|
|
|
|
phpize
|
|
./configure
|
|
make
|
|
make install
|
|
|
|
|
|
## - in file (/usr/local/apache2/conf/)php.ini add:
|
|
## - extension=ffmpeg.so
|
|
vim /usr/local/apache2/conf/php.ini
|
|
|
|
/etc/init.d/apache2 restart
|
|
|
|
|
|
## - Install fron source (svn)
|
|
|
|
#svn co https://ffmpeg-php.svn.sourceforge.net/svnroot/ffmpeg-php ffmpeg-php_php-5.3.26
|
|
svn co https://svn.code.sf.net/p/ffmpeg-php/code ffmpeg--php_php-5.3.26
|
|
|
|
cd ffmpeg-php_php-5.4.26/trunk/ffmpeg-php
|
|
|
|
phpize
|
|
./configure --enable-shared
|
|
make
|
|
make install
|
|
|
|
## - in file (/usr/local/apache2/conf/)php.ini add:
|
|
## - extension=ffmpeg.so
|
|
vim /usr/local/apache2/conf/php.ini
|