remotion-dev/remotion · error

Stream info not found

Error message

Stream info not found

What it means

Thrown by emitSample() during FLAC frame parsing when no box of type 'flac-streaminfo' exists in the FLAC structure. The STREAMINFO block is required to compute the frame timestamp (it provides maximumBlockSize and sampleRate). Its absence at this stage means the mandatory STREAMINFO metadata block was never parsed or registered before frame data was encountered.

Source

Thrown at packages/media-parser/src/containers/flac/parse-flac-frame.ts:116

	const iterator = getArrayBufferIterator({
		initialData: data,
		maxBytes: data.length,
		logLevel: 'error',
	});
	const parsed = parseFrameHeader({iterator, state});
	if (!parsed) {
		throw new Error('Invalid CRC');
	}

	const {blockSize, num, sampleRate} = parsed;

	const duration = blockSize / sampleRate;
	const structure = state.structure.getFlacStructure();
	const streamInfo = structure.boxes.find(
		(box) => box.type === 'flac-streaminfo',
	);
	if (!streamInfo) {
		throw new Error('Stream info not found');
	}

	if (streamInfo.minimumBlockSize !== streamInfo.maximumBlockSize) {
		throw new Error('Cannot determine timestamp');
	}

	const timestamp = (num * streamInfo.maximumBlockSize) / streamInfo.sampleRate;
	state.flac.audioSamples.addSample({
		timeInSeconds: timestamp,
		offset,
		durationInSeconds: duration,
	});

	const audioSample = convertAudioOrVideoSampleToWebCodecsTimestamps({
		sample: {
			data,
			duration,
			decodingTimestamp: timestamp,

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Check the file has a valid STREAMINFO: `ffprobe input.flac` should report sample rate and channels.
  2. Re-encode to repair: `ffmpeg -i input.flac output.flac`.
  3. Switch to Mediabunny (https://www.remotion.dev/docs/mediabunny/metadata).
  4. Report the file to the Remotion team if standard tools can parse it.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  const result = await parseMedia({src, fields: {durationInSeconds: true}});
} catch (e) {
  if (e instanceof Error && e.message === 'Stream info not found') {
    console.error('FLAC STREAMINFO block missing during frame parse. File is corrupt or truncated.');
  } else {
    throw e;
  }
}

Prevention

When it happens

Trigger: Parsing FLAC audio samples when the STREAMINFO metadata block is absent from the parsed structure. This occurs with files missing the mandatory STREAMINFO block, with corrupt metadata headers, or when the parser began processing frame data before completing the metadata header pass.

Common situations: Corrupt or truncated FLAC files missing the STREAMINFO block. Files with a damaged metadata header section. Edge cases in incremental/streaming parsing where frame data is fed before the header is fully consumed.

Related errors


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