Skip to main content

Rosetta 下的苹果硅

在 Apple Silicon(M1 芯片)上通过 Rosetta 运行 Remotion 可能会慢最多 2 倍。

🌐 Running Remotion on Apple Silicon (M1 chip) under Rosetta can be up to 2x slower.

在 Apple Silicon 上运行 Remotion 的推荐方式是使用带有原生 arm64 架构的 Node 16。

🌐 The recommended way to run Remotion on Apple Silicon is using Node 16 with the native arm64 architecture.

如果在使用 @remotion/renderer 时遇到以下警告:

🌐 If you encounter the following warning while using @remotion/renderer:

Apple Silicon detected but running under Rosetta (not arm64 architecture). This will cause performance issues.
Recommended actions:
 - Upgrade to Node 16.0.0 or later
 - Run Node using `arch -arm64` architecture

你要么正在使用 Node 14(在 Apple M1 芯片上使用 Rosetta),要么你正在运行使用 arch -x86_64 安装的 node 版本。

🌐 You are either using Node 14 (which uses Rosetta on Apple M1 chips), or you are running a node version installed with arch -x86_64.

解决方案

🌐 Solution

  1. 升级到 Node 16 或更高版本
  2. 安装 Node 并本地运行它

例如,使用 nvm 本地安装 Node:

🌐 For example, installing node natively using nvm:

arch -arm64 zsh
nvm install 16

你可以通过在终端输入 arch 来检查你的 shell 架构。
你可以通过在终端运行 node -p process.arch 来检查 Node 架构。
如果这两个都输出 arm64,你就可以开始了。

🌐 You can check the architecture of your shell by typing in a terminal arch.
You can check the Node architecture by running in a terminal node -p process.arch.
If both of these print out arm64 you are good to go.