remotion-dev/remotion · error · Error

MP3 files with VBRI are currently unsupported because we…

Error message

MP3 files with VBRI are currently unsupported because we have no sample file. Submit this file at remotion.dev/report if you would like us to support this file.

What it means

Thrown when an MP3 file's first frame contains a `VBRI` header (the Fraunhofer Encoder variable-bitrate format). The library currently supports only Xing headers for VBR detection and has no sample VBRI file to implement or test against, so it explicitly rejects these files with a request to submit them.

Solutions

  1. Re-encode the MP3 using LAME or ffmpeg so it uses a Xing header instead of VBRI: `ffmpeg -i input.mp3 -codec:a libmp3lame -qscale:a 2 output.mp3`.
  2. Convert the file to a different supported format (AAC/M4A, WAV, Ogg Vorbis).
  3. Submit the file at remotion.dev/report so the library can add VBRI support.
  4. Use an alternative media parsing library that supports VBRI headers.

Example fix

# re-encode to replace VBRI with Xing header
ffmpeg -i input.mp3 -codec:a libmp3lame -qscale:a 2 output.mp3
Defensive patterns

Strategy: try-catch

Validate before calling

// Check for VBRI header before parsing
async function hasVbriNotXing(file: File): Promise<boolean> {
  const buf = await file.slice(0, 4096).arrayBuffer();
  const text = new TextDecoder().decode(new Uint8Array(buf));
  return text.includes('VBRI') && !text.includes('Xing');
}

Try / catch

try {
  await parseMedia({src, fields: {durationInSeconds: true}});
} catch (e) {
  if (e instanceof Error && e.message.includes('VBRI')) {
    console.error('VBRI VBR MP3 is unsupported. Re-encode with LAME/ffmpeg.');
  }
  throw e;
}

Prevention

When it happens

Trigger: During first-frame parsing in `parseMpegHeader`, the decoded frame text includes the string `'VBRI'` (checked at `parse-mpeg-header.ts:56`). This indicates the file uses the Fraunhofer VBR header format rather than the Xing format the parser supports.

Common situations: MP3 files produced by the Fraunhofer encoder or certain older professional audio tools. Files exported from specific DAWs or broadcasting software that default to VBRI. Rare in consumer-grade encoders like LAME (which use Xing).

Related errors


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

Appendix: source

Thrown at packages/media-parser/src/containers/mp3/parse-mpeg-header.ts:57

			throw new Error(
				`Bitrate mismatch at offset ${initialOffset}: ${bitrateInKbit} !== ${cbrMp3Info.bitrateInKbit}`,
			);
		}
	}

	const offsetNow = iterator.counter.getOffset();
	iterator.counter.decrement(offsetNow - initialOffset);
	const data = iterator.getSlice(frameLength);

	if (state.callbacks.tracks.getTracks().length === 0) {
		const info: Mp3Info = {
			layer,
			mpegVersion,
			sampleRate,
		};
		const asText = new TextDecoder().decode(data);
		if (asText.includes('VBRI')) {
			throw new Error(
				'MP3 files with VBRI are currently unsupported because we have no sample file. Submit this file at remotion.dev/report if you would like us to support this file.',
			);
		}

		if (asText.includes('Info')) {
			return;
		}

		const isVbr = asText.includes('Xing');
		if (isVbr) {
			const xingData = parseXing(data);
			Log.verbose(
				state.logLevel,
				'MP3 has variable bit rate. Requiring whole file to be read',
			);
			state.mp3.setMp3BitrateInfo({
				type: 'variable',
				xingData,

View on GitHub (pinned to 78fe4bb3fd)