Apple Silicon 的 FFmpeg 包

FFmpeg package for Apple Silicon

我正在将我们所有的代码移植到 Apple M1 (ARM),我们的一些产品使用 FFmpeg。 是否有任何由 FFmpeg 为 Apple Silicon M1 构建的库包,我在哪里可以找到它们?

https://www.osxexperts.net

上似乎有可用的脚本和构建版本

您可以自己为Apple Silicon 编译ffmpeg。 为此,您需要 Xcode,其中包含所有必要的工具。

您可以下载 Xcode from the App Store, from Apple's website,或在终端应用程序上安装 Xcode 命令行工具 运行 xcode-select --install

获得Xcode后,您需要打开一次接受条款并设置所有内容。系统会要求您输入计算机密码。

设置 Xcode 后,以普通用户身份在终端应用程序上按顺序执行以下命令(不需要也不推荐使用 root)。以 # 开头的行是注释,您不应在终端上执行它们。

# Create and go to a folder where you'll save the ffmpeg source code
mkdir -p /opt/local/src
cd /opt/local/src

# get the ffmpeg source code from the official source
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg

# set up build and begin to compile
./configure --prefix=/opt/local
make
make install

# check that your compiled version of ffmpeg has arm64 (Apple Silicon) architecture
/opt/local/bin/ffmpeg -version