首先要安装各种解码器

1、lame

lame-3.99.5.tar.gz

Url:http://sourceforge.net/project/showfiles.php?group_id=290&package_id=309

wget http://sourceforge.net/projects/lame/files/latest/download?source=files

tar -zxvf lame-3.99.5.tar.gz

cd lame-3.99.5

./configure --enable-shared

make

make install

cd ../

2、libogg

libogg-1.3.1.tar.gz

Url:http://www.xiph.org/downloads/

wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz

tar -zxvf libogg-1.3.2.tar.gz

cd libogg-1.3.2

./configure

make

make install

cd ../

3、libvorbis

libvorbis-1.3.4.tar.gz

Url:http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz

(libvorbis依赖于libogg, 所以libogg必须先于libvorbis安装)

wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz

tar -zxvf libvorbis-1.3.4.tar.gz

cd libvorbis-1.3.4

./configure

make

make install

cd ../

4、xvid

xvidcore-1.3.2.tar.gz

Url:http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz

wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz

tar -zxvf xvidcore-1.3.2.tar.gz

cd xvidcore

cd build/generic/

./configure

make

make install

cd ../../../

5、x264

latest_x264.tar.bz2 (其中包含的目录是 x264-snapshot-20141218-2245)

Url:http://www.videolan.org/developers/x264.html

wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2

tar -jxvf last_x264.tar.bz2

cd x264-snapshot-20141218-2245/

./configure

出现如下的报错,

Found no assembler

Minimum version is yasm-1.2.0

If you really want to compile without asm, configure with --disable-asm.

这个时候需要先安装yasm

cd ../

wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz

tar -zxvf yasm-1.2.0.tar.gz

cd yasm-1.2.0

./configure

make

make install

cd ../

cd x264-snapshot-20141218-2245/

./configure

make

make install

cd ../

6、libdts

libdca-0.0.5.tar.bz2

Url: http://www.videolan.org/developers/libdca.html

wget http://download.videolan.org/pub/videolan/libdca/0.0.5/libdca-0.0.5.tar.bz2

tar -jxvf libdca-0.0.5.tar.bz2

cd libdca-0.0.5

./configure

make

make install

cd ../

7、a52

a52dec-0.7.4.tar.gz (这个库从2002年就没有更新过了)

http://liba52.sourceforge.net/downloads.html

wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz (这个需要翻墙才能下载)

现在的做法是,通过chrome浏览器下载后,再rz到服务上:

浏览器下载的地址为:http://liba52.sourceforge.net/downloads.html

tar -zxvf a52dec-0.7.4.tar.gz

cd a52dec-0.7.4

./configure

make

make install

cd ../

8、faad2

faad2-2.7.tar.gz (要选择这个扩展名的文件)

http://www.audiocoding.com/downloads.html

wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz

tar -zxvf faad2-2.7.tar.gz

cd faad2-2.7

autoreconf -vif

出现这样的错误

[root@Csss faad2-2.7]# autoreconf -vif

autoreconf: Entering directory `.'

autoreconf: configure.in: not using Gettext

autoreconf: running: aclocal --force

autoreconf: configure.in: tracing

autoreconf: configure.in: not using Libtool

autoreconf: running: /usr/bin/autoconf --force

configure.in:14: error: possibly undefined macro: AC_PROG_LIBTOOL

If this token and others are legitimate, please use m4_pattern_allow.

See the Autoconf documentation.

autoreconf: /usr/bin/autoconf failed with exit status: 1

出现这样的错误,解决办法:

yum install libtool

继续安装:

autoreconf -vif

./configure --with-mp4v2 --enable-shared

出现了如下的错误:

configure: WARNING: unrecognized options: --with-mp4v2

解决办法,通过./configure --help 查看并没有--with-mp4v2 这个编译参数,找到一个类似的--with-mpeg4ip;

./configure --with-mpeg4ip --enable-shared (编译成功)

make

make install

cd ../

9、faac

faac-1.28.tar.gz (要选择这个扩展名的文件)

http://www.audiocoding.com/downloads.html

wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz

tar zxvf faac-1.28.tar.gz

cd faac-1.28

./bootstrap

./configure

make

make install

安装出现如下的错误:

make[2]: Leaving directory /software/faac-1.28/libfaac' Making all in common make[2]: Entering directory /software/faac-1.28/common'

Making all in mp4v2

make[3]: Entering directory /software/faac-1.28/common/mp4v2' g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -Wall -g -O2 -MT 3gp.o -MD -MP -MF .deps/3gp.Tpo -c -o 3gp.o 3gp.cpp In file included from mp4common.h:29, from 3gp.cpp:28: mpeg4ip.h:126: error: new declaration ‘char* strcasestr(const char*, const char*)’ /usr/include/string.h:369: error: ambiguates old declaration ‘const char* strcasestr(const char*, const char*)’ make[3]: *** [3gp.o] Error 1 make[3]: Leaving directory /software/faac-1.28/common/mp4v2'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory /software/faac-1.28/common' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /software/faac-1.28'

make: *** [all] Error 2

根据提示信息,解决办法是:

vim /software/faac-1.28/common/mp4v2/mpeg4ip.h 126删除掉

然后再执行如下的命令:

make clean

make

make install

cd ../

10、amr-nb

amrnb-10.0.0.0.tar.bz2

http://ftp.penguin.cz/pub/users/utx/amr/ ( 该链接已经forbidden 了 )

重新找了一个连接,需要翻墙才可以下载;

https://code.google.com/p/ostube/downloads/detail?name=amrnb-10.0.0.0.tar.bz2&can=2&q=amrnb

我是通过浏览器下载,然后再传到服务器上;

tar -jxvf amrnb-10.0.0.0.tar.bz2

cd amrnb-10.0.0.0

./configure

make

出现报错,连接服务器进行下载26104-a00.zip;显示连接不上服务器,还是需要用浏览器下载,然后传到服务器上;

26104-a00.zip

下载地址为 https://code.google.com/p/ostube/downloads/detail?name=26104-a00.zip&can=2&q=26104-a00.zip

下载完成之后,将此压缩包放到跟make同一级的目录中

继续安装:

make

make install

cd ../

11、amr-wb

https://code.google.com/p/ostube/downloads/detail?name=amrwb-10.0.0.0.tar.bz2&can=2&q=amrwb (该地址可以下载)

tar -jxvf amrwb-10.0.0.0.tar.bz2

cd amrwb-10.0.0.0

./configure

make

make出现如下的报错:

make ./26204-a00_ANSI-C_source_code.zip

make[1]: Entering directory `/software/amrwb-10.0.0.0'

cd . && /usr/bin/wget -N http://ostube.googlecode.com/files/26204-a00.zip

--2015-02-08 20:44:09-- http://ostube.googlecode.com/files/26204-a00.zip

Resolving ostube.googlecode.com... 74.125.203.82, 2404:6800:4008:c07::52

Connecting to ostube.googlecode.com|74.125.203.82|:80... ^Cmake[1]: *** [26204-a00.zip] Interrupt

make: *** [readme.txt] Interrupt

根据报错信息,解决办法:

https://code.google.com/p/ostube/downloads/detail?name=26204-a00.zip&can=2&q=26204-a00.zip 通过这个地址下载26204-a00.zip压缩包传到跟make同一级目录;

继续安装

make

make install

cd ../

12、最后一步,安装ffmpeg

wget http://www.ffmpeg.org/releases/ffmpeg-2.5.3.tar.gz

./configure --enable-shared --prefix=/usr/local/ffmpeg2 --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-postproc --enable-ffserver --enable-ffplay

编译这条语句出错,去掉三个参数,可以成功编译;

./configure --enable-shared --prefix=/usr/local/ffmpeg2 --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-ffserver --enable-ffplay

才可以编译通过

make

make install

测试报错:

[root@C21318 ffmpeg-2.5.3]# /usr/local/ffmpeg2/bin/ffmpeg --help

/usr/local/ffmpeg2/bin/ffmpeg: error while loading shared libraries: libavdevice.so.56: cannot open shared object file: No such file or directory

好的参考文章

http://www.fanjun.me/?tag=centos

ffmpeg安装步骤的更多相关文章

  1. linux下ffmpeg安装

    1.ffmpeg下载地址: http://www.ffmpeg.org/download.html 2.解压 1 $ tar zvfj ffmpeg.tar.bz2 这里作者假设已经重命名为ffmpe ...

  2. linux下ffmpeg安装(转)

    1.ffmpeg下载地址: http://www.ffmpeg.org/download.html 2.解压   1 $ tar xzvf ffmpeg.tar.bz2 这里作者假设已经重命名为ffm ...

  3. ffmpeg 安装,转视频格式为m3u8,压缩视频

    # ffmpegffmpeg 安装,转视频格式为m3u8,压缩视频 ## ffmpeg 安装直接安装: apt-get install ffmpeg 运行 `ffmpeg` 看是否出现版本号以判断是否 ...

  4. 如何搭建SVN服务器,详细安装步骤。

    SVN服务器端安装 下载: VisualSVN是一款图形化svn服务器.官网 http://www.visualsvn.com/server/ 下载地址: http://www.visualsvn.c ...

  5. arcgis10.2.2桌面版具体的安装步骤过程

    先声明一下,这里的截图虽说是ArcGIS10.1版本的,但是安装步骤是对的,本人用ArcGIS10.2.2软件测试成功安装上 一.ArcGIS许可证管理器安装 1.在软件包文件夹license man ...

  6. LoadRunner 11 安装步骤

    loadrunner 安装步骤: LoadRunner11下载:  在网上可以搜索到,在这个就不提供了. LoadRunner11原理: 破解方法和以前版本相同,我用的是LR8.0的破解文件,同样实用 ...

  7. MySQL安装步骤

    MySQL安装步骤 1. 下载MySQL Community Server 5.6.21,注意选择系统类型(32位/64位) 2. 解压MySQL压缩包 将以下载的MySQL压缩包解压到自定义目录下. ...

  8. Java开发工具安装步骤内容如下

    Java开发工具安装步骤内容如下 安装 开发工具 STS 链接下载网址 eclipse 链接下载网址 JDK安装 jdk链接下载地址 Marven环境 marven链接下载地址 Tomcat tomc ...

  9. PhantomJS linux系统下安装步骤及使用方法(网页截屏功能)

    PhantomJS 是一个基于 WebKit 的服务器端 JavaScript API.它全面支持web而不需浏览器支持,其快速,原生支持各种Web标准: DOM 处理, CSS 选择器, JSON, ...

随机推荐

  1. Python3基础-代码阅读系列—素数

    生成素数代码展示 质数(prime number)又称素数,有无限个. 质数定义为在大于1的自然数中,除了1和它本身以外不再有其他因数. primenumber = [] upperlimit = 2 ...

  2. Linux服务部署--Java(一)

    网络配置 一.配置dns 1.修改/etc/NetworkManager/NetworkManager.conf 文件,在main部分添加 “dns=none” 选项: 2.NetworkManage ...

  3. Book Sharing

    到现在还不知道为什么我设置的背景图片为什么没有效果,明明是按照网上的教程来的,但...........好气哦,,,,,,,,,嗯哼嗯哼嗯哼 说实话:自己写的网页真丑   .....真丑 index.h ...

  4. 全球第一款纯数据GPRS模块 有方M590 概述

    更多精彩请到http://blog.tuzhuke.info/?cat=30 M590为全球第一款纯数据GPRS模块,专注数据收发功能,GPRS数据以及短信数据.没有电话语音功能,可以能够拨打或者接听 ...

  5. 让资源管理器变得像Chrome一样标签化

    让资源管理器变得像Chrome一样标签化 前段时间WIn10开发者预览版发布了更新通知,其中一个主要特性就是给资源管理器添加了标签化的功能. 习惯了各种浏览器便捷的标签化管理,早就想要这个实用的功能了 ...

  6. C#中Key事件

    在键盘按下键然后释放的过程中有3个事件发生,分别为KeyDown事件.KeyPress事件和KeyUp事件. KeyDown和KeyUp事件让应用程序捕捉用户在键盘上按下的特殊键或某些特定键甚至组合键 ...

  7. redis(二)

    基本配置 在源文件/usr/local/redis目录下,文件redis.conf为配置文件 绑定地址:如果需要远程访问,可将此行注释 bind 127.0.0.1 端口,默认为6379 port 6 ...

  8. 自己遇到过的出现java.lang.StackOverflowError的原因

    public static JSONArray geth24Weather(String result) {//获取当天24小时以及第二天的天气结果对象        JSONObject fromO ...

  9. pygame-KidsCanCode系列jumpy-part13-改进跳跃

    这节研究下跳跃如何做得更自然,先看看之前的跳跃有什么问题,我们把settings.py里的初始化参数调整下: # starting platform # PLATFORM_LIST = [(5, HE ...

  10. SpringCloud无废话入门05:Spring Cloud Gateway路由、filter、熔断

    1.什么是路由网关 截至目前为止的例子中,我们创建了一个service,叫做:HelloService,然后我们把它部署到了两台服务器(即提供了两个provider),然后我们又使用ribbon将其做 ...