remotion-dev/remotion · error · TypeError
Invalid LUT content on line
Error message
Invalid LUT content on line ${lineNumber}: DOMAIN_MIN may only be declared once What it means
This TypeError is a structural validation failure in the .cube LUT parser: within parseCubeLut, the DOMAIN_MIN directive is a global header that defines the input domain's lower bound, so it is only meaningful once per file. The parser tracks a hasDomainMin flag, and fires this error the second time a DOMAIN_MIN line is encountered in the same .cube file. It indicates the LUT file itself is malformed (duplicate header), not a problem with the caller's code; the fix is to correct the LUT file so it declares DOMAIN_MIN at most once.
Solutions
- Remove the duplicate DOMAIN_MIN line, keeping a single declaration
- Edit the existing DOMAIN_MIN values in place
- Re-export the LUT from the original tool
Example fix
// before DOMAIN_MIN 0 0 0 DOMAIN_MIN 0.1 0.1 0.1 // after DOMAIN_MIN 0.1 0.1 0.1
Defensive patterns
Strategy: validation
Validate before calling
const mins = content.split(/\r?\n/).filter((l) => l.trim().startsWith('DOMAIN_MIN'));
if (mins.length > 1) throw new Error('Duplicate DOMAIN_MIN'); Type guard
null
Try / catch
try {
const lut = parseCubeLut(content);
} catch (e) {
if (e instanceof TypeError && e.message.includes('DOMAIN_MIN may only be declared once')) {
// dedupe DOMAIN_MIN lines and retry
} else throw e;
} Prevention
- Keep one DOMAIN_MIN declaration per file
- Deduplicate headers when merging LUT files
When it happens
Trigger: parseCubeLut() receives content with two DOMAIN_MIN lines, e.g. 'DOMAIN_MIN 0 0 0' followed by 'DOMAIN_MIN 0.1 0.1 0.1'.
Common situations: Hand-edited files where the domain was changed by adding a line instead of editing, or concatenated LUT files.
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/6d71f63bf90288af.
Report an issue: GitHub.
Appendix: source
Thrown at packages/effects/src/lut/parse-cube-lut.ts:129
const parsedSize = Number(values[0]);
if (
!Number.isInteger(parsedSize) ||
parsedSize < 2 ||
parsedSize > 256
) {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: LUT_3D_SIZE must be an integer from 2 to 256`,
);
}
size = parsedSize;
continue;
}
if (keyword === 'DOMAIN_MIN') {
if (hasDomainMin) {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: DOMAIN_MIN may only be declared once`,
);
}
domainMin = parseTriplet({
values,
lineNumber,
label: 'DOMAIN_MIN',
});
hasDomainMin = true;
continue;
}
if (hasDomainMax) {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: DOMAIN_MAX may only be declared once`,
);
}View on GitHub (pinned to 46a3a6bf13)