remotion-dev/remotion · error · Error

The output directory of the image sequence cannot have an ex

Error message

The output directory of the image sequence cannot have an extension. Got: ${extension}

What it means

Thrown by getOutputFilename when imageSequence mode is active and the resolved output location has a file extension (a '.' segment that RenderInternals.getExtensionOfFilename treats as an extension). In --sequence mode the output path is a DIRECTORY into which individual frame files (e.g. frame_0000000.png) are written, so it must not look like a single file.

Source

Thrown at packages/cli/src/get-filename.ts:41

	logLevel: LogLevel;
}): string => {
	if (fromUi) {
		return fromUi;
	}

	const filename = getOutputLocation({
		compositionId: compositionName,
		defaultExtension,
		args,
		type: imageSequence ? 'sequence' : 'asset',
		outputLocationFromUi: null,
		compositionDefaultOutName,
	});

	const extension = RenderInternals.getExtensionOfFilename(String(filename));
	if (imageSequence) {
		if (extension !== null) {
			throw new Error(
				'The output directory of the image sequence cannot have an extension. Got: ' +
					extension,
			);
		}

		return String(filename);
	}

	if (extension === null && !imageSequence) {
		Log.warn(
			{indent, logLevel},
			`No file extension specified, adding ${defaultExtension} automatically.`,
		);
		return `${filename}.${defaultExtension}`;
	}

	return String(filename);
};

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Pass a directory path with no extension: `remotion render <comp> --sequence ./out/frames`.
  2. If you actually want a single video/image file, remove --sequence.
  3. Check getDefaultOutLocation logic or your compositionDefaultOutName if the bad extension comes from defaults.

Example fix

// before
$ npx remotion render MyComp --sequence out/video.png
// after
$ npx remotion render MyComp --sequence out/frames
Defensive patterns

Strategy: validation

Validate before calling

const validateSequenceOutput = (out: string) => {
  const ext = out.split('/').pop();
  if (ext && ext.includes('.')) {
    throw new Error(`Image-sequence output must be a directory without extension: ${out}`);
  }
};

if (imageSequence) validateSequenceOutput(outputLocation);

Type guard

const isExtensionlessDir = (p: string): boolean =>
  !path.basename(p).includes('.');

Prevention

When it happens

Trigger: Running `remotion render --sequence` and passing an output location with a dot extension such as `out/video.png` or `frames.zip`. Combining --sequence with an output name copied from a single-file render command.

Common situations: Reusing a single-file render command and just adding --sequence; forgetting that image-sequence output is a folder; CI scripts that suffix the output with the codec extension.

Related errors


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