logo

Installing php-ffmpeg on ubuntu 7.10 from source

Date: 2008-05-22

This tutorial will teach you how to successfully install php-ffmpeg on ubuntu 7.10.

You do not need to follow steps below if you run latest Ubuntu release. You can install php-ffmpeg as a module via aptitude or synaptic.


Before you start with this tutorial please check that php-gd is enabled. php-ffmpeg uses gd to generate screenshots and image manipulation.


Ok, let's go.

Installation of ffmpeg requires php5-dev package. We are going to use phpize5 and which ships with php5-dev package. First install php5-dev if you haven't done it yet.

Code:


sudo apt-get install php5-dev


Follow now these steps below to install php-ffmpeg from source.

1. Install ffmpeg package, ships even with mplayer.

Code:


sudo apt-get install ffmpeg


2. Install libavcodec

Code:


sudo apt-get install libavcodec-dev


3. Install libavcodec1d

Code:


sudo apt-get install libavcodec1d


4. Install mencoder

Code:


sudo apt-get install mencoder


5. Downloaded the ffmpeg-php source:

Code:


wget http://downloads.sourceforge.net/ffmpeg-php/ffmpeg-php-0.5.1.tbz2?modtime=1181869403&big_mirror=0


6. Unpuck and go to unpacked folder and run phpize5 to prepare PHP extension for compilling

7. Run configure

Code:


./configure


8. Run make to compile the code

Code:


make


9. Run make install to install compilation

Code:


sudo make install


Successfull result should look like this:
Installing shared extensions: /usr/lib/php5/20060613+lfs/


10. Edit php.ini file and add:

Code:


extension=ffmpeg.so


I hope this helped?!

Scott

2008-02-10 13:34:25

Might be worth noting that this doesn't work with Ubuntu 7.10 and ffmpeg-php-0.5.1. The make phase of the install results in the compiler crashing out with an error about avformat.h not found. Apparently the "fix" is just to build php and ffmpeg from source.


Deanwww.ubuntudog.com

2008-02-13 17:31:21

You must have done something wrong. Did you install all required packages mentioned above?

I done exactly as I wrote in this tutorial and it worked for me.

If this does not work for you try to install a .deb package instead. You can find it here: http://deb.atomo64.puffinhost.com/


Chippo

2008-02-18 09:41:16

6. Unpuck and go to unpacked folder and run phpize5 to prepare PHP extension for compilling

Where do you get phpize and how do you run it? sorry if this sounds dumb, total noob here


Dean

2008-02-24 23:31:40

Chippo, you get it from
apt-get install php5-dev


abdul

2008-04-17 17:46:06

hi,i when running (make) this message appears :
===
/bin/bash /home/abdul/ffmpeg-php-0.5.1/libtool --mode=compile gcc -I. -I/home/abdul/ffmpeg-php-0.5.1 -DPHP_ATOM_INC -I/home/abdul/ffmpeg-php-0.5.1/include -I/home/abdul/ffmpeg-php-0.5.1/main -I/home/abdul/ffmpeg-php-0.5.1 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/ffmpeg -DHAV


Aviranwww.aviransplace.com

2008-04-22 10:28:26

I'm having the same problem when running make. "avformat.h not found" Any solution ?


Rahul Dev Katareywww.katarey.com

2008-06-05 22:56:40

I am trying to install ffmpeg-php and follow this tutorial but i am getting this error

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg-php.c:76: warning: implicit declaration of function ‘av_register_all’
/usr/local/src/ffmpeg-php-0.5.0/ffmpeg-php.c: In function ‘zm_info_ffmpeg’:
/usr/local/src/ffmpeg-php-0.5.0/ffmpeg-php.c:118: error: ‘LIBAVFORMAT_IDENT’ undeclared (first use in this function)
/usr/local/src/ffmpeg-php-0.5.0/ffmpeg-php.c:118: error: (Each undeclared identifier is reported only on


Ashesh Vashi

2008-10-11 08:45:04

If you get avformat.h, then
use following step:
sudo apt-get install libavformat-dev

Now, Go to the ffmpeg-php-x.x.x directory and follow then apply this command:

make
sudo make install

You may also need to copy /usr/lib/php4/20060613+lfs/ to your local copy of php installation extension directory after applying 10th step.

This should help solve your problem.

Regards,
Ashesh


Robrobshosting.co.uk

2009-03-20 12:07:36

wheres the binary path for ffmpeg after you install ffmpeg?


anshul

2010-03-12 18:17:48

6. Unpuck and go to unpacked folder and run phpize5 to prepare PHP extension for compilling

you write
sudo apt-get install php5-dev

can you tell me in more how I Can ?


Hello! ecdegec intehttp://apxyieo.com/qyoxsx/5.html

2010-05-20 21:09:35

Hello! ecdegec interesting ecdegec site!


php tutorialphpforms.net/tutorial/tutorial.html

2010-06-03 19:22:20

Great article. I'm adding your site to my bookmarks.


Presidentofgalaxywww.presidentofgalaxy.com

2011-08-05 17:05:22

Yes it helped - I had problem installing ffmpeg on ubunto but your article helped me.


Guldpris Gramwww.guldprisgram.se

2012-01-11 22:18:57

php script is god! thanks


ubuntudog.com © 2014 | About | Sitemap | Contact