How Remotion Lambda works
This document describes the procedure that gets executed when a Remotion Lambda video render is triggered.
This document explains the Lambda architecture from version 4.0.165 on.
Previously, Lambda functions did not use Response Streaming, and instead saved chunks to 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?
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?
Each chunk will download all assets that are referenced in this chunk.
This can lead to assets being downloaded many times at the same time, which may overwhelm a server or trigger rate limits.
In addition, you pay for the bandwidth, even if the assets are on S31).
Keep this in mind when designing your solution and consider using a CDN to serve assets.
1) An API for avoiding the S3 bandwidth charge is planned.