Vlastni youtube
Z Wikipedie, otevřené encyklopedie.
| Table of contents |
[edit]
Introduction
The following HOWTO will show you exactly how to install the following packages on a Debian Etch or Ubuntu 7.06 system:
- FFmpeg
- FFmpeg-PHP
- Mplayer + Mencoder
- flv2tool
- LAME MP3 Encoder
- AMR (for 3gp file conversions)
- Libogg
- Libvorbis
[edit]
Do some prep-work
apt-get update apt-get upgrade apt-get install apache2 libapache2-mod-php5 php5-mysql mysql-server-5.0 libjpeg-progs libjpeg62 libjpeg62-dev libsdl1.2-dev php5-dev build-essential
[edit]
Download all the files needed
cd /usr/local/src 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
[edit]
Extract all the files
tar zxvf flvtool2_1.0.5_rc6.tgz 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
mkdir /usr/local/lib/codecs/
[edit]
Install Ruby on Rails, subversion & ncurses
apt-get install subversion ruby libcurses-ruby
[edit]
Run some SVN queries
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer cd /usr/local/src/mplayer svn update
[edit]
Copy Codecs for mplayer
mv /usr/src/essential-20061022/* /usr/lib/codecs/ chmod -R 755 /usr/lib/codecs/
We also need to secure the tmp directory
mkdir /usr/src/tmp chmod 777 /usr/src/tmp export TMPDIR=/usr/src/tmp
[edit]
Install lame
cd /usr/local/src/lame-3.97 ./configure make && make install
[edit]
Install libogg
cd /usr/local/src/libogg-1.1.3 ./configure && make && make install
[edit]
Install libvorbis
cd /usr/local/src/libvorbis-1.1.2 ./configure --disable-oggtest && make && make install
[edit]
Install flvtool2
cd /usr/local/src/flvtool2_1.0.5_rc6/ ruby setup.rb config ruby setup.rb setup ruby setup.rb install
[edit]
Install mplayer & mencoder
cd /usr/local/src/mplayer ./configure --enable-jpeg make && make install
[edit]
Install AMR (for 3gp conversion)
apt-get install unzip
cd /usr/local/src/amrnb-6.1.0.4 ./configure make && make install
[edit]
Install ffmpeg
cd /usr/src/ffmpeg/ ./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared --enable-amr-nb
Ubuntu 7.06 users please use the following configure command:
./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared --enable-libamr-nb
make make install ln -s /usr/lib/libavformat.so.50 /usr/lib/libavformat.so.50 ln -s /usr/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51 ln -s /usr/lib/libavutil.so.49 /usr/lib/libavutil.so.49 ln -s /usr/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0 ln -s /usr/lib/libavformat.so.51 /usr/lib/libavformat.so.51 ln -s /usr/lib/libamrnb.so.2 /usr/lib/libamrnb.so.2
[edit]
Install ffmpeg-php
cd /usr/local/src/ffmpeg-php-0.5.0/ phpize ./configure make make install
You now need to add the new ffmpeg-php module to the php.ini file
vim /etc/php5/apache2/php.ini extension=ffmpeg.so (add this line to the end of the file)
[edit]
Restart & done
/etc/init.d/apache2 force-reload
