#所有需要安装的包都在contribs目录里。
faac
1. #cd /usr/local/src/contribs
2. [[email protected] contribs]# tar zxvffaac-1.28.tar.gz
3. [[email protected] contribs]# cd faac-1.28
4. [[email protected] faac-1.28]# ./configure--prefix=/usr/local/ --enable-shared
5.[[email protected]]# make && make install
#此时出现报错:“make[2]: Entering directory`/usr/local/src/contribs/faac-1.28/common‘
Making all in mp4v2
make[3]: Entering directory`/usr/local/src/contribs/faac-1.28/common/mp4v2‘
source=‘3gp.cpp‘ object=‘3gp.o‘ libtool=no \
DEPDIR=.depsdepmode=none /bin/sh ../../depcomp \
g++-DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -Wall -c -o 3gp.o 3gp.cpp
../../depcomp: line 512: exec: g++: notfound
make[3]: *** [3gp.o] Error 127
make[3]: Leaving directory `/usr/local/src/contribs/faac-1.28/common/mp4v2‘
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory`/usr/local/src/contribs/faac-1.28/common‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory`/usr/local/src/contribs/faac-1.28‘
make: *** [all] Error 2”
解决方法:[[email protected] mp4v2]# cd/usr/local/src/contribs/faac-1.28/common/mp4v2
[[email protected] mp4v2]# vim mpeg4ip.h 把第124行的C改成C++,第126行行首加上const,之后在执行make && make instal,问题解决了。
Lame
1.#cd /usr/local/src/contribs
2.[[email protected]]# tar zxvf lame-3.98.4.tar.gz
3.[[email protected]]# cd lame-3.98.4
4.[[email protected]]# ./configure --prefix=/usr/local/ --enable-shared
5.[[email protected]]# make && make install
Libogg
1.#cd /usr/local/src/contribs
2.[[email protected]]# tar zxvf libogg-1.3.0.tar.gz
3.[[email protected]]# cd libogg-1.3.0
4.[[email protected]]# ./configure --prefix=/usr/local/ --enable-shared
5.[[email protected]]# make && make install
Libtheora
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf libtheora-1.1.1.tar.gz
3.[[email protected] contribs]# cdlibtheora-1.1.1
4.[[email protected]]#./configure --prefix=/usr/local/ --enable-shared
5.[[email protected] libtheora-1.1.1]#ldconfig –v
6.[[email protected] libtheora-1.1.1]#make && make install
Libvorbis
1.#cd /usr/local/src/contribs
2. [[email protected]]# tar zxvf libvorbis-1.3.3.tar.gz
3. [[email protected]]# cd libvorbis-1.3.3
4. [[email protected]]# ./configure --prefix=/usr/local/ --enable-shared
5.[[email protected]]# make && make install
vo-aacenc
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf vo-aacenc-0.1.2.tar.gz
3.[[email protected]]# cdvo-aacenc-0.1.2
4.[[email protected] vo-aacenc-0.1.2]#./configure --prefix=/usr/local/ --enable-shared
5.[[email protected] vo-aacenc-0.1.2]#make && make install
Yasm
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf yasm-1.2.0.tar.gz
3.[[email protected] contribs]# cdyasm-1.2.0
4.[[email protected] yasm-1.2.0]#./configure --prefix=/usr/local/
5.[[email protected] yasm-1.2.0]# make&& make install
x264-snapshot
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# bunzip2last_x264.tar.bz2
3.[[email protected] contribs]# tar xvflast_x264.tar
4.[[email protected] contribs]# cdx264-snapshot-20130505-2245/
5.[[email protected]]# ./configure --prefix=/usr/local/ --enable-shared--enable-pic
6.[[email protected]]# make && make install
libraw1394
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf libraw1394-2.0.5.tar.gz
3.[[email protected] contribs]# cdlibraw1394-2.0.5
4.[[email protected] libraw1394-2.0.5]#./configure --prefix=/usr/local/ --enable-shared
5.[[email protected] libraw1394-2.0.5]#make && make install
libdc1394
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf libdc1394-2.2.1.tar.gz
3.[[email protected] contribs]# cdlibdc1394-2.2.1
4.[[email protected] libdc1394-2.2.1]#./configure --prefix=/usr/local/ --enable-shared
[[email protected] libdc1394-2.2.1]# make && make install
Libfreetype
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# unziplibfreetype2-master.zip
3.[[email protected] contribs]# cdlibfreetype2-master
4.[[email protected] libfreetype2-master]#./configure --prefix=/usr/local/ --enable-shared
5.[[email protected]]# make && make install
Fribidi
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# bunzip2fribidi-0.19.4.tar.bz2
3.[[email protected] contribs]# tar xvffribidi-0.19.4.tar
4.[[email protected] contribs]# cdfribidi-0.19.4
5.[[email protected] fribidi-0.19.4]#./configure --prefix=/usr/local/ --enable-shared
6.[[email protected] fribidi-0.19.4]#make && make install
Fontconfig
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf fontconfig-2.9.0.tar.gz
3.[[email protected] contribs]# cdfontconfig-2.9.0
4.[[email protected] fontconfig-2.9.0]#./configure --prefix=/usr/local/ --enable-shared
5.[[email protected] fontconfig-2.9.0]#make && make install
Libass
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf libass-0.10.1.tar.gz
3.[[email protected] contribs]# cdlibass-0.10.1
#此时报错:checking for FREETYPE... configure: error:Package requirements (freetype2 >= 9.10.3) were not met:
No package ‘freetype2‘ found
解决方法:[[email protected]]# exportPKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
4.[[email protected] libass-0.10.1]#./configure --prefix=/usr/local/ --enable-shared
5.[[email protected] libass-0.10.1]#make && make install
Openssl
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf openssl-1.0.1c.tar.gz
3.[[email protected] contribs]# cdopenssl-1.0.1c
4.[[email protected] openssl-1.0.1c]# ./config--prefix=/usr/local/ --openssldir=/usr/local/openssl threads zlib-dynamicshared
5.[[email protected] openssl-1.0.1c]# make&& make install
Rtmpdump
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf rtmpdump-2.3.tgz
3.[[email protected] contribs]# cdrtmpdump-2.3
4.[[email protected] rtmpdump-2.3]#make SYS=posix
5.[[email protected] rtmpdump-2.3]#make install
Speex
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf speex-1.2rc1.tar.gz
3.[[email protected] contribs]# cdspeex-1.2rc1
4.[[email protected] speex-1.2rc1]# ./configure--prefix=/usr/local/ --enable-shared --enable-sse
5.[[email protected] speex-1.2rc1]# make&& make install
Twolame
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf twolame-0.3.13.tar.gz
3.[[email protected] contribs]# cdtwolame-0.3.13
4.[[email protected] twolame-0.3.13]#./configure --prefix=/usr/local/ --enable-shared
5.[[email protected] twolame-0.3.13]#make && make install
FFmpeg
1.#cd /usr/local/src/contribs
2.[[email protected] contribs]# tarzxvf ffmpeg.tar.gz
3.[[email protected] contribs]# cdffmpeg
4.[[email protected]]#./configure --prefix=/usr/local/ --enable-gpl --enable-version3--enable-nonfree --enable-shared --enable-zlib --enable-bzlib --enable-libfaac--enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis--enable-libx264 --enable-pic --enable-pthreads --enable-libdc1394--enable-libass --enable-pic --enable-openssl --enable-libtwolame--enable-libspeex --enable-librtmp --enable-libfreetype
5.[[email protected] ffmpeg]#make&& make install
接下来测试一下ffmpeg是否安装成功:
# ffmpeg –version #出现报错:ffmpeg:error while loading shared libraries: libavdevice.so.55: cannot open sharedobject file: No such file or directory
解决方法:[[email protected]...ffmpeg]# echo "/usr/local/lib" >> /etc/ld.so.conf
[[email protected] ffmpeg]# ldconfig
之后测试一下ffmpeg是否安装成功:
# ffmpeg –version 出现如下信息说明安装成功:
ffmpegversion 2.2.git
built on Apr10 2014 22:32:22 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration:--prefix=/usr/local/ --enable-gpl --enable-version3 --enable-nonfree--enable-shared --enable-zlib --enable-bzlib --enable-libmp3lame--enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libx264--enable-pic --enable-pthreads --enable-libdc1394 --enable-pic--enable-libtwolame --enable-libspeex
libavutil 52. 67.100 / 52. 67.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 34.101 / 55. 34.101
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100