Skip to content

🎥 Make videos programmatically with React

Render on lambda

Patric Salvisberg89f689a89bb7
diff --git a/packages/docs/docs/recorder/lambda-rendering.mdx b/packages/docs/docs/recorder/lambda-rendering.mdx
new file mode 100644
index 0000000000..ddedbe5dd2
--- /dev/null
+++ b/packages/docs/docs/recorder/lambda-rendering.mdx
@@ -0,0 +1,35 @@
+---
+image: /generated/articles-docs-recorder-lambda-rendering.png
+title: Render on lambda
+crumb: Recorder
+---
+
+# Render on lambda
+
+If you want to render long videos faster or you want to render different versions of your videos at the same time (e.g., for different platforms or different formats), you can take advantage of [@remotion/lambda](/docs/lambda).
+
+## Setup lambda
+
+First you need to set up Remotion Lambda. Follow the instructions shown [here](/docs/lambda/setup) from step 1 to and including step 7.
+
+## Deploy and render
+
+We recommend to add the following function and site deployment as well the render command into a shell script you can execute each time you want to render a video:
+
+```shell
+bunx remotion lambda functions deploy --timeout=3000
+bunx remotion lambda sites create --site-name=<your-site-name> --enable-folder-expire
+bunx remotion lambda render <your-serve-url> <composition-id> --log=verbose --delete-after="1-day"
+```
+
+If you want to render different videos at the same time you can add render commands and change specific props to fit your needs.
+
+For exmaple if you would want to render your video for YouTube, X, and Instagram, your shell script could look like this:
+
+```shell
+bunx remotion lambda functions deploy --timeout=3000
+bunx remotion lambda sites create --site-name=<your-site-name> --enable-folder-expire
+bunx remotion lambda render --props='{"platform": "youtube"}' <your-serve-url> <composition-id> --log=verbose --delete-after="1-day"
+bunx remotion lambda render --props='{"platform": "x"}' <your-serve-url> <composition-id> --log=verbose --delete-after="1-day"
+bunx remotion lambda render --props='{"platform": "instagram"}' <your-serve-url> <composition-id> --log=verbose --delete-after="1-day"
+```
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index dbb49e212c..0df397d099 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -942,6 +942,7 @@ module.exports = {
],
},
"recorder/exporting",
+ "recorder/lambda-rendering",
"recorder/source-control",
"recorder/upgrading",
"recorder/gear",
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index c12314c7f3..95e9f0b7a8 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -996,7 +996,7 @@ export const articles = [
{
id: "functions",
title: "npx remotion lambda functions",
- relativePath: "docs/lambda/cli/functions.md",
+ relativePath: "docs/lambda/cli/functions.mdx",
compId: "articles-docs-lambda-cli-functions",
crumb: "Lambda CLI Reference",
},
@@ -1101,7 +1101,7 @@ export const articles = [
{
id: "deployfunction",
title: "deployFunction()",
- relativePath: "docs/lambda/deployfunction.md",
+ relativePath: "docs/lambda/deployfunction.mdx",
compId: "articles-docs-lambda-deployfunction",
crumb: "Lambda API",
},
@@ -1325,7 +1325,7 @@ export const articles = [
{
id: "runtime",
title: "Runtime",
- relativePath: "docs/lambda/runtime.md",
+ relativePath: "docs/lambda/runtime.mdx",
compId: "articles-docs-lambda-runtime",
crumb: "Lambda",
},
@@ -2318,6 +2318,13 @@ export const articles = [
compId: "articles-docs-recorder-index",
crumb: "Templates",
},
+ {
+ id: "recorder/lambda-rendering",
+ title: "Render on lambda",
+ relativePath: "docs/recorder/lambda-rendering.mdx",
+ compId: "articles-docs-recorder-lambda-rendering",
+ crumb: "Recorder",
+ },
{
id: "recorder/record",
title: "Record a scene",
@@ -3385,7 +3392,7 @@ export const articles = [
{
id: "zod-types/index",
title: "@remotion/zod-types",
- relativePath: "docs/zod-types/index.md",
+ relativePath: "docs/zod-types/index.mdx",
compId: "articles-docs-zod-types-index",
crumb: "Schema",
},
diff --git a/packages/docs/static/generated/articles-docs-recorder-lambda-rendering.png b/packages/docs/static/generated/articles-docs-recorder-lambda-rendering.png
new file mode 100644
index 0000000000..bd923a7006
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-recorder-lambda-rendering.png differ