Insall ffmpeg-php on Debian Squeeze
2011-07-28 by xpheas
I compiled PHP5.3 from the php.net sources, so there is no apt ffmpeg-php binary package available for my PHP setup and i build it myself.
First we need the ffmpeg package and some devel packages:
On Squeeze some needed header files are not located under /usr/local/include/ffmpeg so we need to copy them.
Now we cand download and install ffmpeg-php:
To use the extension include it in your php.ini
or load it in your php script:
First we need the ffmpeg package and some devel packages:
BASH-Code:
| apt-get install ffmpeg libswscale0 libswscale-dev libavcodec-dev libavformat-dev |
On Squeeze some needed header files are not located under /usr/local/include/ffmpeg so we need to copy them.
BASH-Code:
| mkdir -p /usr/local/include/ffmpeg cp /usr/include/libswscale/swscale.h /usr/local/include/ffmpeg/ cp /usr/include/libavformat/avformat.h /usr/local/include/ffmpeg/ cp /usr/include/libavformat/avio.h /usr/local/include/ffmpeg/ cp /usr/include/libavcodec/avcodec.h /usr/local/include/ffmpeg/ |
Now we cand download and install ffmpeg-php:
BASH-Code:
| cd /tmp/ wget http://surfnet.dl.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2 tar xfvj ffmpeg-php-0.6.0.tbz2 cd ffmpeg-php-0.6.0 /usr/bin/php5-cgi/phpize ./configure --with-php-config=/usr/bin/php5-cgi/php-config cp /tmp/ffmpeg-php-0.6.0/modules/ffmpeg.so /usr/share/php5-cgi/extensions/ |
To use the extension include it in your php.ini
BASH-Code:
| extension=ffmpeg.so |
or load it in your php script:
BASH-Code:
| dl('ffmpeg.so'); |
« back