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
- Pass a directory path with no extension: `remotion render <comp> --sequence ./out/frames`.
- If you actually want a single video/image file, remove --sequence.
- 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
- Keep image-sequence output paths as plain directory names (e.g. out/frames).
- Build CLI commands from templates that special-case --sequence.
- Assert no '.' in the basename before invoking render in --sequence mode.
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
- Cannot render an image sequence with a codec that renders no
- Both an output flag (--output) and an output location as a p
- Cannot find composition with ID "${compNameResult.compName}"
- The --png flag has been removed. Use --sequence --image-form
- Comma-separated `--frames` cannot be combined with `--every-
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/b222d45a41e712a1.
Report an issue: GitHub.