packages/docs/docs/lambda/cli/render.mdx
import {MinimumFramesPerLambda} from '../../../components/lambda/default-frames-per-lambda';
Using the npx remotion lambda render command, you can render a video in the cloud.
The structure of a command is as follows:
npx remotion lambda render <serve-url> [<composition-id>] [<output-location>]
Arguments:
sites create command or by calling deploySite().output-location parameter is optional. If you don't specify it, the video is stored in your S3 bucket. If you specify a location, it gets downloaded to your device in an additional step.Rendering a video:
npx remotion lambda render https://remotionlambda-abcdef.s3.eu-central-1.amazonaws.com/sites/testbed/index.html my-comp
Rendering a video and saving it to out/video.mp4:
npx remotion lambda render https://remotionlambda-abcdef.s3.eu-central-1.amazonaws.com/sites/testbed/index.html my-comp out/video.mp4
Using the shorthand serve URL:
npx remotion lambda render testbed my-comp
:::info If you are using the shorthand serve URL, you have to pass a composition ID. Available compositions can only be fetched if a complete serve URL is passed. :::
Passing in input props:
npx remotion lambda render --props='{"hi": "there"}' testbed my-comp
Printing debug information including a CloudWatch link:
npx remotion lambda render --log=verbose testbed my-comp
Keeping the output video private:
npx remotion lambda render --privacy=private testbed my-comp
Rendering only the audio:
npx remotion lambda render --codec=mp3 testbed my-comp
--regionThe AWS region to select. Both project and function should be in this region.
--props:::note
Inline JSON string isn't supported on Windows shells because it removes the " character, use a file name instead.
:::
--logLog level to be used inside the Lambda function. Also, if you set it to verbose, a link to CloudWatch will be printed where you can inspect logs.
--privacyOne of:
"public" (default): The rendered media is publicly accessible under the S3 URL."private": The rendered media is not publicly available, but signed links can be created using presignUrl()."no-acl" (available from v.3.1.7): The ACL option is not being set at all, this option is useful if you are writing to another bucket that does not support ACL using outName.--max-retriesHow many times a single chunk is being retried if it fails to render. Default 1.
--frames-per-lambdaHow many frames should be rendered in a single Lambda function. Increase it to require less Lambda functions to render the video, decrease it to make the render faster.
Default value: Dependant on video length
Minimum value: <MinimumFramesPerLambda />
:::note
The framesPerLambda parameter cannot result in more than 200 functions being spawned. See: Concurrency
:::
--concurrency<AvailableFrom v="4.0.322" />Specify the number of Lambda functions to use for rendering. This is an alternative to --frames-per-lambda that allows you to set the concurrency directly without needing to know the video duration.
The concurrency is defined as frameCount / framesPerLambda. Remotion will automatically calculate the appropriate framesPerLambda value based on your concurrency setting.
Maximum value: 200
Minimum value: Depends on video length (must result in framesPerLambda >= 4)
:::note
Cannot be used together with --frames-per-lambda. Use only one of them.
:::
--concurrency-per-lambda<AvailableFrom v="3.0.30" />By default, each Lambda function renders with concurrency 1 (one open browser tab). You may use the option to customize this value.
--jpeg-qualityValue between 0 and 100 for JPEG rendering quality. Doesn't work when PNG frames are rendered.
--qualityRenamed to jpegQuality in v4.0.0.
--muted<AvailableFrom v="3.2.1" />Disables audio output. This option may only be used when rendering a video.
--codech264 or h265 or vp8 or vp9 or gif or mp3 or aac or wav or prores. If you don't supply --codec, it will use h264.
av1 is not available on Lambda due to function size constraints.
--audio-codec<AvailableFrom v="3.3.42" />--audio-bitrate<AvailableFrom v="3.2.32" />--video-bitrate<AvailableFrom v="3.2.32" />--prores-profile--x264-preset--gop<AvailableFrom v="4.0.466" />On Lambda, this sets the maximum GOP size per chunk. Additional keyframes will appear at chunk boundaries, every --frames-per-lambda frames.
--crfTo set Constant Rate Factor (CRF) of the output. Minimum 0. Use this rate control mode if you want to keep the best quality and care less about the file size.
--pixel-format--image-format--scaleScales the output frames by the factor you pass in. For example, a 1280x720px frame will become a 1920x1080px frame with a scale factor of 1.5. Vector elements like fonts and HTML markups will be rendered with extra details.
--env-file--frames--every-nth-frame<AvailableFrom v="3.1.0" />For example only every second frame, every third frame and so on. Only works for rendering GIFs. See here for more details.
--number-of-gif-loops<AvailableFrom v="3.1.0" />--timeoutA number describing how long the render may take to resolve all delayRender() calls before it times out. Default: 30000
--out-nameThe file name of the media output as stored in the S3 bucket. By default, it is out plus the appropriate file extension, for example: out.mp4. Must match /([0-9a-zA-Z-!_.*'()/]+)/g.
--overwrite<AvailableFrom v="3.2.25" />If a custom out name is specified and a file already exists at this key in the S3 bucket, decide whether that file will be deleted before the render begins. Default false.
An existing file at the output S3 key will conflict with the render and must be deleted beforehand. If this setting is false and a conflict occurs, an error will be thrown.
--webhook<AvailableFrom v="3.2.30" />Sets a webhook to be called when the render finishes or fails. renderMediaOnLambda() -> webhook.url. To be used together with --webhook-secret.
--webhook-secret<AvailableFrom v="3.2.30" />Sets a webhook secret for the webhook (see above). renderMediaOnLambda() -> webhook.secret. To be used together with --webhook.
--height<AvailableFrom v="3.2.40" />--width<AvailableFrom v="3.2.40" />--fps<AvailableFrom v="4.0.424" />--duration<AvailableFrom v="4.0.424" />--function-name<AvailableFrom v="3.3.38" />Specify the name of the function which should be used to invoke and orchestrate the render. You only need to pass it if there are multiple functions with different configurations.
--renderer-function-name<AvailableFrom v="3.3.38" />If specified, this function will be used for rendering the individual chunks. This is useful if you want to use a function with higher or lower power for rendering the chunks than the main orchestration function.
If you want to use this option, the function must be in the same region, the same account and have the same version as the main function.
--force-bucket-name<AvailableFrom v="3.3.42" />Specify a specific bucket name to be used. This is not recommended, instead let Remotion discover the right bucket automatically.
--ignore-certificate-errorsResults in invalid SSL certificates in Chrome, such as self-signed ones, being ignored.
--disable-web-securityThis will most notably disable CORS in Chrome among other security features.
--dark-mode<AvailableFrom v="4.0.381"/>--gl--user-agent<AvailableFrom v="3.3.83"/>Lets you set a custom user agent that the headless Chrome browser assumes.
--media-cache-size-in-bytes<AvailableFrom v="4.0.352"/>--offthreadvideo-cache-size-in-bytes<AvailableFrom v="4.0.23"/>--offthreadvideo-video-threads<AvailableFrom v="4.0.261"/>--delete-after<AvailableFrom v="4.0.32"/>--webhook-custom-data<AvailableFrom v="4.0.25"/>--color-space<AvailableFrom v="4.0.28"/>--prefer-lossless<AvailableFrom v="4.0.110"/>--metadata<AvailableFrom v="4.0.216" />--sample-rate<AvailableFrom v="4.0.448" />--force-path-style<AvailableFrom v="4.0.202" />Passes forcePathStyle to the AWS S3 client. If you don't know what this is, you probably don't need it.
--storage-class<AvailableFrom v="4.0.305"/>An identifier for the S3 storage class of the rendered media. Default: undefined (which is STANDARD).
--license-key<AvailableFrom v="4.0.409"/>--api-key<AvailableFrom v="4.0.253"/>deprecated in v4.0.409
<Options id="api-key" />