#所有需要安装的包都在contribs目录里。

faac


1. #cd /usr/local/src/contribs  

2. [root@... contribs]# tar zxvffaac-1.28.tar.gz

3. [root@... contribs]# cd faac-1.28

4. [root@... faac-1.28]# ./configure--prefix=/usr/local/ --enable-shared

5.[root@...faac-1.28]# 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”

解决方法:[root@... mp4v2]# cd/usr/local/src/contribs/faac-1.28/common/mp4v2

                    [root@rybxinhua mp4v2]# vim mpeg4ip.h 把第124行的C改成C++,第126行行首加上const,之后在执行make && make instal,问题解决了。


Lame

1.#cd  /usr/local/src/contribs

2.[root@...contribs]# tar zxvf lame-3.98.4.tar.gz

3.[root@...contribs]# cd lame-3.98.4

4.[root@...lame-3.98.4]# ./configure --prefix=/usr/local/ --enable-shared

5.[root@...lame-3.98.4]# make && make install


Libogg

1.#cd  /usr/local/src/contribs

2.[root@...contribs]# tar zxvf libogg-1.3.0.tar.gz

3.[root@...contribs]# cd  libogg-1.3.0

4.[root@...libogg-1.3.0]# ./configure --prefix=/usr/local/ --enable-shared

5.[root@...libogg-1.3.0]# make && make install



Libtheora

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf libtheora-1.1.1.tar.gz

3.[root@... contribs]# cdlibtheora-1.1.1

4.[root@...libtheora-1.1.1]#./configure --prefix=/usr/local/ --enable-shared

5.[root@... libtheora-1.1.1]#ldconfig –v

6.[root@... libtheora-1.1.1]#make && make install



Libvorbis

1.#cd  /usr/local/src/contribs

2. [root@...contribs]# tar zxvf libvorbis-1.3.3.tar.gz

3. [root@...contribs]# cd libvorbis-1.3.3

4. [root@...libvorbis-1.3.3]# ./configure --prefix=/usr/local/ --enable-shared

5.[root@...libvorbis-1.3.3]# make && make install



vo-aacenc

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf vo-aacenc-0.1.2.tar.gz

3.[root@...contribs]# cdvo-aacenc-0.1.2

4.[root@... vo-aacenc-0.1.2]#./configure --prefix=/usr/local/ --enable-shared

5.[root@... vo-aacenc-0.1.2]#make && make install



Yasm

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf yasm-1.2.0.tar.gz

3.[root@... contribs]# cdyasm-1.2.0

4.[root@... yasm-1.2.0]#./configure --prefix=/usr/local/

5.[root@... yasm-1.2.0]# make&& make install



x264-snapshot

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# bunzip2last_x264.tar.bz2

3.[root@... contribs]# tar xvflast_x264.tar

4.[root@... contribs]# cdx264-snapshot-20130505-2245/

5.[root@...x264-snapshot-20130505-2245]# ./configure --prefix=/usr/local/ --enable-shared--enable-pic

6.[root@...x264-snapshot-20130505-2245]# make && make install



libraw1394

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf libraw1394-2.0.5.tar.gz

3.[root@... contribs]# cdlibraw1394-2.0.5

4.[root@... libraw1394-2.0.5]#./configure --prefix=/usr/local/ --enable-shared

5.[root@... libraw1394-2.0.5]#make && make install



libdc1394

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf libdc1394-2.2.1.tar.gz

3.[root@... contribs]# cdlibdc1394-2.2.1

4.[root@... libdc1394-2.2.1]#./configure --prefix=/usr/local/ --enable-shared

                        [root@... libdc1394-2.2.1]# make && make install





Libfreetype

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# unziplibfreetype2-master.zip

3.[root@... contribs]# cdlibfreetype2-master

4.[root@... libfreetype2-master]#./configure --prefix=/usr/local/ --enable-shared

5.[root@...libfreetype2-master]# make && make install




Fribidi

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# bunzip2fribidi-0.19.4.tar.bz2

3.[root@... contribs]# tar xvffribidi-0.19.4.tar

4.[root@... contribs]# cdfribidi-0.19.4

5.[root@... fribidi-0.19.4]#./configure --prefix=/usr/local/ --enable-shared

6.[root@... fribidi-0.19.4]#make && make install



Fontconfig

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf fontconfig-2.9.0.tar.gz

3.[root@... contribs]# cdfontconfig-2.9.0

4.[root@... fontconfig-2.9.0]#./configure --prefix=/usr/local/ --enable-shared

5.[root@... fontconfig-2.9.0]#make && make install



Libass

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf libass-0.10.1.tar.gz

3.[root@... contribs]# cdlibass-0.10.1    

#此时报错:checking for FREETYPE... configure: error:Package requirements (freetype2 >= 9.10.3) were not met:


No package 'freetype2' found

解决方法:[root@rybxinhualibass-0.10.1]# exportPKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

4.[root@... libass-0.10.1]#./configure --prefix=/usr/local/ --enable-shared

5.[root@... libass-0.10.1]#make && make install



Openssl

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf openssl-1.0.1c.tar.gz

3.[root@... contribs]# cdopenssl-1.0.1c

4.[root@... openssl-1.0.1c]# ./config--prefix=/usr/local/ --openssldir=/usr/local/openssl threads zlib-dynamicshared

5.[root@... openssl-1.0.1c]# make&& make install



Rtmpdump

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf rtmpdump-2.3.tgz

3.[root@... contribs]# cdrtmpdump-2.3

4.[root@... rtmpdump-2.3]#make SYS=posix

5.[root@... rtmpdump-2.3]#make install



Speex

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf speex-1.2rc1.tar.gz

3.[root@... contribs]# cdspeex-1.2rc1

4.[root@... speex-1.2rc1]# ./configure--prefix=/usr/local/ --enable-shared --enable-sse

5.[root@... speex-1.2rc1]# make&& make install



Twolame

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf twolame-0.3.13.tar.gz

3.[root@... contribs]# cdtwolame-0.3.13

4.[root@... twolame-0.3.13]#./configure --prefix=/usr/local/ --enable-shared

5.[root@... twolame-0.3.13]#make && make install





FFmpeg

1.#cd  /usr/local/src/contribs

2.[root@... contribs]# tarzxvf ffmpeg.tar.gz

3.[root@... contribs]# cdffmpeg

4.[root@...ffmpeg]#./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.[root@... 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

解决方法:[root@...ffmpeg]# echo "/usr/local/lib" >> /etc/ld.so.conf

[root@... 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