搭建某個服務器讓我對linux服務器的視頻播放需求的安裝真是深有感悟啊!
1.首先編譯安裝嘛~必要的gcc,直接yum就ok了!
#yum install gcc
2.在裝flvtool2的時候需要用到RUBY,先裝好,也是直接yum!
#yum install ruby
3.做動態鏈接庫路徑
3.做動態鏈接庫路徑
#grep /usr/local/lib /etc/ld.so.conf
#echo "/usr/local/lib" >> /etc/ld.so.conf
#ldconfig
4.安裝libogg
#ldconfig
4.安裝libogg
#mkdir /usr/local/src
#cd /usr/local/src
#wget http://downloads.xiph.org/releases/ogg/libogg-1.1.4.tar.gz
#tar zxvf libogg-1.1.4.tar.gz
#cd /usr/local/src/libogg-1.1.4
#make distclean
#./configure
#make clean
#make
#make install
5.安裝libvorbis
#cd /usr/local/src
#wget http://downloads.xiph.org/releases/ogg/libogg-1.1.4.tar.gz
#tar zxvf libogg-1.1.4.tar.gz
#cd /usr/local/src/libogg-1.1.4
#make distclean
#./configure
#make clean
#make
#make install
5.安裝libvorbis
#mkdir /usr/local/src
#cd /usr/local/src
#wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.3.tar.gz
#tar zxvf libvorbis-1.2.3.tar.gz
#cd /usr/local/src/libvorbis-1.2.3
#make distclean
#./configure
#make clean
#make
#make install
#cd /usr/local/src
#wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.3.tar.gz
#tar zxvf libvorbis-1.2.3.tar.gz
#cd /usr/local/src/libvorbis-1.2.3
#make distclean
#./configure
#make clean
#make
#make install
6.安裝libx264
#mkdir /usr/local/src
#cd /usr/local/src
#wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090830-2245.tar.bz2
#bzip2 -cd x264-snapshot-20090830-2245.tar.bz2 | tar xvf -
#cd /usr/local/src/x264-snapshot-20090830-2245
#make distclean
#./configure --enable-shared
#make clean
#make
#make install
#cd /usr/local/src
#wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090830-2245.tar.bz2
#bzip2 -cd x264-snapshot-20090830-2245.tar.bz2 | tar xvf -
#cd /usr/local/src/x264-snapshot-20090830-2245
#make distclean
#./configure --enable-shared
#make clean
#make
#make install
7.安裝AMR(支持3G)
#mkdir /usr/local/src
#cd /usr/local/src
#wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.2.tar.bz2
#bzip2 -cd amrnb-7.0.0.2.tar.bz2 | tar xvf -
#cd /usr/local/src/amrnb-7.0.0.2
#make distclean
#./configure
#make clean
#make
#make install
8.安裝faad2
#cd /usr/local/src
#wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.2.tar.bz2
#bzip2 -cd amrnb-7.0.0.2.tar.bz2 | tar xvf -
#cd /usr/local/src/amrnb-7.0.0.2
#make distclean
#./configure
#make clean
#make
#make install
8.安裝faad2
#mkdir /usr/local/src
#cd /usr/local/src
#wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz
#tar zxvf faad2-2.7.tar.gz
#cd /usr/local/src/faad2-2.7
#make distclean
#autoreconf -vif
#./configure --with-mp4v2
#make clean
#make
#make install
9.安裝faac
#cd /usr/local/src
#wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz
#tar zxvf faad2-2.7.tar.gz
#cd /usr/local/src/faad2-2.7
#make distclean
#autoreconf -vif
#./configure --with-mp4v2
#make clean
#make
#make install
9.安裝faac
#mkdir /usr/local/src
#cd /usr/local/src
#wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
#tar zxvf faac-1.28.tar.gz
#cd /usr/local/src/faac-1.28
#./configure
#make
#make install
10.安裝lame
#cd /usr/local/src
#wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
#tar zxvf faac-1.28.tar.gz
#cd /usr/local/src/faac-1.28
#./configure
#make
#make install
10.安裝lame
#mkdir /usr/local/src
#cd /usr/local/src
#wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-398-2.tar.gz
#tar zxvf lame-398-2.tar.gz
#cd /usr/local/src/lame-398-2
#make distclean
#./configure
#make clean
#make
#make install
11.安裝flvtool2
#cd /usr/local/src
#wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-398-2.tar.gz
#tar zxvf lame-398-2.tar.gz
#cd /usr/local/src/lame-398-2
#make distclean
#./configure
#make clean
#make
#make install
11.安裝flvtool2
#mkdir /usr/local/src
#cd /usr/local/src
#wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
#tar zxvf flvtool2-1.0.6.tgz
#cd /usr/local/src/flvtool2_1.0.6/
#ruby setup.rb config
#ruby setup.rb setup
#ruby setup.rb install
#cd /usr/local/src
#wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
#tar zxvf flvtool2-1.0.6.tgz
#cd /usr/local/src/flvtool2_1.0.6/
#ruby setup.rb config
#ruby setup.rb setup
#ruby setup.rb install
12.安裝ffmpeg(4.5.6.7.8.9.10插件的安裝都是爲了ffmpeg支持更多格式參數)
#mkdir /usr/local/src
#cd /usr/local/src
#mkdir /usr/local/src/tmp
#chmod 777 /usr/local/src/tmp
#export TMPDIR=/usr/local/src/tmp
#wget http://ffmpeg.mplayerhq.hu/releases/ffmpeg-0.5.tar.bz2
#tar jxf ffmpeg-0.5.tar.bz2
#cd /usr/local/src/ffmpeg-0.5/
#make distclean
#./configure --enable-libmp3lame --enable-libamr-nb --enable-nonfree --enable-libfaad --enable-gpl --disable-mmx --enable-shared --enable-libx264 --enable-libfaac --enable-libvorbis
#make clean
#make
#make install
#ldconfig
#cd /usr/local/src
#mkdir /usr/local/src/tmp
#chmod 777 /usr/local/src/tmp
#export TMPDIR=/usr/local/src/tmp
#wget http://ffmpeg.mplayerhq.hu/releases/ffmpeg-0.5.tar.bz2
#tar jxf ffmpeg-0.5.tar.bz2
#cd /usr/local/src/ffmpeg-0.5/
#make distclean
#./configure --enable-libmp3lame --enable-libamr-nb --enable-nonfree --enable-libfaad --enable-gpl --disable-mmx --enable-shared --enable-libx264 --enable-libfaac --enable-libvorbis
#make clean
#make
#make install
#ldconfig
13.安裝mencoder(mencoder是附帶在mplayer裏,直接安裝mplayer就行了)
#mkdir /usr/local/src
#cd /usr/local/src
#wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2(這個包是mplayer支持的格式)
#tar jxvf all-20071007.tar.bz2
#mv /usr/local/src/all-20071007 /usr/local/lib/codecs/
#chmod -R 755 /usr/local/lib/codecs/
#mkdir /usr/local/src/tmp
#chmod 777 /usr/local/src/tmp
#export TMPDIR=/usr/local/src/tmp
#svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer(這裏使用svn安裝最新的mplayer)
#cd /usr/local/src/mplayer
#svn update
#make distclean
#./configure
#make clean
#make
#make install
#mkdir /usr/local/src
#cd /usr/local/src
#wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2(這個包是mplayer支持的格式)
#tar jxvf all-20071007.tar.bz2
#mv /usr/local/src/all-20071007 /usr/local/lib/codecs/
#chmod -R 755 /usr/local/lib/codecs/
#mkdir /usr/local/src/tmp
#chmod 777 /usr/local/src/tmp
#export TMPDIR=/usr/local/src/tmp
#svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer(這裏使用svn安裝最新的mplayer)
#cd /usr/local/src/mplayer
#svn update
#make distclean
#./configure
#make clean
#make
#make install