Installing FFmpeg-PHP

by Baba

Before continuing to install FFmpeg-PHP, you will require to install FFmpeg codec.
To install it you can follow the tutorial here :  Installing FFmpeg
Now for installtion of FFmpeg-PHP give the following commands :
svn co
cd ffmpeg-php
make install
Now you will get output something like the :
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20070922
So remember to adjust the following linebased on what you see as your php path (as it may be different). Here we are using the following path which we found in previous line:
cp /usr/local/php/lib/php/extensions/no-debug-non-zts-20070922/ /usr/local/php/lib/php/extensions/
Now open your php.ini file
php -i | grep ini
Once you have the file open it with an editor, here we will use nano.
nano /usr/local/php/lib/php.ini
In this file Find: extension_dir=
Set your path in this line, using our example it would be like :
Now scroll to the end of the file and add
extension =
Save the file and exit.
You will now have FFmpeg installed, to verify run the following command:
php -i | grep ffmpeg
You will get output regarding ffmpeg
Installation is complete now restart your webserver for the changes to take effect.

{ 1 comment… read it below or add one }

Jithin October 30, 2010 at 10:52 am


When I run ./configure, getting the following error message. Tried to google it but it didn’t help me.

checking for ffmpeg headers…
configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the –enable-shared option

Could you please advice?

Thank you


Leave a Comment

Previous post:

Next post: