centos6.5下编译安装FFmpeg
2024-09-06 09:48:14
以下安装步骤基本来自官网,做个笔记以方便自己以后查看
http://trac.ffmpeg.org/wiki/CompilationGuide
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.
- cd ~/ffmpeg_sources
- curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
- tar xzvf yasm-1.2.0.tar.gz
- cd yasm-1.2.0
- ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
- make
- make install
- make distclean
- export "PATH=$PATH:$HOME/bin"
libx264
H.264 video encoder.
- cd ~/ffmpeg_sources
- git clone --depth 1 git://git.videolan.org/x264
- cd x264
- ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
- make
- make install
- make distclean
libfdk_aac
AAC audio encoder.
- cd ~/ffmpeg_sources
- git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac
- cd fdk-aac
- autoreconf -fiv
- ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
- make
- make install
- make distclean
libmp3lame
Opus audio decoder and encoder.
- cd ~/ffmpeg_sources
- curl -O http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
- tar xzvf opus-1.1.tar.gz
- cd opus-1.1
- ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
- make
- make install
- make distclean
libogg
Ogg bitstream library. Required by libtheora and libvorbis.
- cd ~/ffmpeg_sources
- curl -O http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
- tar xzvf libogg-1.3.1.tar.gz
- cd libogg-1.3.1
- ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
- make
- make install
- make distclean
libvorbis
Vorbis audio encoder. Requires libogg.
- cd ~/ffmpeg_sources
- curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
- tar xzvf libvorbis-1.3.4.tar.gz
- cd libvorbis-1.3.4
- ./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared
- make
- make install
- make distclean
libvpx
VP8/VP9 video encoder.
- cd ~/ffmpeg_sources
- git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
- cd libvpx
- ./configure --prefix="$HOME/ffmpeg_build" --disable-examples
- make
- make install
- 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
安装结束查看版本:
最新文章
- 使用samba实现linux与windows共享(测试成功)
- codeforces Gargari and Bishops(很好的暴力)
- quickLinux
- How can I determine the URL that a local Git repository was originally cloned from?
- 基于cmake编译安装MySQL-5.5
- UART UVM验证平台平台搭建总结
- Android开发学习总结(一)——搭建最新版本的Android开发环境
- CentOS查看内核版本,位数,版本号
- Java基础加强学习笔记(二)
- ExcelHelper Excel,Export,Import
- border表格有的自动换行,有的不能自动换行!
- 实现径向变换用于样本增强《Training Neural Networks with Very Little Data-A Draft》
- umask的作用[转]
- 《javascript设计模式与开发实践》阅读笔记(12)—— 享元模式
- ●洛谷P1291 [SHOI2002]百事世界杯之旅
- 2018年IOS/Android UI设计规范
- Centos7/RHEL7 开启kdump
- centos 检测aufs 并安装
- Spring04-SpringEL&;Spring JDBC数据访问
- SunRain
热门文章
- Reactive Extensions入门
- 19. Remove Nth Node From End of List(C++,Python)
- oracle 用mybatis生成主键
- pl/sql 如何配置连接远程一个或多个数据库
- FIR IIR数字滤波器特点简介
- 3d Max 2019安装失败怎样卸载3dsmax?错误提示某些产品无法安装装
- [转]JS对JSON的操作总结
- Java学生管理系统(连接数据库查询)超详细
- hbase常识及habse适合什么场景
- C++中string erase函数的使用