remotion-dev/remotion · error · Error

Unsupported version ${version}

Error message

Unsupported version ${version}

What it means

Inside the audio sample-entry branch of samples.ts, after parsing the audio version field, the code throws if the version is not one of the handled values (0 and 1 are handled above this throw). This indicates an unrecognized audio sample-entry version, almost always a symptom of cursor desync from an earlier mis-parsed box rather than a genuinely new audio version.

Source

Thrown at packages/media-parser/src/containers/iso-base-media/stsd/samples.ts:307

					revisionLevel,
					vendor: [...Array.from(new Uint8Array(vendor))],
					size: boxSize,
					type: 'audio',
					numberOfChannels: numAudioChannel,
					sampleSize,
					compressionId,
					packetSize,
					sampleRate: higherSampleRate,
					samplesPerPacket,
					bytesPerPacket: null,
					bytesPerFrame,
					bitsPerSample: bitsPerChannel,
					children,
				},
			};
		}

		throw new Error(`Unsupported version ${version}`);
	}

	if (isVideo) {
		const version = iterator.getUint16();
		const revisionLevel = iterator.getUint16();
		const vendor = iterator.getSlice(4);
		const temporalQuality = iterator.getUint32();
		const spacialQuality = iterator.getUint32();
		const width = iterator.getUint16();
		const height = iterator.getUint16();
		const horizontalResolution = iterator.getFixedPointUnsigned1616Number();
		const verticalResolution = iterator.getFixedPointUnsigned1616Number();
		const dataSize = iterator.getUint32();
		const frameCountPerSample = iterator.getUint16();
		const compressorName = iterator.getPascalString();
		const depth = iterator.getUint16();
		const colorTableId = iterator.getInt16();

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Inspect the file with `ffprobe -show_streams input.mp4` to see the actual audio codec and version.
  2. Re-mux: `ffmpeg -i input.mp4 -c:a aac -b:a 128k remuxed.mp4` to normalize the audio sample entry.
  3. If you only need video, drop the audio: `ffmpeg -i input.mp4 -an video_only.mp4`.
  4. Report the codec/file upstream so the parser's audio sample-entry coverage is extended.

Example fix

// before: ALAC audio sample entry with version 2 throws
ffmpeg -i input.m4a -c:a aac -b:a 128k normalized.m4a
// after: standard AAC v0 sample entry parses cleanly
Defensive patterns

Strategy: try-catch

Validate before calling

// Probe audio codec/version with ffprobe before parsing
// ffprobe -show_streams -select_streams a input.mp4 → check codec_name and profile

Try / catch

try {
  await parseMedia({src, fields: {dimensions: true}});
} catch (err) {
  if (err instanceof Error && err.message.startsWith('Unsupported version')) {
    // audio sample entry version unsupported; transcode or drop audio
  } else throw err;
}

Prevention

When it happens

Trigger: An audio sample entry (e.g. mp4a) is being parsed and the version uint16 read by the iterator is neither 0 nor 1. Common when a preceding 'reserved' or 'compressionId' field was mis-sized.

Common situations: Corrupt MP4/MOV files, or files with unusual audio codecs (e.g. some ALAC, AC-3, or AMR variants) where the parser's assumptions about the audio sample-entry layout are wrong.

Related errors


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