码迷,mamicode.com
首页 > 其他好文 > 详细

Centos 6.6 的FFmpeg简单安装文档

时间:2016-03-16 02:07:28      阅读:595      评论:0      收藏:0      [点我收藏+]

标签:ffmpeg

一、安装工具包   yum install -y automake autoconf libtool gcc gcc-c++ 

所有安装包的下载地址:http://pan.baidu.com/s/1hriJB5U

二、安装具体步骤

1、lame

wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz

(安装lame-3.99.5.tar.gz, 以免在第三步的时候出现ERROR:libmp3lame >= 3.98.3 not found错误, 需要提前安装lame.)

#tar xzvf lame-3.99.5.tar.gz

#cd lame-3.99.5

#./configure --enable-nasm   --prefix=/usr

#make

#make install

2、libogg 

libogg-1.1.3.tar.gz Url:http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz 

安装方法如下:

    1. ./configure --prefix=/usr   

    2. make   

    3. make install  

3、libvorbis 

libvorbis-1.1.2.tar.gz Url:http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz 安装方法如下:

     1. ./configure --prefix=/usr   

     2. make   

    3. make install  

4、xvid 

xvidcore-1.1.3.tar.gz Url:http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz 安装方法如下:

    1. tar zvxf xvidcore-1.1.3.tar.gz   

    2. cd xvidcore-1.1.3/build/generic   

    3. ./configure --prefix=/usr   

    4. make   

    5. make install  

5、x264 

x264-snapshot-20071107-2245.tar.bz2 

Url:http://www.videolan.org/developers/x264.htmlftp://ftp.videolan.org/pub/videolan/x264/snapshots/ 安装方法如下:

    1. bunzip2 x264-snapshot-20070913-2245.tar.bz2   

    2. tar xvf x264-snapshot-20070913-2245.tar   

    3. ./configure --prefix=/usr --enable-shared 

Found yasm 1.0.0.2319
Minimum version is yasm-1.2.0
If you really want to compile without asm, configure with --disable-asm.
说明yasm的版本低了,可以下一个高一点的版本:

http://yasm.tortall.net/releases/Release1.2.0.html
[root@localhost x264-snapshot-20130301-2245-stable]# cd ..
[root@localhost ffmpeg]# tar zxvf yasm-1.2.0.tar.gz ; rm -rf yasm-1.2.0.tar.gz
[root@localhost ffmpeg]# cd yasm-1.2.0
[root@localhost yasm-1.2.0]# ./configure --prefix=/usr
[root@localhost yasm-1.2.0]# make
[root@localhost yasm-1.2.0]# make install
[root@localhost yasm-1.2.0]# cd ../x264-snapshot-20130301-2245-stable/
[root@localhost x264-snapshot-20130301-2245-stable]# 

    4. ./configure --prefix=/usr --enable-shared  

    5. make   

    6. make install 


6、libdts 

libdts-0.0.2.tar.gz http://download.videolan.org/pub/videolan/libdca/0.0.2/libdca-0.0.2.tar.gz 

安装方法:

    1. tar zxvf libdts-0.0.2.tar.gz   

    2. cd libdts-0.0.2  

    3. ./configure --prefix=/usr   

    4. make   

    5. make install  

7、a52 

a52dec-0.7.4.tar.gz http://liba52.sourceforge.net/downloads.html 安装方法:

    1. ./configure --prefix=/usr   

    2. make   

    3. make install  


8、faad2 

faad2-2.6.1.tar.gz http://www.audiocoding.com/downloads.html 安装方法

    1. autoreconf -vif   

    2. ./configure --prefix=/usr --with-mp4v2 --enable-shared   

    3. make   

    4. make install  

9、faac 

faac-1.26.tar.gz http://linux.softpedia.com/progDownload/FAAC-Download-554.html 安装方法:

 yum install -y aclocal autoheader libtoolize automake autoconf libtool

    1. tar zxvf faac-1.26.tar.gz   

    2. cd faac   

    3. ./bootstrap   

    4. ./configure --prefix=/usr   

    5. make    

    6. make install  

In file included from mp4common.h:29:0,from 3gp.cpp:28:
mpeg4ip.h:126:58: error: new declaration ‘char* strcasestr(const char*, const char*)’ /usr/include/string.h:369:28: error: ambiguates old declaration ‘const char* strcasestr(const char*, const char*)’
make[3]: *** [3gp.o] Error 1
make[3]: Leaving directory `/usr/local/pc/ffmpeg/faac-1.28/common/mp4v2‘
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/pc/ffmpeg/faac-1.28/common‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/pc/ffmpeg/faac-1.28‘
make: *** [all] Error 2

解决方法:

修改源文件common/mp4v2/mpeg4ip.h文件
注释掉://char *strcasestr(const char *haystack, const char *needle);这一行

重新编译:

[root@localhost faac-1.28]# make clean ; make
[root@localhost faac-1.28]# make install


ffmpeg开启libfdk_aac和libmp3lame

http://ffmpeg.org/trac/ffmpeg/wiki/AACEncodingGuide
http://yasm.tortall.net/Download.html
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git  

cd fdk-aac  

autoreconf -fiv 

./configure --enable-shared  

make && make install  

编译ffmpeg需要加上的参数   

./configure --enable-libfdk_aac --enable-nonfree --enable-libmp3lame

10、ffmpeg

解压ffmpeg  tar jxvf ffmpeg-2.8.1.tar.bz2

  ./configure --prefix=/usr --enable-gpl --enable-shared --enable-libmp3lame  --enable-libvorbis --enable-libx264     --enable-libfdk_aac --enable-nonfree  --enable-pthreads

make && make install

./configure --enable-libfdk_aac --enable-nonfree --enable-libmp3lame


ffmpeg正常安装后执行ffmpeg时出现如下错误:

ffmpeg: error while loading shared libraries: libavdevice.so.53: cannot open shared object file: No such file or directory

解决办法:

vi /etc/ld.so.conf

加入:/usr/local/lib

执行ldconfig


Centos 6.6 的FFmpeg简单安装文档

标签:ffmpeg

原文地址:http://nanchunle.blog.51cto.com/9244770/1751154

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!