Skip to content

🎥 Make videos programmatically with React

rename renderVideoOnLambda to renderMediaOnLambda.

Jonny Burger0e4918f678bd
diff --git a/packages/bundler/src/homepage/homepage.tsx b/packages/bundler/src/homepage/homepage.tsx
index f190776eac..c231b1668b 100644
--- a/packages/bundler/src/homepage/homepage.tsx
+++ b/packages/bundler/src/homepage/homepage.tsx
@@ -97,7 +97,7 @@ export const Homepage: React.FC = () => {
<p>
You can also render still images, and use the Node.JS APIs{' '}
<code>getCompositions()</code>, <code>renderMedia()</code>,{' '}
- <code>renderVideoOnLambda()</code>, <code>renderStill()</code> and{' '}
+ <code>renderMediaOnLambda()</code>, <code>renderStill()</code> and{' '}
<code>renderStillOnLambda()</code> with this URL.
</p>
<p>
diff --git a/packages/docs/docs/lambda/changelog.md b/packages/docs/docs/lambda/changelog.md
index 541fc69a1b..7aa5fa6cfb 100644
--- a/packages/docs/docs/lambda/changelog.md
+++ b/packages/docs/docs/lambda/changelog.md
@@ -14,7 +14,8 @@ Keep track of changes to the APIs of Remotion Lambda here.
- Visiting a Serve URL in the browser shows a FAQ
- Vast improvements to documentation, CLI documentation complete
-- `downloadVideo()` was renamed to `downloadMedia()`
+- `downloadVideo()` was renamed to `downloadMedia()`. The previous API continues to be available.
+- `renderVideoOnLambda()` was renamed to `renderMediaOnLambda()`. The previous API continues to be available.
## December 15th, 2021 (2)
diff --git a/packages/docs/docs/lambda/checklist.md b/packages/docs/docs/lambda/checklist.md
index ef52072074..e707e6943e 100644
--- a/packages/docs/docs/lambda/checklist.md
+++ b/packages/docs/docs/lambda/checklist.md
@@ -37,7 +37,7 @@ The maximum payload for invoking a Lambda function is 256KB. Ensure that in your
### Bucket privacy
-By default the rendered videos are publicly accessible in your bucket. Use the `privacy` setting in [`renderVideoOnLambda()`](/docs/lambda/rendervideoonlambda) to make renders private if you'd like so.
+By default the rendered videos are publicly accessible in your bucket. Use the `privacy` setting in [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda) to make renders private if you'd like so.
### Rate limiting
diff --git a/packages/docs/docs/lambda/cli/sites.md b/packages/docs/docs/lambda/cli/sites.md
index 1b3cadcc48..744d01c42c 100644
--- a/packages/docs/docs/lambda/cli/sites.md
+++ b/packages/docs/docs/lambda/cli/sites.md
@@ -24,7 +24,7 @@ The result will be a URL such as `https://remotionlambda-12345.s3.eu-central-1.a
You can use this "Serve URL" to render a video on Remotion Lambda using:
- The [`npx remotion lambda render`](/docs/lambda/cli/render) and [`npx remotion lambda still`](/docs/lambda/cli/still) commands
-- The [`renderVideoOnLambda()`](/docs/lambda/rendervideoonlambda) and [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda) functions.
+- The [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda) and [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda) functions.
- Locally using the [`renderMedia()`](/docs/renderer/render-media) and [`renderStill()`](/docs/renderer/render-still) functions.
- Locally using the [`npx remotion render`](/docs/cli) and [`npx remotion still`](/docs/cli) commands
diff --git a/packages/docs/docs/lambda/deploysite.md b/packages/docs/docs/lambda/deploysite.md
index 087e3e1ea3..816f395324 100644
--- a/packages/docs/docs/lambda/deploysite.md
+++ b/packages/docs/docs/lambda/deploysite.md
@@ -107,7 +107,7 @@ An object with the following values:
You can use this "Serve URL" to render a video on Remotion Lambda using:
- The [`npx remotion lambda render`](/docs/lambda/cli/render) and [`npx remotion lambda still`](/docs/lambda/cli/still) commands
- - The [`renderVideoOnLambda()`](/docs/lambda/rendervideoonlambda) and [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda) functions.
+ - The [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda) and [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda) functions.
- Locally using the [`renderMedia()`](/docs/renderer/render-media) and [`renderStill()`](/docs/renderer/render-still) functions.
- Locally using the [`npx remotion render`](/docs/cli) and [`npx remotion still`](/docs/cli) commands
diff --git a/packages/docs/docs/lambda/downloadmedia.md b/packages/docs/docs/lambda/downloadmedia.md
index 480ad84996..d238f570d3 100644
--- a/packages/docs/docs/lambda/downloadmedia.md
+++ b/packages/docs/docs/lambda/downloadmedia.md
@@ -39,11 +39,11 @@ The [AWS region](/docs/lambda/region-selection) in which the render has performe
### `bucketName`
-The bucket name in which you the render was stored. This should be the same variable you used for `renderVideoOnLambda()`.
+The bucket name in which you the render was stored. This should be the same variable you used for `renderMediaOnLambda()`.
### `renderId`
-The ID of the render. You can retrieve this ID by calling [`renderVideoOnLambda()`](/docs/lambda/rendervideoonlambda) or [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda).
+The ID of the render. You can retrieve this ID by calling [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda) or [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda).
### `outPath`
@@ -65,5 +65,5 @@ The size of the file in bytes.
## See also
-- [renderVideoOnLambda()](/docs/lambda/rendervideoonlambda)
+- [renderMediaOnLambda()](/docs/lambda/rendermediaonlambda)
- [renderStillOnLambda()](/docs/lambda/renderstillonlambda)
diff --git a/packages/docs/docs/lambda/getrenderprogress.md b/packages/docs/docs/lambda/getrenderprogress.md
index 94835bde60..b25e25ee72 100644
--- a/packages/docs/docs/lambda/getrenderprogress.md
+++ b/packages/docs/docs/lambda/getrenderprogress.md
@@ -4,23 +4,23 @@ title: getRenderProgress()
slug: /lambda/getrenderprogress
---
-Gets the current status of a render originally triggered via [`renderVideoOnLambda()`](/docs/lambda/rendervideoonlambda).
+Gets the current status of a render originally triggered via [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda).
## Example
```tsx twoslash
// @module: esnext
// @target: es2017
-import {getRenderProgress} from '@remotion/lambda';
+import { getRenderProgress } from "@remotion/lambda";
// ---cut---
const progress = await getRenderProgress({
- renderId: 'd7nlc2y',
- bucketName: 'remotionlambda-d9mafgx',
- functionName: 'remotion-render-la8ffw',
- region: 'us-east-1'
-})
+ renderId: "d7nlc2y",
+ bucketName: "remotionlambda-d9mafgx",
+ functionName: "remotion-render-la8ffw",
+ region: "us-east-1",
+});
```
## API
@@ -29,11 +29,11 @@ Call the function by passing an object with the following properties:
### `renderId`
-The unique identifier for the render that you want to get the progress for. You can get the renderId from the return value of [`renderVideoOnLambda()`](/docs/lambda/rendervideoonlambda).
+The unique identifier for the render that you want to get the progress for. You can get the renderId from the return value of [`renderMediaOnLambda()`](/docs/lambda/renderMediaonlambda).
### `bucketName`
-The bucket in which information about the render is saved. You can get the bucket name from the return value of [`renderVideoOnLambda()`](/docs/lambda/rendervideoonlambda).
+The bucket in which information about the render is saved. You can get the bucket name from the return value of [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda).
### `region`
@@ -118,4 +118,4 @@ TODO
## See also
-- [renderVideoOnLambda()](/docs/lambda/rendervideoonlambda)
+- [renderMediaOnLambda()](/docs/lambda/rendermediaonlambda)
diff --git a/packages/docs/docs/lambda/getsites.md b/packages/docs/docs/lambda/getsites.md
index 7b8c20d214..47520df717 100644
--- a/packages/docs/docs/lambda/getsites.md
+++ b/packages/docs/docs/lambda/getsites.md
@@ -26,7 +26,7 @@ for (const site of sites) {
console.log(site.bucketName); // In which bucket the site resides in.
console.log(site.lastModified); // A unix timestamp, but may also be null
console.log(site.sizeInBytes); // Size of all contents in the folder
- console.log(site.serveUrl); // URL of the deployed site that you can pass to `renderVideoOnLambda()`
+ console.log(site.serveUrl); // URL of the deployed site that you can pass to `renderMediaOnLambda()`
}
for (const bucket of buckets) {
@@ -72,7 +72,7 @@ The combined size of all files in that project.
#### `serveUrl`
-URL of the deployed site. You can pass it into `renderVideoOnLambda()` to render a video.
+URL of the deployed site. You can pass it into `renderMediaOnLambda()` to render a video or audio.
### `buckets`
diff --git a/packages/docs/docs/lambda/light-client.md b/packages/docs/docs/lambda/light-client.md
index a2b717213d..209097d3c1 100644
--- a/packages/docs/docs/lambda/light-client.md
+++ b/packages/docs/docs/lambda/light-client.md
@@ -7,7 +7,7 @@ The following methods and types can be imported from `@remotion/lambda/client`:
```tsx twoslash
import {
- renderVideoOnLambda,
+ renderMediaOnLambda,
renderStillOnLambda,
getRenderProgress,
getFunctions,
diff --git a/packages/docs/docs/lambda/rendermediaonlambda.md b/packages/docs/docs/lambda/rendermediaonlambda.md
new file mode 100644
index 0000000000..1c570fa497
--- /dev/null
+++ b/packages/docs/docs/lambda/rendermediaonlambda.md
@@ -0,0 +1,129 @@
+---
+id: rendermediaonlambda
+title: renderMediaOnLambda()
+---
+
+import { DefaultFramesPerLambda, MinimumFramesPerLambda } from "../../components/lambda/default-frames-per-lambda";
+
+Triggers a render on a lambda given a composition and a lambda function.
+
+## Example
+
+```tsx twoslash
+// @module: esnext
+// @target: es2017
+import { renderVideoOnLambda } from "@remotion/lambda";
+// ---cut---
+
+const { bucketName, renderId } = await renderVideoOnLambda({
+ region: "us-east-1",
+ functionName: "remotion-render-bds9aab",
+ composition: "MyVideo",
+ framesPerLambda: 20,
+ serveUrl:
+ "https://remotionlambda-qg35eyp1s1.s3.eu-central-1.amazonaws.com/sites/bf2jrbfkw",
+ inputProps: {},
+ codec: "h264-mkv",
+ imageFormat: "jpeg",
+ maxRetries: 1,
+ privacy: "public",
+ enableChunkOptimization: true,
+});
+```
+
+## Arguments
+
+An object with the following properties:
+
+### `region`
+
+In which region your Lambda function is deployed. It's highly recommended that your Remotion site is also in the same region.
+
+### `privacy`
+
+Either `"public"` or `"private"`, determining whether the video can be seen by anyone after it's uploaded to the S3 bucket.
+
+### `functionName`
+
+The name of the deployed Lambda function.
+Use [`deployFunction()`](/docs/lambda/deployfunction) to create a new function and [`getFunctions()`](/docs/lambda/getfunctions) to obtain currently deployed Lambdas.
+
+### `framesPerLambda`
+
+The video rendering process gets distributed across multiple Lambda functions. This setting controls how many frames are rendered per Lambda invocation. The lower the number you pass, the more Lambdas get spawned.
+
+Default value: <DefaultFramesPerLambda /> <br/>
+Minimum value: <MinimumFramesPerLambda />
+
+### `serveUrl`
+
+A URL pointing to a Remotion project. Use [`deploySite()`](/docs/lambda/deploysite) to deploy a Remotion project.
+
+### `composition`
+
+The name of the [composition](/docs/composition) you want to render.
+
+### `inputProps`
+
+React props that are passed to your composition. You define the shape of the props that the component accepts.
+
+### `codec`
+
+Which codec should be used to encode the video. At the moment the only supported video codec is `h264-mkv`, which will return a MP4 encoded using H.264, but where the chunks are encoded in the Matruska container. The reason Lambda has a special value is to allow audio to be stitched together seamlessly.
+
+Audio codecs `mp3`, `aac` and `wav` are also supported.
+
+See also [`renderMedia() -> codec`](/docs/renderer/render-media#codec).
+
+### `imageFormat`
+
+See [`renderMedia() -> imageFormat`](/docs/renderer/render-media#imageformat).
+
+### `crf`
+
+See [`renderMedia() -> crf`](/docs/renderer/render-media#crf).
+
+### `envVariables`
+
+See [`renderMedia() -> envVariables`](/docs/renderer/render-media#envvariables).
+
+### `pixelFormat`
+
+See [`renderMedia() -> pixelFormat`](/docs/renderer/render-media#pixelformat).
+
+### `proResProfile`
+
+See [`renderMedia() -> proResProfile`](/docs/renderer/render-media#proresprofile).
+
+### `quality`
+
+See [`renderMedia() -> quality`](/docs/renderer/render-media#quality).
+
+### `maxRetries`
+
+_optional, default `1`_
+
+How often a chunk may be retried to render in case the render fails.
+If a rendering of a chunk is failed, the error will be reported in the [`getRenderProgress()`](/docs/lambda/getrenderprogress) object and retried up to as many times as you specify using this option.
+
+### `enableChunkOptimization`
+
+_Default `true`_
+
+If this is enabled, Remotion will use [chunk optimization](/docs/lambda/chunk-optimization) to learn from a rendering and restructure chunks for subsequent renders of the same composition to optimize for overall render time.
+
+## Return value
+
+Returns a promise resolving to an object containing two properties: `renderId` and `bucketName`. Those are useful for passing to `getRenderProgress()`
+
+### `renderId`
+
+A unique alphanumeric identifier for this render. Useful for obtaining status and finding the relevant files in the S3 bucket.
+
+### `bucketName`
+
+The S3 bucket name in which all files are being saved.
+
+## See also
+
+- [getRenderProgress()](/docs/lambda/getrenderprogress)
diff --git a/packages/docs/docs/lambda/renderstillonlambda.md b/packages/docs/docs/lambda/renderstillonlambda.md
index 51bfb1228e..05af46017e 100644
--- a/packages/docs/docs/lambda/renderstillonlambda.md
+++ b/packages/docs/docs/lambda/renderstillonlambda.md
@@ -6,7 +6,7 @@ slug: /lambda/renderstillonlambda
Renders a still image inside a lambda function and writes it to the specified output location.
-If you want to render a video instead, use [`renderVideoOnLamda()`](/docs/lambda/rendervideoonlambda) instead.
+If you want to render a video or audio instead, use [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda) instead.
If you want to render a still locally instead, use [`renderStill()`](/docs/renderer/render-still) instead.
@@ -120,5 +120,5 @@ A unique alphanumeric identifier for this render. Useful for obtaining status an
## See also
-- [renderVideoOnLambda()](/docs/lambda/rendervideoonlambda)
+- [renderMediaOnLambda()](/docs/lambda/rendermediaonlambda)
- [renderStill()](/docs/renderer/render-still)
diff --git a/packages/docs/docs/lambda/rendervideoonlambda.md b/packages/docs/docs/lambda/rendervideoonlambda.md
index 6b02c61228..4d31210aa1 100644
--- a/packages/docs/docs/lambda/rendervideoonlambda.md
+++ b/packages/docs/docs/lambda/rendervideoonlambda.md
@@ -1,130 +1,10 @@
---
id: rendervideoonlambda
title: renderVideoOnLambda()
-slug: /lambda/rendervideoonlambda
---
-import { DefaultFramesPerLambda, MinimumFramesPerLambda } from "../../components/lambda/default-frames-per-lambda";
+import Redirect from '../../components/Redirect';
-Triggers a render on a lambda given a composition and a lambda function.
+This page has moved. Redirecting...
-## Example
-
-```tsx twoslash
-// @module: esnext
-// @target: es2017
-import { renderVideoOnLambda } from "@remotion/lambda";
-// ---cut---
-
-const { bucketName, renderId } = await renderVideoOnLambda({
- region: "us-east-1",
- functionName: "remotion-render-bds9aab",
- composition: "MyVideo",
- framesPerLambda: 20,
- serveUrl:
- "https://remotionlambda-qg35eyp1s1.s3.eu-central-1.amazonaws.com/sites/bf2jrbfkw",
- inputProps: {},
- codec: "h264-mkv",
- imageFormat: "jpeg",
- maxRetries: 1,
- privacy: "public",
- enableChunkOptimization: true,
-});
-```
-
-## Arguments
-
-An object with the following properties:
-
-### `region`
-
-In which region your Lambda function is deployed. It's highly recommended that your Remotion site is also in the same region.
-
-### `privacy`
-
-Either `"public"` or `"private"`, determining whether the video can be seen by anyone after it's uploaded to the S3 bucket.
-
-### `functionName`
-
-The name of the deployed Lambda function.
-Use [`deployFunction()`](/docs/lambda/deployfunction) to create a new function and [`getFunctions()`](/docs/lambda/getfunctions) to obtain currently deployed Lambdas.
-
-### `framesPerLambda`
-
-The video rendering process gets distributed across multiple Lambda functions. This setting controls how many frames are rendered per Lambda invocation. The lower the number you pass, the more Lambdas get spawned.
-
-Default value: <DefaultFramesPerLambda /> <br/>
-Minimum value: <MinimumFramesPerLambda />
-
-### `serveUrl`
-
-A URL pointing to a Remotion project. Use [`deploySite()`](/docs/lambda/deploysite) to deploy a Remotion project.
-
-### `composition`
-
-The name of the [composition](/docs/composition) you want to render.
-
-### `inputProps`
-
-React props that are passed to your composition. You define the shape of the props that the component accepts.
-
-### `codec`
-
-Which codec should be used to encode the video. At the moment the only supported video codec is `h264-mkv`, which will return a MP4 encoded using H.264, but where the chunks are encoded in the Matruska container. The reason Lambda has a special value is to allow audio to be stitched together seamlessly.
-
-Audio codecs `mp3`, `aac` and `wav` are also supported.
-
-See also [`renderMedia() -> codec`](/docs/renderer/render-media#codec).
-
-### `imageFormat`
-
-See [`renderMedia() -> imageFormat`](/docs/renderer/render-media#imageformat).
-
-### `crf`
-
-See [`renderMedia() -> crf`](/docs/renderer/render-media#crf).
-
-### `envVariables`
-
-See [`renderMedia() -> envVariables`](/docs/renderer/render-media#envvariables).
-
-### `pixelFormat`
-
-See [`renderMedia() -> pixelFormat`](/docs/renderer/render-media#pixelformat).
-
-### `proResProfile`
-
-See [`renderMedia() -> proResProfile`](/docs/renderer/render-media#proresprofile).
-
-### `quality`
-
-See [`renderMedia() -> quality`](/docs/renderer/render-media#quality).
-
-### `maxRetries`
-
-_optional, default `1`_
-
-How often a chunk may be retried to render in case the render fails.
-If a rendering of a chunk is failed, the error will be reported in the [`getRenderProgress()`](/docs/lambda/getrenderprogress) object and retried up to as many times as you specify using this option.
-
-### `enableChunkOptimization`
-
-_Default `true`_
-
-If this is enabled, Remotion will use [chunk optimization](/docs/lambda/chunk-optimization) to learn from a rendering and restructure chunks for subsequent renders of the same composition to optimize for overall render time.
-
-## Return value
-
-Returns a promise resolving to an object containing two properties: `renderId` and `bucketName`. Those are useful for passing to `getRenderProgress()`
-
-### `renderId`
-
-A unique alphanumeric identifier for this render. Useful for obtaining status and finding the relevant files in the S3 bucket.
-
-### `bucketName`
-
-The S3 bucket name in which all files are being saved.
-
-## See also
-
-- [getRenderProgress()](/docs/lambda/getrenderprogress)
+<Redirect redirect="/docs/lambda/rendermediaonlambda"/>
diff --git a/packages/docs/docs/lambda/setup.md b/packages/docs/docs/lambda/setup.md
index e103e99be2..123fcd8c69 100644
--- a/packages/docs/docs/lambda/setup.md
+++ b/packages/docs/docs/lambda/setup.md
@@ -217,7 +217,7 @@ You already have the function name from a previous step. But since you only need
// @target: ESNext
import {
getFunctions,
- renderVideoOnLambda,
+ renderMediaOnLambda,
getRenderProgress,
} from "@remotion/lambda";
@@ -229,14 +229,14 @@ const functions = await getFunctions({
const functionName = functions[0].functionName;
```
-We can now trigger a render using the [`renderVideoOnLambda()`](/docs/lambda/rendervideoonlambda) function.
+We can now trigger a render using the [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda) function.
```ts twoslash
// @module: ESNext
// @target: ESNext
import {
getFunctions,
- renderVideoOnLambda,
+ renderMediaOnLambda,
getRenderProgress,
} from "@remotion/lambda";
@@ -249,7 +249,7 @@ const functions = await getFunctions({
const functionName = functions[0].functionName;
// ---cut---
-const { renderId, bucketName } = await renderVideoOnLambda({
+const { renderId, bucketName } = await renderMediaOnLambda({
region: "us-east-1",
functionName,
serveUrl: url,
@@ -270,7 +270,7 @@ The render will now run and after a while the video will be available in your S3
// @target: ESNext
import {
getFunctions,
- renderVideoOnLambda,
+ renderMediaOnLambda,
getRenderProgress,
} from "@remotion/lambda";
@@ -282,7 +282,7 @@ const functions = await getFunctions({
const functionName = functions[0].functionName;
-const { renderId, bucketName } = await renderVideoOnLambda({
+const { renderId, bucketName } = await renderMediaOnLambda({
region: "us-east-1",
functionName,
serveUrl: url,
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index 524847fd94..663aed24d3 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -81,7 +81,7 @@ module.exports = {
"lambda/getrolepolicy",
"lambda/getorcreatebucket",
"lambda/getrenderprogress",
- "lambda/rendervideoonlambda",
+ "lambda/rendermediaonlambda",
"lambda/renderstillonlambda",
"lambda/simulatepermissions",
],
diff --git a/packages/lambda/src/api/get-render-progress.ts b/packages/lambda/src/api/get-render-progress.ts
index 5bea8933e9..3409a7e3a0 100644
--- a/packages/lambda/src/api/get-render-progress.ts
+++ b/packages/lambda/src/api/get-render-progress.ts
@@ -3,11 +3,11 @@ import {callLambda} from '../shared/call-lambda';
import {LambdaRoutines} from '../shared/constants';
/**
- * @description Gets the current status of a render originally triggered via renderVideoOnLambda().
+ * @description Gets the current status of a render originally triggered via renderMediaOnLambda().
* @link https://remotion-3.vercel.app/docs/lambda/getrenderprogress
* @param {string} params.functionName The name of the function used to trigger the render.
* @param {string} params.bucketName The name of the bucket that was used in the render.
- * @param {string} params.renderId The ID of the render that was returned by `renderVideoOnLambda()`.
+ * @param {string} params.renderId The ID of the render that was returned by `renderMediaOnLambda()`.
* @param {AwsRegion} params.region The region in which the render was triggered.
* @returns See documentation for this function to see all properties on the return object.
*/
diff --git a/packages/lambda/src/api/render-video-on-lambda.ts b/packages/lambda/src/api/render-video-on-lambda.ts
index 6e894bcdc5..82cd1df09b 100644
--- a/packages/lambda/src/api/render-video-on-lambda.ts
+++ b/packages/lambda/src/api/render-video-on-lambda.ts
@@ -18,7 +18,7 @@ import {validateFramesPerLambda} from '../shared/validate-frames-per-lambda';
/**
* @description Triggers a render on a lambda given a composition and a lambda function.
- * @link https://remotion-3.vercel.app/docs/lambda/rendervideoonlambda
+ * @link https://remotion-3.vercel.app/docs/lambda/rendermediaonlambda
* @param params.functionName The name of the Lambda function that should be used
* @param params.serveUrl The URL of the deployed project
* @param params.composition The ID of the composition which should be rendered.
@@ -36,7 +36,7 @@ import {validateFramesPerLambda} from '../shared/validate-frames-per-lambda';
* @returns `Promise<{renderId: string; bucketName: string}>`
*/
-export const renderVideoOnLambda = async ({
+export const renderMediaOnLambda = async ({
functionName,
serveUrl,
inputProps,
@@ -105,3 +105,8 @@ export const renderVideoOnLambda = async ({
bucketName: res.bucketName,
};
};
+
+/**
+ * @deprecated Renamed to renderMediaOnLambda()
+ */
+export const renderVideoOnLambda = renderMediaOnLambda;
diff --git a/packages/lambda/src/cli/commands/render/render.ts b/packages/lambda/src/cli/commands/render/render.ts
index 6fefc026ba..81e41cff88 100644
--- a/packages/lambda/src/cli/commands/render/render.ts
+++ b/packages/lambda/src/cli/commands/render/render.ts
@@ -1,7 +1,7 @@
import {CliInternals} from '@remotion/cli';
import {downloadMedia} from '../../../api/download-video';
import {getRenderProgress} from '../../../api/get-render-progress';
-import {renderVideoOnLambda} from '../../../api/render-video-on-lambda';
+import {renderMediaOnLambda} from '../../../api/render-video-on-lambda';
import {
BINARY_NAME,
DEFAULT_FRAMES_PER_LAMBDA,
@@ -64,7 +64,7 @@ export const renderCommand = async (args: string[]) => {
const privacy = parsedLambdaCli.privacy ?? DEFAULT_OUTPUT_PRIVACY;
validatePrivacy(privacy);
- const res = await renderVideoOnLambda({
+ const res = await renderMediaOnLambda({
functionName,
serveUrl,
inputProps: cliOptions.inputProps,
diff --git a/packages/lambda/src/client.ts b/packages/lambda/src/client.ts
index cbd78eee3d..bfba1453cf 100644
--- a/packages/lambda/src/client.ts
+++ b/packages/lambda/src/client.ts
@@ -1,15 +1,18 @@
-import {renderVideoOnLambda} from './api/render-video-on-lambda';
-import {renderStillOnLambda} from './api/render-still-on-lambda';
+import {getFunctions} from './api/get-functions';
import {getRenderProgress} from './api/get-render-progress';
+import {renderStillOnLambda} from './api/render-still-on-lambda';
+import {
+ renderMediaOnLambda,
+ renderVideoOnLambda,
+} from './api/render-video-on-lambda';
import type {AwsRegion} from './pricing/aws-regions';
import type {RenderProgress} from './shared/constants';
-import {getFunctions} from './api/get-functions';
export {
renderVideoOnLambda,
+ renderMediaOnLambda,
renderStillOnLambda,
getRenderProgress,
getFunctions,
};
-
export type {AwsRegion, RenderProgress};
diff --git a/packages/lambda/src/index.ts b/packages/lambda/src/index.ts
index b2c85497ee..d398845a2e 100644
--- a/packages/lambda/src/index.ts
+++ b/packages/lambda/src/index.ts
@@ -22,7 +22,10 @@ import {
getUserPolicy,
} from './api/iam-validation/suggested-policy';
import {renderStillOnLambda} from './api/render-still-on-lambda';
-import {renderVideoOnLambda} from './api/render-video-on-lambda';
+import {
+ renderMediaOnLambda,
+ renderVideoOnLambda,
+} from './api/render-video-on-lambda';
import {LambdaLSInput, LambdaLsReturnType} from './functions/helpers/io';
import {LambdaInternals} from './internals';
import {AwsRegion} from './pricing/aws-regions';
@@ -42,6 +45,7 @@ export {
getOrCreateBucket,
getRenderProgress,
renderVideoOnLambda,
+ renderMediaOnLambda,
simulatePermissions,
deleteFunction,
getFunctionInfo,