mac编译ffmpeg

- code:

bash 复制代码
git clone https://git.ffmpeg.org/gitweb/ffmpeg.git

- 编译安装

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

- 使用homebrew安装dependency

bash 复制代码
brew install automake fdk-aac git lame libass libtool libvorbis libvpx \
opus sdl shtool texi2html theora wget x264 x265 xvid nasm openssl rtmpdump

其中,

  • ​x264 encodes H.264 video. Use --enable-gpl --enable-libx264.
  • ​fdk-aac encodes AAC audio. Use --enable-libfdk-aac.
  • ​libvpx is a VP8 and VP9 encoder. Use --enable-libvpx.
  • ​libvorbis encodes Vorbis audio . Requires ​libogg. Use --enable-libvorbis.
  • ​libopus encodes Opus audio.
  • ​LAME encodes MP3 audio. Use --enable-libmp3lame.
  • ​libass is a subtitle renderer. Use --enable-libass.
  • openssl and rtmpdump is used for --enable-librtmp.

- configure

因为`openssl安装在/usr/local/opt/openssl@3/`文件夹下,`pkg-config --list-all | grep ssl`找不到libssl, 所以添加PKG_CONFIG_PATH:`export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl@3//lib/pkgconfig`

bash 复制代码
./configure  --prefix=/usr/local/ffmpeg --enable-openssl --enable-librtmp --enable-gpl --enable-nonfree --enable-libass \
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame \
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libopus --enable-libxvid --samples=fate-suite

出错查看ffbuild/config.log,有具体的错误原因

- make and install

bash 复制代码
make
sudo make install
相关推荐
骑着蜗牛撵大象32717 分钟前
用 Codex 批量做数字人商品口播视频:从分镜 JSON 到成片校验的流水线
java·ffmpeg·json·音视频·数字人·视频·codex
加载力科技25 分钟前
Mac解压RAR分卷全攻略-part01part02一键合并
macos·mac 解压 rar 分卷·rar 分卷·part01·mac 解压工具·乐压·分卷合并
企业数字化笔记2 小时前
视频加放大特写后音画不同步怎么办?OpenCV转场与FFmpeg音轨续接实战
opencv·ffmpeg·音视频
2601_967979123 小时前
Opteryx Python库 macOS版本0.0.0a12
python·macos·1024程序员节·wheel·opteryx·alpha
Khalil三省19 小时前
MacBook 刘海显示歌词:让 Mac 也有灵动岛歌词
macos·开源·效率工具·音乐
桌管小李1 天前
终端安全一体化实战:AI 审计、行为分析、零信任、防拍照与远程运维全解析
运维·服务器·网络·人工智能·windows·安全·macos
Piink1 天前
Mac使用Vscode教程
ide·vscode·macos
福大大架构师每日一题1 天前
rust 1.99.1 正式更新:聚焦 UEFI、嵌入式、x86_64 FFI 与 macOS 链接体验的三项修复
开发语言·macos·rust
雪域迷影1 天前
MacOS中杀掉某个端口占用的进程
macos·端口·强杀进程
ManageEngine卓豪2 天前
企业 Mac终端如何统一管控?配置、补丁与应用的落地框架
macos·mdm·uem·终端管理系统