{"record":{"id":"fa6f91f1a54355d7","repo":"remotion-dev/remotion","slug":"comma-separated-frame-selections-are-only-supporte-fa6f91","errorCode":null,"errorMessage":"Comma-separated frame selections are only supported by the local `remotion render` command. Pass one frame range to render a video on Lambda.","messagePattern":"Comma-separated frame selections are only supported by the local `remotion render` command\\. Pass one frame range to render a video on Lambda\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/lambda/src/cli/commands/render/render.ts","lineNumber":121,"sourceCode":"\t\t\t{indent: false, logLevel},\n\t\t\t`${BINARY_NAME} ${RENDER_COMMAND} <serve-url> <composition-id> [output-location]`,\n\t\t);\n\t\tquit(1);\n\t}\n\n\tconst region = getAwsRegion();\n\n\tconst {envVariables, frameRange, inputProps, selectedFrames} =\n\t\tCliInternals.getCliOptions({\n\t\t\tisStill: false,\n\t\t\tlogLevel,\n\t\t\tindent: false,\n\t\t});\n\tif (\n\t\tselectedFrames !== null ||\n\t\t(Array.isArray(frameRange) && Array.isArray(frameRange[0]))\n\t) {\n\t\tthrow new Error(\n\t\t\t'Comma-separated frame selections are only supported by the local `remotion render` command. Pass one frame range to render a video on Lambda.',\n\t\t);\n\t}\n\n\tconst singleFrameRange = frameRange as SingleFrameRange | null;\n\n\tconst height = overrideHeightOption.getValue({\n\t\tcommandLine: CliInternals.parsedCli,\n\t}).value;\n\tconst width = overrideWidthOption.getValue({\n\t\tcommandLine: CliInternals.parsedCli,\n\t}).value;\n\tconst fps = overrideFpsOption.getValue({\n\t\tcommandLine: CliInternals.parsedCli,\n\t}).value;\n\tconst durationInFrames = overrideDurationOption.getValue({\n\t\tcommandLine: CliInternals.parsedCli,\n\t}).value;","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda/src/cli/commands/render/render.ts#L103-L139","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"# before\nnpx remotion lambda render MyComp --frames=0-10,20-30\n\n# after\nnpx remotion lambda render MyComp --frames=0-30","handlingStrategy":"validation","validationCode":"function isSingleFrameRange(frames: string | undefined): boolean {\n  if (frames === undefined) return true;\n  // Reject comma-separated multi-range values\n  return !frames.includes(',');\n}\n\nconst frames = process.argv.includes('--frames')\n  ? process.argv[process.argv.indexOf('--frames') + 1]\n  : undefined;\n\nif (!isSingleFrameRange(frames)) {\n  throw new Error(\n    'Lambda render supports a single contiguous frame range only. Use local `remotion render` for comma-separated ranges.'\n  );\n}","typeGuard":"type SingleFrameRange = [number, number] | number;\n\nfunction isSingleFrameRange(v: unknown): v is SingleFrameRange {\n  if (typeof v === 'number') return true;\n  if (Array.isArray(v) && v.length === 2 && v.every((n) => typeof n === 'number')) return true;\n  return false;\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["lambda","cli","render","frames","feature-limitation"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}