remotion-dev/remotion · error · Error
Comma-separated frame selections are only supported by the l
Error message
Comma-separated frame selections are only supported by the local `remotion render` command. Pass one frame range to render a video on Lambda.
What it means
The Lambda render CLI command (npx remotion lambda render) parses frame selection options via getCliOptions(). If the user passes comma-separated frame ranges (e.g. --frames 0-10,20-30, which results in selectedFrames or an array-of-arrays frameRange), the CLI throws this error because AWS Lambda rendering only supports a single contiguous frame range. Comma-separated multi-range rendering is a local-only feature of the remotion render command.
Source
Thrown at packages/lambda/src/cli/commands/render/render.ts:121
{indent: false, logLevel},
`${BINARY_NAME} ${RENDER_COMMAND} <serve-url> <composition-id> [output-location]`,
);
quit(1);
}
const region = getAwsRegion();
const {envVariables, frameRange, inputProps, selectedFrames} =
CliInternals.getCliOptions({
isStill: false,
logLevel,
indent: false,
});
if (
selectedFrames !== null ||
(Array.isArray(frameRange) && Array.isArray(frameRange[0]))
) {
throw new Error(
'Comma-separated frame selections are only supported by the local `remotion render` command. Pass one frame range to render a video on Lambda.',
);
}
const singleFrameRange = frameRange as SingleFrameRange | null;
const height = overrideHeightOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const width = overrideWidthOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const fps = overrideFpsOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const durationInFrames = overrideDurationOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Pass a single contiguous frame range to Lambda render: --frames=0-30 instead of --frames=0-10,20-30.
- If you need discontinuous frames, render locally with npx remotion render instead of on Lambda.
- Render the full range on Lambda and extract specific frames from the output afterward.
Example fix
# before npx remotion lambda render MyComp --frames=0-10,20-30 # after npx remotion lambda render MyComp --frames=0-30
Defensive patterns
Strategy: validation
Validate before calling
function isSingleFrameRange(frames: string | undefined): boolean {
if (frames === undefined) return true;
// Reject comma-separated multi-range values
return !frames.includes(',');
}
const frames = process.argv.includes('--frames')
? process.argv[process.argv.indexOf('--frames') + 1]
: undefined;
if (!isSingleFrameRange(frames)) {
throw new Error(
'Lambda render supports a single contiguous frame range only. Use local `remotion render` for comma-separated ranges.'
);
} Type guard
type SingleFrameRange = [number, number] | number;
function isSingleFrameRange(v: unknown): v is SingleFrameRange {
if (typeof v === 'number') return true;
if (Array.isArray(v) && v.length === 2 && v.every((n) => typeof n === 'number')) return true;
return false;
} Prevention
- Pass only a single contiguous range (e.g. --frames=0-30) to Lambda render.
- Use local `remotion render` for comma-separated or discontinuous frame selections.
- Validate the --frames flag before submitting a Lambda render job.
When it happens
Trigger: Running npx remotion lambda render <comp> --frames=0-10,20-30 or using --selected-frames with a comma-separated list. The CLI detects either selectedFrames !== null or frameRange being an array where the first element is itself an array (multi-range).
Common situations: User copies a local render command (which supports comma-separated ranges) to Lambda; user expects Lambda to render discontinuous frame sets; user passes a complex frame selection intended for selective local rendering.
Related errors
- Comma-separated `--frames` cannot be combined with `--every-
- Comma-separated frame selections are only supported by the `
- Image format mismatch: ${outName} was given as the ${outName
- Image format mismatch: ${outName} was given as the ${outName
- Cannot find composition with ID "${compNameResult.compName}"
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/fa6f91f1a54355d7.
Report an issue: GitHub.