在 Rosetta 下运行 Apple Silicon
在 Rosetta 下运行 Remotion 在 Apple Silicon(M1 芯片)上可能会慢最多 2 倍。
在 Apple Silicon 上运行 Remotion 的推荐方式是使用具有本机 arm64 架构的 Node 16。
如果在使用 @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
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 版本。
解决方案
- 升级到 Node 16 或更高版本
- 安装 Node 并本机运行
例如,使用 nvm 本机安装 node:
arch -arm64 zshnvm install 16
arch -arm64 zshnvm install 16
您可以通过在终端中输入 arch
来检查您的 shell 架构。
您可以通过在终端中运行 node -p process.arch
来检查 Node 架构。
如果这两者都打印出 arm64
,则表示一切正常。