@remotion/renderer
@remotion/renderer 包提供用于服务器端渲染视频的 API。该包还在内部被 Remotion CLI 和 Remotion Lambda 使用。
🌐 The @remotion/renderer package provides APIs for rendering video server-side.
The package is also internally used by the Remotion CLI and Remotion Lambda.
使用这些 API 时,配置文件不起作用。
安装
🌐 Installation
- Remotion CLI
- npm
- bun
- pnpm
- yarn
npx remotion add @remotion/renderer
This assumes you are currently using v4.0.431 of Remotion.npm i --save-exact @remotion/renderer@4.0.431
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.431 of Remotion.pnpm i @remotion/renderer@4.0.431
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.431 of Remotion.bun i @remotion/renderer@4.0.431
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.431 of Remotion.yarn --exact add @remotion/renderer@4.0.431
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.服务端渲染示例
🌐 Server-side rendering examples
请参阅 服务器端渲染 了解一些如何使用服务器端渲染的示例。
🌐 See the Server-side rendering for some examples of how to use server-side rendering.
可用功能
🌐 Available functions
在 @remotion/renderer 包中提供以下 API:
🌐 The following APIs are available in the @remotion/renderer package:
renderMedia() 和 renderFrames() 有什么区别?
🌐 What's the difference between renderMedia() and renderFrames()?
在 Remotion 3.0 中,我们添加了 renderMedia() API,它将 renderFrames() 和 stitchFramesToVideo() 合并为一个简化步骤,并加快了渲染速度。如果可以的话,优先使用 renderMedia()。
🌐 In Remotion 3.0, we added the renderMedia() API which combines renderFrames() and stitchFramesToVideo() into one simplified step and performs the render faster. Prefer renderMedia() if you can.