Remotion Lambda 是如何工作的
本文档描述了在触发 Remotion Lambda 视频渲染时执行的过程。
🌐 This document describes the procedure that gets executed when a Remotion Lambda video render is triggered.
本文档解释了从版本 4.0.165 起的 Lambda 架构。
以前,Lambda 函数不使用响应流,而是将数据块保存到 S3。
renderMediaOnLambda()
- either directly or via the CLI which also calls this API. This invocation
is called the main function.progress.json file and periodically uploads it to S3.getRenderProgress() API queries the S3 bucket for the progress.json file and returns
the progress of the render.常见问题
🌐 FAQ
我可以自己开发一个分布式渲染器吗?
🌐 Can I roll my own distributed renderer?
目前,块的无缝连接不是公开的 API。
你可以使用 frameRange 和 audioCodec: "pcm-16" 渲染块,然后使用 FFmpeg 将它们连接起来。
🌐 The seamless concatenation of chunks is not a public API at the moment.
You may render chunks using frameRange and audioCodec: "pcm-16" which you can concatenate using FFmpeg.
构建分布式渲染器很困难,并且不推荐大多数人使用。
🌐 Building a distributed renderer is hard, and not recommended for most.
每个块都会下载所有资源吗?
🌐 Will each chunk download all assets?
每个块将下载在此块中引用的所有资源。 这可能导致资源被多次同时下载,从而可能使服务器不堪重负或触发速率限制。此外,即使资源在 S3 上,你也需要为带宽付费。
在设计你的解决方案时请记住这一点,并考虑使用CDN来提供资源。
🌐 Keep this in mind when designing your solution and consider using a CDN to serve assets.
1) 一个用于避免 S3 带宽费用的 API 被 计划了。