This tutorial will teach you how to successfully install php-ffmpeg on ubuntu 7.10 but approach is the same no matter which Ubuntu version you might use.
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.
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.
sudo apt-get install ffmpeg
2. Install libavcodec
sudo apt-get install libavcodec-dev
3. Install libavcodec1d
sudo apt-get install libavcodec1d
4. Install mencoder
sudo apt-get install mencoder
5. Downloaded the ffmpeg-php source:
6. Unpuck and go to unpacked folder and run phpize5 to prepare PHP extension for compilling
7. Run configure
8. Run make to compile the code
9. Run make install to install compilation
sudo make install
Successfull result should look like this:
Installing shared extensions: /usr/lib/php5/20060613+lfs/
10. Edit php.ini file and add:
I hope this helped? Please leave a comment.