Mac FFmpeg编译第三方库

Mac FFmpeg编译第三方库

1.安装Homebrew

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

2.安装依赖库

brew install nasm

brew install pkg-config
brew install x264
brew install x265

3.安装第三方库

如果你需要什么库就安装什么库

brew search 可以搜索包含库关键词的库

image

brew install fdk-aac

4.下载ffmpeg源码

进入源码目录

image

5.执行指令

./configure --prefix="/Users/zzt/Desktop/ffmpegTest/ffmpeg_install" --enable-gpl --enable-nonfree --enable-libx264 --enable-libx265 --disable-shared --enable-static --enable-libfdk-aac

prefix:编译后的输出目录

其他的可查询 .configure -help

6.执行指令 make和make install

__注意:__如果报错说找不到库就加上

--extra-cflags=-I库的include路径

--extra-ldflags=-L库的lib路径

posted @ 2021-08-27 11:16  乘舟凉  阅读(224)  评论(0编辑  收藏  举报