Centos 6.6 的FFmpeg简单安装文档
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos 6.6 的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
[[email protected] x264-snapshot-20130301-2245-stable]# cd ..
[[email protected] ffmpeg]# tar zxvf yasm-1.2.0.tar.gz ; rm -rf yasm-1.2.0.tar.gz
[[email protected] ffmpeg]# cd yasm-1.2.0
[[email protected] yasm-1.2.0]# ./configure --prefix=/usr
[[email protected] yasm-1.2.0]# make
[[email protected] yasm-1.2.0]# make install
[[email protected] yasm-1.2.0]# cd ../x264-snapshot-20130301-2245-stable/
[[email protected] 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);这一行
重新编译:
[[email protected] faac-1.28]# make clean ; make
[[email protected] 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简单安装文档的主要内容,如果未能解决你的问题,请参考以下文章
zabbix 3.0 编译安装到 oracle 数据库中 centos 6.6
Centos X64 6.9版本安装postfix2.6.6+dovecot+openwebmail