{"record":{"id":"d0527cfea425d01a","repo":"remotion-dev/remotion","slug":"invalid-lut-content-on-line-linenumber-title-may-only-be","errorCode":null,"errorMessage":"Invalid LUT content on line ${lineNumber}: TITLE may only be declared once","messagePattern":"Invalid LUT content on line (.+?): TITLE may only be declared once","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/effects/src/lut/parse-cube-lut.ts","lineNumber":90,"sourceCode":"\n\t\tconst [keyword, ...values] = line.split(/\\s+/);\n\n\t\tif (keyword === 'LUT_1D_SIZE') {\n\t\t\tthrow new TypeError(\n\t\t\t\t`Invalid LUT content on line ${lineNumber}: 1D LUTs are not supported`,\n\t\t\t);\n\t\t}\n\n\t\tif (HEADER_DIRECTIVES.has(keyword)) {\n\t\t\tif (dataStarted) {\n\t\t\t\tthrow new TypeError(\n\t\t\t\t\t`Invalid LUT content on line ${lineNumber}: ${keyword} must appear before the color data`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (keyword === 'TITLE') {\n\t\t\t\tif (hasTitle) {\n\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t`Invalid LUT content on line ${lineNumber}: TITLE may only be declared once`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\thasTitle = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (keyword === 'LUT_3D_SIZE') {\n\t\t\t\tif (size !== null) {\n\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t`Invalid LUT content on line ${lineNumber}: LUT_3D_SIZE may only be declared once`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (values.length !== 1) {\n\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t`Invalid LUT content on line ${lineNumber}: LUT_3D_SIZE must contain exactly one integer`,","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/effects/src/lut/parse-cube-lut.ts#L72-L108","documentation":"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.","triggerScenarios":"parseCubeLut() receives file content containing two TITLE lines (both before color data).","commonSituations":"Concatenating two .cube files, copy-paste duplication when editing a LUT by hand, or a buggy LUT exporter emitting the title twice.","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"],"exampleFix":"// before\nTITLE \"Warm\"\nTITLE \"Cool\"\nLUT_3D_SIZE 2\n// after\nTITLE \"Warm\"\nLUT_3D_SIZE 2","handlingStrategy":"validation","validationCode":"const countDirective = (content: string, directive: string) =>\n  content.split(/\\r?\\n/).filter((l) => l.trim().startsWith(directive)).length;\nif (countDirective(content, 'TITLE') > 1) throw new Error('Duplicate TITLE');","typeGuard":"null","tryCatchPattern":"try {\n  const lut = parseCubeLut(content);\n} catch (e) {\n  if (e instanceof TypeError && e.message.includes('TITLE may only be declared once')) {\n    // dedupe TITLE lines before retrying\n  } else throw e;\n}","preventionTips":["Don't concatenate .cube files without deduplicating headers","Search files for repeated directives before parsing"],"tags":["validation","lut","duplicate-directive"],"backgroundTag":"invalid-argument-format","analyzedSha":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-09-18T00:12:20.256Z","contentChangedAt":"2026-09-18T00:12:20.256Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}