Install FFmpeg-PHP
Before starting this guide, this requires FFmpeg is installed you can see our guide here - Install FFmpeg
Once FFmpeg is installed lets go ahead and install FFmpeg-PHP
Remember to adjust phpize if you have multiple php installations.
svn co https://svn.sourceforge.net/svnroot/ffmpeg-php/trunk/ffmpeg-php
cd ffmpeg-php
phpize
./configure
make
make install
Now you should see something like
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20050922/
So remember to adjust the following based on what you see as your php path may be different, for the rest of the examples we will be using the path above.
cp /usr/local/php/lib/php/extensions/no-debug-non-zts-20050922/ffmpeg.so /usr/local/php/lib/php/extensions/ffmpeg.so
Now open your php.ini
php -i | grep ini
Once you have the file open it with an editor, we will use nano
nano /usr/local/php/lib/php.ini
Find
extension_dir =
Set this to your path, using our example the line would look like
extension_dir = "/usr/local/php/lib/extensions"
Now scroll to the end of the file and add
extension = ffmpeg.so
You should now have FFmpeg installed, to verify execute
php -i | grep ffmpeg
You should see something like
ffmpeg
ffmpeg support (ffmpeg-php) => enabled
ffmpeg-php version => 0.4.9
ffmpeg.allow_persistent => 0 => 0
The installation is now complete, remember to restart your webserver for the changes to take effect. |
| User Comments |
André Bellafronte 2007-07-15 18:35:29 | root@curitiba [/usr/local/src/ffmpeg-php]# phpize
Cannot find config.m4.
Make sure that you run \'/usr/local/bin/phpize\' in the top level source directory of the module
|
|