{"record":{"id":"66fb9a4f9b1cf0c4","repo":"remotion-dev/remotion","slug":"unsupported-lut-header-keyword-on-line-index-1","errorCode":null,"errorMessage":"Unsupported LUT header \"${keyword}\" on line ${index + 1}.","messagePattern":"Unsupported LUT header \"(.+?)\" on line (.+?)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/helpers/cube-lut.ts","lineNumber":100,"sourceCode":"\t\t\tcontinue;\n\t\t}\n\n\t\tif (keyword === 'LUT_1D_INPUT_RANGE' || keyword === 'LUT_3D_INPUT_RANGE') {\n\t\t\tif (\n\t\t\t\tnumbers.length !== 2 ||\n\t\t\t\t!numbers.every(Number.isFinite) ||\n\t\t\t\tnumbers[0] >= numbers[1]\n\t\t\t) {\n\t\t\t\tthrow new Error(`${keyword} must contain an increasing input range.`);\n\t\t\t}\n\n\t\t\tdomainMin = [numbers[0], numbers[0], numbers[0]];\n\t\t\tdomainMax = [numbers[1], numbers[1], numbers[1]];\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (isHeader) {\n\t\t\tthrow new Error(\n\t\t\t\t`Unsupported LUT header \"${keyword}\" on line ${index + 1}.`,\n\t\t\t);\n\t\t}\n\n\t\tif (data === null) {\n\t\t\tthrow new Error('Expected LUT_1D_SIZE or LUT_3D_SIZE before color data.');\n\t\t}\n\n\t\tconst color = [Number(keyword), ...numbers];\n\t\tif (\n\t\t\tcolor.length !== 3 ||\n\t\t\t!color.every((value) => Number.isFinite(Math.fround(value)))\n\t\t) {\n\t\t\tthrow new Error(`Invalid LUT color on line ${index + 1}.`);\n\t\t}\n\n\t\tif (offset + 3 > data.length) {\n\t\t\tthrow new Error(`Expected ${data.length / 3} LUT colors, got more.`);","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/studio/src/helpers/cube-lut.ts#L82-L118","documentation":"parseCubeLut only understands a fixed set of .cube header keywords: TITLE, LUT_1D_SIZE, LUT_3D_SIZE, DOMAIN_MIN, DOMAIN_MAX, LUT_1D_INPUT_RANGE, LUT_3D_INPUT_RANGE. Any other ALL-CAPS keyword line that looks like a header (matches /^[A-Z][A-Z0-9_]*$/) is rejected with the line number, since silently ignoring unknown headers could change how the LUT is applied. The thrown message names the unsupported keyword and its 1-based line.","triggerScenarios":"parseCubeLut encounters an uppercase header keyword outside the supported set before any color data has been consumed, e.g. 'LUT_3D_NAME \"my lut\"', 'VERSION 2', 'ORIGIN_COMMERCIAL ...' or vendor-specific headers emitted by some grading tools.","commonSituations":".cube files from DaVinci Resolve, Lattice or other tools that append non-standard metadata headers; newer .cube spec extensions; copy-pasted headers with typos like 'LUT_1D_SIZES'.","solutions":["Open the .cube file at the reported line and delete or comment out the unsupported header.","Rename a misspelled supported header to the correct keyword (e.g. LUT_1D_SIZES -> LUT_1D_SIZE).","Convert the LUT to a plain spec-compliant .cube using a tool like imageio/lut utilities.","Extend the parser if the header is meaningful and you control the code.","Strip unknown headers programmatically before parsing (lines matching /^[A-Z][A-Z0-9_]*$/ not in the known set)."],"exampleFix":"// before\nLUT_3D_NAME \"cinematic\"\nLUT_3D_SIZE 33\n// after\nTITLE \"cinematic\"\nLUT_3D_SIZE 33","handlingStrategy":"validation","validationCode":"const KNOWN = new Set(['TITLE','LUT_1D_SIZE','LUT_3D_SIZE','DOMAIN_MIN','DOMAIN_MAX','LUT_1D_INPUT_RANGE','LUT_3D_INPUT_RANGE']);\nconst bad = text.split(/\\r?\\n/).findIndex((l) => {\n  const kw = l.trim().split(/\\s+/)[0];\n  return /^[A-Z][A-Z0-9_]*$/.test(kw) && !KNOWN.has(kw);\n});\nif (bad !== -1) throw new Error(`Unsupported header on line ${bad + 1}`);","typeGuard":null,"tryCatchPattern":"let lut;\ntry {\n  lut = parseCubeLut(text);\n} catch (e) {\n  console.error(`LUT header problem: ${(e as Error).message}`);\n  lut = null;\n}","preventionTips":["Strip vendor-specific metadata headers before parsing","Only ship spec-compliant .cube files","Keep a sanitizer that comments out unknown ALL-CAPS header lines"],"tags":["parsing","lut","unsupported"],"backgroundTag":"unsupported-operation","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"}