remotion-dev/remotion · error

No strh box

Error message

No strh box

What it means

Thrown by getFpsFromAvi() while iterating stream-list (strl) children: a strl was found but getStrhBox returned null, meaning the stream header subchunk ('strh') is missing from that stream list. Without strh the parser cannot read the rate denominator needed for FPS, so it aborts rather than guess.

Source

Thrown at packages/media-parser/src/get-fps.ts:129

	}

	const trackBoxes = getTraks(moovBox);

	const trackBox = trackBoxes.find(trakBoxContainsVideo);
	if (!trackBox) {
		return null;
	}

	return getFpsFromMp4TrakBox(trackBox);
};

const getFpsFromAvi = (structure: RiffStructure) => {
	const strl = getStrlBoxes(structure);

	for (const s of strl) {
		const strh = getStrhBox(s.children);
		if (!strh) {
			throw new Error('No strh box');
		}

		if (strh.fccType === 'auds') {
			continue;
		}

		return strh.rate;
	}

	return null;
};

export const getFps = (state: ParserState) => {
	const segments = state.structure.getStructure();

	if (segments.type === 'iso-base-media') {
		return getFpsFromIsoMaseMedia(state);
	}

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Re-mux the AVI with ffmpeg (ffmpeg -i in.avi -c copy out.avi) to rebuild complete stream headers.
  2. Wrap FPS extraction in try/catch and fall back to a default or null FPS.
  3. Pre-validate the AVI structure with ffmpeg/ffprobe; skip files missing strh chunks.

Example fix

// before
const fps = getFps(state);

// after
let fps;
try {
  fps = getFps(state);
} catch (err) {
  console.warn('AVI missing strh, cannot derive FPS', err);
  fps = null;
}
Defensive patterns

Strategy: try-catch

Validate before calling

import {getStrhBox} from '@remotion/media-parser/containers/riff/traversal';
const strl = getStrlBoxes(structure);
if (strl.every((s) => getStrhBox(s.children))) { const fps = getFps(state); }

Type guard

null

Try / catch

try { getFps(state); } catch (e) { if (e.message === 'No strh box') { /* malformed AVI, fall back */ } else throw e; }

Prevention

When it happens

Trigger: Parsing an AVI file where one of the stream lists omits the strh chunk (malformed or truncated index). AVI files written by non-standard capture tools or repaired with incomplete reconstruction.

Common situations: Handling legacy AVI captures. Processing AVI files that were partially downloaded or repaired. Files muxed by tools that omit strh for certain stream types.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/f3ea226244f8d8f0. Report an issue: GitHub.