以下安装步骤基本来自官网,做个笔记以方便自己以后查看

http://trac.ffmpeg.org/wiki/CompilationGuide

1.安装依赖包

  1. <span style="font-size:14px;">yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel</span>

2.新建文件夹存放源码

mkdir ~/ffmpeg_sources

3.编译&安装

Yasm

Yasm is an assembler used by x264 and FFmpeg.

  1. cd ~/ffmpeg_sources
  2. curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
  3. tar xzvf yasm-1.2.0.tar.gz
  4. cd yasm-1.2.0
  5. ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
  6. make
  7. make install
  8. make distclean
  9. export "PATH=$PATH:$HOME/bin"

libx264

H.264 video encoder.

  1. cd ~/ffmpeg_sources
  2. git clone --depth 1 git://git.videolan.org/x264
  3. cd x264
  4. ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
  5. make
  6. make install
  7. make distclean

libfdk_aac

AAC audio encoder.

  1. cd ~/ffmpeg_sources
  2. git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac
  3. cd fdk-aac
  4. autoreconf -fiv
  5. ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
  6. make
  7. make install
  8. make distclean

libmp3lame

Opus audio decoder and encoder.

  1. cd ~/ffmpeg_sources
  2. curl -O http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
  3. tar xzvf opus-1.1.tar.gz
  4. cd opus-1.1
  5. ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
  6. make
  7. make install
  8. make distclean

libogg

Ogg bitstream library. Required by libtheora and libvorbis.

  1. cd ~/ffmpeg_sources
  2. curl -O http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
  3. tar xzvf libogg-1.3.1.tar.gz
  4. cd libogg-1.3.1
  5. ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
  6. make
  7. make install
  8. make distclean

libvorbis

Vorbis audio encoder. Requires libogg.

  1. cd ~/ffmpeg_sources
  2. curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
  3. tar xzvf libvorbis-1.3.4.tar.gz
  4. cd libvorbis-1.3.4
  5. ./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared
  6. make
  7. make install
  8. make distclean

libvpx

VP8/VP9 video encoder.

  1. cd ~/ffmpeg_sources
  2. git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
  3. cd libvpx
  4. ./configure --prefix="$HOME/ffmpeg_build" --disable-examples
  5. make
  6. make install
  7. make clean

注意:由于国内最近无法访问Google所以libvpx无法git clone ,此时可以去别处下载:http://yunpan.cn/QhNk5tDqQV3MM  访问密码 45f6

FFmpeg

cd ~/ffmpeg_sources
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
export PKG_CONFIG_PATH
./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
make
make install
make distclean
hash -r
. ~/.bash_profile

安装结束查看版本:

最新文章

  1. 使用samba实现linux与windows共享(测试成功)
  2. codeforces Gargari and Bishops(很好的暴力)
  3. quickLinux
  4. How can I determine the URL that a local Git repository was originally cloned from?
  5. 基于cmake编译安装MySQL-5.5
  6. UART UVM验证平台平台搭建总结
  7. Android开发学习总结(一)——搭建最新版本的Android开发环境
  8. CentOS查看内核版本,位数,版本号
  9. Java基础加强学习笔记(二)
  10. ExcelHelper Excel,Export,Import
  11. border表格有的自动换行,有的不能自动换行!
  12. 实现径向变换用于样本增强《Training Neural Networks with Very Little Data-A Draft》
  13. umask的作用[转]
  14. 《javascript设计模式与开发实践》阅读笔记(12)—— 享元模式
  15. ●洛谷P1291 [SHOI2002]百事世界杯之旅
  16. 2018年IOS/Android UI设计规范
  17. Centos7/RHEL7 开启kdump
  18. centos 检测aufs 并安装
  19. Spring04-SpringEL&amp;Spring JDBC数据访问
  20. SunRain

热门文章

  1. Reactive Extensions入门
  2. 19. Remove Nth Node From End of List(C++,Python)
  3. oracle 用mybatis生成主键
  4. pl/sql 如何配置连接远程一个或多个数据库
  5. FIR IIR数字滤波器特点简介
  6. 3d Max 2019安装失败怎样卸载3dsmax?错误提示某些产品无法安装装
  7. [转]JS对JSON的操作总结
  8. Java学生管理系统(连接数据库查询)超详细
  9. hbase常识及habse适合什么场景
  10. C++中string erase函数的使用