FFmpeg 编译

                                                   FFmpeg 编译


下载地址:
https://github.com/FFmpeg/FFmpeg

目录准备:
建立一个目录名为FFmpeg,其中建立两个目录,一个名为build(存放编译相关信息),一个名为FFmpeg-master(源代码)。在build路径中建立一个名为@executable_path的目录,用于存放编译结果。

编译:
1 进入编译路径
cd */FFmpeg/build

2 查看编译参数
../FFmpeg-master/configure -h

--disable-securetransport  disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used

Found private symbol usage.
Symbol: _SecIdentityCreate
From framework: /System/Library/Frameworks/Security.framework/Versions/A/Security
In binary: Contents/MacOS/lib/libavformat.58.dylib


3 编译命令

../FFmpeg-master/configure --prefix=@executable_path --libdir=@executable_path --arch=x86 --enable-shared --disable-static --disable-doc --enable-gpl --enable-version3 --enable-libmp3lame --enable-libtheora --enable-libx264  --enable-libx265 --enable-zlib --enable-libvorbis --enable-libopus --disable-securetransport


../FFmpeg-master/configure --prefix=@executable_path --libdir=@executable_path --arch=x86 --enable-shared --disable-static --disable-doc --enable-gpl --enable-version3 --enable-libmp3lame --enable-libtheora --enable-libx264  --enable-libx265 --enable-zlib --enable-libvorbis --enable-libopus --disable-securetransport

ERROR: opus not found using pkg-config
ERROR: vorbis not found using pkg-config

export PKG_CONFIG_PATH=/usr/local/pkgconfig:/usr/local/lib/pkgconfig:/usr/share/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig
 
如果:没有libx264等库,使用brew install 安装。    

4 编译并安装
make

make install

5 更改各个库的默认搜索路径

libavformat.dylib

install_name_tool -change @executable_path/libavcodec.58.dylib @executable_path/lib/libavcodec.58.dylib "/Volumes/860_500/学习/FFmpeg/build/@executable_path/libavformat.58.dylib"

install_name_tool -change @executable_path/libavcodec.58.dylib @executable_path/lib/libavcodec.58.dylib "/Volumes/860_500/学习/FFmpeg/build/@executable_path/libavformat.58.dylib"
。。。。。。

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值