remotion-dev/remotion · error

must contain an increasing input range.

Error message

${keyword} must contain an increasing input range.

What it means

parseCubeLut validates the LUT_1D_INPUT_RANGE / LUT_3D_INPUT_RANGE header of an Adobe .cube file. This header must contain exactly two finite numbers where the first (minimum) is strictly less than the second (maximum), since it defines the input domain of the LUT. The parser throws when the value count is wrong, a value is non-finite (NaN/Infinity), or min >= max, because a non-increasing range would divide by zero or invert the lookup domain in applyCubeLut.

Solutions

  1. Fix the INPUT_RANGE line so it has exactly two finite numbers with min < max, e.g. 'LUT_1D_INPUT_RANGE 0.0 1.0'.
  2. Remove the INPUT_RANGE header entirely to fall back to the default domain [0,1].
  3. If generating .cube files programmatically, validate the range before emitting it.
  4. Wrap parseCubeLut in try/catch and surface a user-facing message pointing at the offending header.

Example fix

// before
LUT_3D_INPUT_RANGE 1.0 0.0
// after
LUT_3D_INPUT_RANGE 0.0 1.0
Defensive patterns

Strategy: validation

Validate before calling

const rangeLine = text.split(/\r?\n/).find((l) => /^(LUT_1D|LUT_3D)_INPUT_RANGE\b/.test(l.trim()));
if (rangeLine) {
  const nums = rangeLine.trim().split(/\s+/).slice(1).map(Number);
  if (nums.length !== 2 || !nums.every(Number.isFinite) || nums[0] >= nums[1]) {
    throw new Error(`Invalid input range: ${rangeLine}`);
  }
}

Type guard

const isValidRange = (nums: number[]): boolean =>
  nums.length === 2 && nums.every(Number.isFinite) && nums[0] < nums[1];

Try / catch

let lut;
try {
  lut = parseCubeLut(text);
} catch (e) {
  throw new Error(`Could not load .cube LUT: ${(e as Error).message}`);
}

Prevention

When it happens

Trigger: Calling parseCubeLut(text) on a .cube string whose INPUT_RANGE line has 0, 1, 3+ values, contains NaN/Infinity (e.g. 'LUT_1D_INPUT_RANGE 0 NaN'), or lists bounds in decreasing/equal order (e.g. 'LUT_3D_INPUT_RANGE 1 0' or '0 0').

Common situations: Hand-edited or corrupted .cube exports; LUT files generated by scripts with locale-swapped decimal separators producing NaN; files truncated mid-header; tools that write the range as 'max min' by mistake.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of remotion-dev/remotion@46a3a6bf13 (2026-09-18). Data as JSON: /api/errors/892fb94ca4aa1aff. Report an issue: GitHub.

Appendix: source

Thrown at packages/studio/src/helpers/cube-lut.ts:91

				throw new Error(`${keyword} must contain three finite numbers.`);
			}

			if (keyword === 'DOMAIN_MIN') {
				domainMin = [numbers[0], numbers[1], numbers[2]];
			} else {
				domainMax = [numbers[0], numbers[1], numbers[2]];
			}

			continue;
		}

		if (keyword === 'LUT_1D_INPUT_RANGE' || keyword === 'LUT_3D_INPUT_RANGE') {
			if (
				numbers.length !== 2 ||
				!numbers.every(Number.isFinite) ||
				numbers[0] >= numbers[1]
			) {
				throw new Error(`${keyword} must contain an increasing input range.`);
			}

			domainMin = [numbers[0], numbers[0], numbers[0]];
			domainMax = [numbers[1], numbers[1], numbers[1]];
			continue;
		}

		if (isHeader) {
			throw new Error(
				`Unsupported LUT header "${keyword}" on line ${index + 1}.`,
			);
		}

		if (data === null) {
			throw new Error('Expected LUT_1D_SIZE or LUT_3D_SIZE before color data.');
		}

		const color = [Number(keyword), ...numbers];

View on GitHub (pinned to 46a3a6bf13)