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?!
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.
Dean — www.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/
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
2008-02-24 23:31:40
Chippo, you get it from
apt-get install php5-dev
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
Aviran — www.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 Katarey — www.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








