【FFmpeg】在Mac上使用源代码方式安装FFmpeg

全新MacBook,好多工具没有安装,下面一步步记录整个安装过程。

  1. 安装brew工具

  2. 将ffmpeg源码解压,执行configure命令:

./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-libspeex --enable-videotoolbox --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --cc=clang --host-cflags= --host-ldflags=
  1. 问题1:

yasm/nasm not found or too old. Use --disable-yasm for a crippledbuild

解决:

brew install yasm
  1. 问题2:

WARNING: pkg-config not found, library detection may fail.

解决:

brew install pkg-config
  1. 问题3

安装完发现没有生成ffplay。系统缺少sdl2,会导致fflpay无法编译成功,所以先安装sdl2

brew install sdl2

注意:用brew安装的时候,每次都会先检查更新brew,但是brew更新需要外网,所以会卡住很久,直接Ctrl+c就可以了(就执行一次ctrl+c)

  1. 缺啥补啥,要么用brew install安装,要么用源码安装,用源码安装可参考FFmpeg在Linux下安装方法
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值