remotion-dev / remotion

🎥 Make videos programmatically with React
https://remotion.dev
Other
20.83k stars 1.05k forks source link

renderMedia on 4.0.229 failed running on M1 Pro machine #4517

Closed teyou closed 2 days ago

teyou commented 2 days ago

installed latest remotion 4.0.229, there is an issue with renderMedia

Bug Report 🐛

within my VideoGenerator.ts file first line i have this line of code

import { renderMedia, RenderMediaOnProgress } from "@remotion/renderer";

I am trying to use renderMedia to render file remotely. However, when I try to call my code, it triggers this error even though it is running on M1 Pro arm

Module not found: Can't resolve '@remotion/compositor-win32-x64-msvc'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/@remotion/renderer/dist/index.js
./app/api/debug/VideoGenerator.ts

When i try to install the module manually, it show this error

❯ npm install @remotion/compositor-win32-x64-msvc --save-exact
npm error code EBADPLATFORM
npm error notsup Unsupported platform for @remotion/compositor-win32-x64-msvc@4.0.229: wanted {"os":"win32","cpu":"x64"} (current: {"os":"darwin","cpu":"arm64"})
npm error notsup Valid os:   win32
npm error notsup Actual os:  darwin
npm error notsup Valid cpu:  x64
npm error notsup Actual cpu: arm64

Please help

JonnyBurger commented 2 days ago

Even with the right platform, rendering videos in a Next.js serverless function will not work. https://www.remotion.dev/docs/miscellaneous/vercel-functions

I recommend setting up Remotion Lambda instead!

teyou commented 2 days ago

ah gotcha, i need to use @remotion/lambda