remotion-dev/remotion · error · TypeError
Invalid LUT content on line
Error message
Invalid LUT content on line ${lineNumber}: TITLE may only be declared once What it means
The .cube format allows the TITLE directive at most once. parseCubeLut() tracks whether TITLE was already seen and throws this TypeError when a second TITLE line is found, since a LUT can only have one title.
Solutions
- Remove the duplicate TITLE line, keeping only one
- Rename one title if you merged two LUTs intentionally
- Regenerate the LUT from its source tool
Example fix
// before TITLE "Warm" TITLE "Cool" LUT_3D_SIZE 2 // after TITLE "Warm" LUT_3D_SIZE 2
Defensive patterns
Strategy: validation
Validate before calling
const countDirective = (content: string, directive: string) =>
content.split(/\r?\n/).filter((l) => l.trim().startsWith(directive)).length;
if (countDirective(content, 'TITLE') > 1) throw new Error('Duplicate TITLE'); Type guard
null
Try / catch
try {
const lut = parseCubeLut(content);
} catch (e) {
if (e instanceof TypeError && e.message.includes('TITLE may only be declared once')) {
// dedupe TITLE lines before retrying
} else throw e;
} Prevention
- Don't concatenate .cube files without deduplicating headers
- Search files for repeated directives before parsing
When it happens
Trigger: parseCubeLut() receives file content containing two TITLE lines (both before color data).
Common situations: Concatenating two .cube files, copy-paste duplication when editing a LUT by hand, or a buggy LUT exporter emitting the title twice.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- Invalid LUT content on line
- Invalid LUT content on line
- Invalid LUT content on line
- Combined 1D and 3D LUTs are not supported.
- Conflicting LUT input range headers.
AI-assisted analysis of remotion-dev/remotion@46a3a6bf13 (2026-09-18).
Data as JSON: /api/errors/d0527cfea425d01a.
Report an issue: GitHub.
Appendix: source
Thrown at packages/effects/src/lut/parse-cube-lut.ts:90
const [keyword, ...values] = line.split(/\s+/);
if (keyword === 'LUT_1D_SIZE') {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: 1D LUTs are not supported`,
);
}
if (HEADER_DIRECTIVES.has(keyword)) {
if (dataStarted) {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: ${keyword} must appear before the color data`,
);
}
if (keyword === 'TITLE') {
if (hasTitle) {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: TITLE may only be declared once`,
);
}
hasTitle = true;
continue;
}
if (keyword === 'LUT_3D_SIZE') {
if (size !== null) {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: LUT_3D_SIZE may only be declared once`,
);
}
if (values.length !== 1) {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: LUT_3D_SIZE must contain exactly one integer`,View on GitHub (pinned to 46a3a6bf13)