remotion-dev/remotion · error · Error

Comma-separated frame selections are only supported by the `

Error message

Comma-separated frame selections are only supported by the `render` command.

What it means

Thrown by the `remotion benchmark` command when the user passes a comma-separated frame selection (e.g. `--frames=0,10,20`). Frame cherry-picking via the `selectedFrames` CLI option is implemented only for the `render` command; benchmark must render a contiguous range so timings stay meaningful. Passing comma-separated frames to benchmark is therefore rejected outright.

Source

Thrown at packages/cli/src/benchmark.ts:231

		process.exit(1);
	}

	const fullEntryPoint = convertEntryPointToServeUrl(file);

	const {
		inputProps,
		envVariables,
		frameRange: defaultFrameRange,
		selectedFrames,
		ffmpegOverride,
	} = getCliOptions({
		isStill: false,
		logLevel,
		indent: false,
	});

	if (selectedFrames !== null) {
		throw new Error(
			'Comma-separated frame selections are only supported by the `render` command.',
		);
	}

	const unparsedConcurrency = concurrencyOption.getValue({
		commandLine: parsedCli,
	}).value;
	const height = overrideHeightOption.getValue({
		commandLine: parsedCli,
	}).value;
	const width = overrideWidthOption.getValue({
		commandLine: parsedCli,
	}).value;
	const fps = overrideFpsOption.getValue({commandLine: parsedCli}).value;
	const durationInFrames = overrideDurationOption.getValue({
		commandLine: parsedCli,
	}).value;

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Drop the comma-separated `--frames` argument from the `benchmark` invocation; benchmark a contiguous range with `--frames=START-END` instead.
  2. If you need timing data for specific frames, time the equivalent `render` run on those frames yourself.

Example fix

// before
$ remotion benchmark src/index.ts --frames=0,30,60
// after
$ remotion benchmark src/index.ts --frames=0-60
Defensive patterns

Strategy: validation

Validate before calling

// Before calling benchmark, reject comma-separated frame lists.
const frames = String(process.env.REMOTION_FRAMES ?? '');
if (frames.includes(',')) {
  throw new Error('Comma-separated frames are not supported by benchmark; use START-END.');
}

Type guard

const isContiguousRange = (v: string): boolean =>
  /^\d+(-\d+)?$/.test(v.trim());

Prevention

When it happens

Trigger: Running `npx remotion benchmark <entry> --frames=0,30,60` (or any `selectedFrames` value that parses to a non-null list). The check at benchmark.ts:230 fires immediately after `getCliOptions()` returns, before any concurrency/width/height resolution.

Common situations: A developer copies a `render` invocation that uses comma-separated frames and swaps `render` for `benchmark`. CI scripts that parameterize the command name but share a flags object hit this when the frame list is comma-separated.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/b3af6418e7b7cb7c. Report an issue: GitHub.