Jun 23rd, 2009
FFMPEG in Debian
FFMPEG in Debian
Install the essentials
apt-get upgrade
apt-get install libjpeg-progs libjpeg62 libjpeg62-dev libsdl1.2-dev php5-dev build-essential
Create a directory and download all the files inside it
wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-6.1.0.4.tar.bz2
Extract all the files
tar zxvf lame-3.97.tar.gz
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz
tar zxvf flvtool2_1.0.5_rc6.tgz
tar jxvf essential-20061022.tar.bz2
tar jxvf ffmpeg-php-0.5.0.tbz2
bzip2 -cd amrnb-6.1.0.4.tar.bz2 | tar xvf -
We need a codec directory
Install Ruby on Rails, subversion & ncurses
Run some SVN queries
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer
svn update
Copy Codecs for mplayer
chmod -R 755 /usr/local/lib/codecs/
We also need to secure the tmp directory
chmod 777 /usr/local/ffmpeg/tmp
export TMPDIR=/usr/local/ffmpeg/tmp
Install lame
./configure
make && make install
Install libogg
./configure && make && make install
Install libvorbis
./configure && make && make install
Install flvtool2
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
Install mplayer & mencoder
./configure –enable-jpeg
make && make install
Install AMR (for 3gp conversion)
./configure
make && make install
Install ffmpeg
./configure –enable-libmp3lame –enable-libogg –enable-libvorbis –disable-mmx –enable-shared –enable-amr-nb
make
make install
ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
ln -s /usr/local/lib/libamrnb.so.2 /usr/lib/libamrnb.so.2
Install ffmpeg-php
phpize
./configure
make
make install
You now need to add the new ffmpeg-php module to the php.ini file
extension=ffmpeg.so (add this line to the end of the file)
Restart & done
Verify your work:
