centos 安裝ffmpeg轉檔

原文
怕原文消失 手動保留於此
http://zumango.net/?p=43
這是我找到可以把ffmpeg安裝起來的文章,也是少數看到有ld.so.conf介紹的文章

FFMPEG
This installation are full and complete installation for latest release of ffmpeg/mplayer/x264 and other module and tested working on Centos 5.3 x86_64 or rhel server, you can use this on Fedora or other linux version that have yum supported, you might need to change the yum to apt-get if you on debian or ubuntu server. Below installation work for major media script like ( adultvideoscript, phpmotion, clipshare, phpfox, adultwatch, etc… )
Edit the /etc/ld.so.conf file and add the following lines
/usr/local/lib
/usr/lib
then run : ldconfig
Installing libraries
add rpmforge or dag repos for yum:
RHEL5 / CentOS-5
for x86_64:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
for PPC:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.ppc.rpm
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.ppc.rpm
Install required libraries using yum
yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran gcc-c++ mesa-libGL-devel mesa-libGLU-devel libXi-devel libXmu-devel freeglut-devel freeglut libtool ncurses-devel libgccgd gd-devel gettext freetypereetype-devel ImageMagick ImageMagick-devel libjpeg* libjpeg-devel* libpng* libpng-devel* libstdc++* libstdc++-devel* libtiff* libtiff-devel* libtool* libungif* libungif-deve* libxml* libxml2* ibxml2-devel* zlib* zlib-devel* automake* autoconf* ncurses patch apr-util -y
install yasm 0.8.0
cd /usr/local/src
wget http://www.tortall.net/projects/yasm/releases/yasm-0.8.0.tar.gz
tar zxvf yasm-0.8.0.tar.gz
cd yasm-0.8.0
./configure && make && make install
Installing opencore-amr
wget http://sourceforge.net/projects/opencore-amr/files/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz/download
tar zxvf opencore-amr-0.1.2.tar.gz
cd opencore-amr-0.1.2
./configure && make && make install
Installing libraw1394
wget http://www.kernel.org/pub/linux/libs/ieee1394/libraw1394-1.3.0.tar.gz
tar zxfv libraw1394-1.3.0.tar.gz
cd libraw1394-1.3.0
./configure
make dev && make && make install
Installing libdc1394
This project requires libraw1394, you must build it first.
wget http://sourceforge.net/projects/libdc1394/files/libdc1394/1.2.2/libdc1394-1.2.2.tar.gz/download
wget http://sourceforge.net/projects/libdc1394/files/libdc1394-2/2.1.2/libdc1394-2.1.2.tar.gz/download
tar zxvf libdc1394-1.2.2.tar.gz
tar zxvf libdc1394-2.1.2.tar.gz
cd libdc1394-1.2.2
./configure
make && make install
cd ../libdc1394-2.1.2
./configure
make && make install
Installing FAAD2
wget http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz
tar zxf faad2-2.6.1.tar.gz
cd faad2
autoreconf -vif
./configure
make && make install
Installing FAAC
wget http://downloads.sourceforge.net/faac/faac-1.26.tar.gz
tar zxfv faac-1.26.tar.gz
cd faac
./bootstrap
./configure
make && make install
Installing libmp3lame
wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz/download
tar zxvf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure
make && make install
Installing OpenJPEG
wget http://openjpeg.googlecode.com/files/openjpeg_v1_3.tar.gz
tar zxvf openjpeg_v1_3.tar.gz
cd OpenJPEG_v1_3
make && make install
Installing libogg
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.4.tar.gz
tar zvxf libogg-1.1.4.tar.gz
cd libogg-1.1.4
./configure
make && make install
Installing libvorbis
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.3.tar.gz
tar zvxf libvorbis-1.2.3.tar.gz
cd libvorbis-1.2.3
./configure
make && make install
Installing vorbistool
wget http://downloads.xiph.org/releases/vorbis/vorbis-tools-1.2.0.tar.gz
tar zvxf vorbis-tools-1.2.0.tar.gz
cd vorbis-tools-1.2.0
./configure
make && make install
Installing libtheora
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
tar jvxf libtheora-1.1.1.tar.bz2
cd libtheora-1.1.1
./configure
make && make install
Installing Xvid
wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
tar zvxf xvidcore-1.2.2.tar.gz
cd xvidcore/build/generic
./configure
make && make install
Installing gpac and MP4Box
wget http://downloads.sourceforge.net/gpac/gpac-0.4.5.tar.gz
wget http://downloads.sourceforge.net/gpac/gpac_extra_libs-0.4.5.tar.gz
tar zxvf gpac-0.4.5.tar.gz
tar zxvf gpac_extra_libs-0.4.5.tar.gz
cd gpac
cp -r ../gpac_extra_libs/* extra_lib/
chmod +x configure
./configure
make lib
make apps
make install-lib
make install
cp bin/gcc/libgpac.so /usr/lib
Installing latest x264
Make sure you installed yasm 0.7.0 or higher, and installed git.
git clone git://git.videolan.org/x264.git
cd x264
./configure –enable-pthread –enable-mp4-output –enable-shared
make
make install
Installing flvtool2 and yamdi
You need ruby to be installed before installing flvtool2, please do as following if you on cpanel server
/scripts/installruby
install flvtool2
wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
tar xvzf flvtool2-1.0.6.tgz
cd flvtool2-1.0.6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
or
gem install flvtool2
install yamdi
yum install yamdi
or
cd /usr/local/src
wget http://sourceforge.net/projects/yamdi/files/yamdi/1.5/yamdi-1.5.tar.gz/download
tar -zxvf yamdi-1.5.tar.gz
cd yamdi-1.5
gcc yamdi.c -o yamdi -O2 -Wall
mv yamdi /usr/bin/
Installing FFMPEG
after library installed please run : ldconfig -v
get and download ffmpeg using svn, make sure you install subversion first before begin, a tutorial for installing subversion can be found in the Linux General sction.
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp
./configure –enable-shared –enable-gpl –enable-version3 –enable-nonfree –enable-pthreads –enable-x11grab –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libdc1394 –enable-libfaac –enable-libmp3lame –enable-libopenjpeg –enable-libtheora –enable-libvorbis –enable-libx264 –enable-libxvid –enable-zlib
make && make install
ldconfig -v
Installing Mplayer and Mencoder
cd /usr/local/src/
wget http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
tar xjvf essential-20071007.tar.bz2
mv /usr/local/src/essential-20071007/ /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
cd /usr/local/src/
wget http://www1.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2
tar jxvf all-20071007.tar.bz2
mv /usr/local/src/all-20071007/ /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer
svn update
./configure
make && make install
Installing mediainfo
wget http://downloads.sourceforge.net/zenlib/libzen0-0.4.9-1.x86_64.CentOS_5.rpm
rpm -ivh libzen0-0.4.9-1.x86_64.CentOS_5.rpm
wget http://downloads.sourceforge.net/mediainfo/libmediainfo0-0.7.26-1.x86_64.CentOS_5.rpm
rpm -ivh libmediainfo0-0.7.26-1.x86_64.CentOS_5.rpm
wget http://downloads.sourceforge.net/mediainfo/mediainfo-0.7.26-1.x86_64.CentOS_5.rpm
rpm -ivh mediainfo-0.7.26-1.x86_64.CentOS_5.rpm
Installing neroAacEnc
wget ftp://ftp6.nero.com/tools/NeroDigitalAudio.zip
unzip NeroDigitalAudio.zip -d nero
cd nero/linux
sudo install -D -m755 neroAacEnc /usr/local/bin