{"record":{"id":"b222d45a41e712a1","repo":"remotion-dev/remotion","slug":"the-output-directory-of-the-image-sequence-cannot","errorCode":null,"errorMessage":"The output directory of the image sequence cannot have an extension. Got: ${extension}","messagePattern":"The output directory of the image sequence cannot have an extension\\. Got: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/get-filename.ts","lineNumber":41,"sourceCode":"\tlogLevel: LogLevel;\n}): string => {\n\tif (fromUi) {\n\t\treturn fromUi;\n\t}\n\n\tconst filename = getOutputLocation({\n\t\tcompositionId: compositionName,\n\t\tdefaultExtension,\n\t\targs,\n\t\ttype: imageSequence ? 'sequence' : 'asset',\n\t\toutputLocationFromUi: null,\n\t\tcompositionDefaultOutName,\n\t});\n\n\tconst extension = RenderInternals.getExtensionOfFilename(String(filename));\n\tif (imageSequence) {\n\t\tif (extension !== null) {\n\t\t\tthrow new Error(\n\t\t\t\t'The output directory of the image sequence cannot have an extension. Got: ' +\n\t\t\t\t\textension,\n\t\t\t);\n\t\t}\n\n\t\treturn String(filename);\n\t}\n\n\tif (extension === null && !imageSequence) {\n\t\tLog.warn(\n\t\t\t{indent, logLevel},\n\t\t\t`No file extension specified, adding ${defaultExtension} automatically.`,\n\t\t);\n\t\treturn `${filename}.${defaultExtension}`;\n\t}\n\n\treturn String(filename);\n};","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cli/src/get-filename.ts#L23-L59","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\n$ npx remotion render MyComp --sequence out/video.png\n// after\n$ npx remotion render MyComp --sequence out/frames","handlingStrategy":"validation","validationCode":"const validateSequenceOutput = (out: string) => {\n  const ext = out.split('/').pop();\n  if (ext && ext.includes('.')) {\n    throw new Error(`Image-sequence output must be a directory without extension: ${out}`);\n  }\n};\n\nif (imageSequence) validateSequenceOutput(outputLocation);","typeGuard":"const isExtensionlessDir = (p: string): boolean =>\n  !path.basename(p).includes('.');","tryCatchPattern":null,"preventionTips":["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."],"tags":["cli","render","image-sequence","output"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}