renderStillOnVercel()v4.0.426
Experimental package: We reserve the right to make breaking changes in order to correct bad design decisions until this notice is gone.
Renders a still image inside a Vercel Sandbox.
The rendered file stays inside the sandbox. Use uploadToVercelBlob() to upload it to Vercel Blob.
Example
route.tsconst {sandboxFilePath } = awaitrenderStillOnVercel ({sandbox ,compositionId : 'MyComp',inputProps : {title : 'Hello World'},imageFormat : 'png', });
Arguments
An object with the following properties:
sandbox
A Sandbox instance.
compositionId
The ID of the Remotion composition to render.
inputProps
Props to pass to the composition.
imageFormat?
The image format to use when rendering a still. Must be one of "png", "jpeg", "pdf", "webp". Default: "png".
outputFile?
The output file path inside the sandbox. Default: "/tmp/still.png".
frame?
Which frame should be rendered when rendering a still. Default 0. From v3.2.27, negative values are allowed, with -1 being the last frame.
jpegQuality?
Sets the quality of the generated JPEG images. Must be an integer between 0 and 100. Default: 80.
envVariables?
An object containing key-value pairs of environment variables which will be injected into your Remotion project and which can be accessed by reading the global process.env object. Default: {}.
chromiumOptions?
Allows you to set certain Chromium / Google Chrome flags. See: Chromium flags.
scale?
Scales the output dimensions by a factor. For example, a 1280x720px frame will become a 1920x1080px frame with a scale factor of 1.5. See Scaling for more details.
logLevel?
One of trace, verbose, info, warn, error.Determines how much info is being logged to the console.
Default
info.
timeoutInMilliseconds?
A number describing how long the render may take to resolve all delayRender() calls before it times out. Default: 30000
offthreadVideoCacheSizeInBytes?
From v4.0, Remotion has a cache for <OffthreadVideo> frames. The default is null, corresponding to half of the system memory available when the render starts.This option allows to override the size of the cache. The higher it is, the faster the render will be, but the more memory will be used.
The used value will be printed when running in verbose mode.
Default:
null
mediaCacheSizeInBytes?
Specify the maximum size of the cache that <Video> and <Audio> from @remotion/media may use combined, in bytes. The default is half of the available system memory when the render starts.
offthreadVideoThreads?
The number of threads that<OffthreadVideo> can start to extract frames. The default is 2. Increase carefully, as too many threads may cause instability.
licenseKey?
License key for sending a usage event using @remotion/licensing.
onProgress?
function RenderStillOnVercelProgress
A callback that receives render progress updates. Every variant includes overallProgress (0–1).
Return value
An object containing:
sandboxFilePath
The path to the rendered still image inside the sandbox.
contentType
The MIME type of the rendered output (e.g. "image/png", "image/jpeg", "image/webp").