remotion-dev/remotion · error

No decoder-config-descriptor

Error message

No decoder-config-descriptor

What it means

Thrown while parsing an MP4 audio sample entry's esds box: the descriptors array contains no element of type 'decoder-config-descriptor'. That descriptor carries the object type and config bytes needed to identify the AAC/MP3 codec, so its absence means the esds is malformed or truncated and the codec cannot be derived.

Source

Thrown at packages/media-parser/src/get-audio-codec.ts:52

export const hasAudioCodec = (state: ParserState): boolean => {
	return getHasTracks(state, true);
};

const getCodecSpecificatorFromEsdsBox = ({
	child,
}: {
	child: EsdsBox;
}): {
	primary: number;
	secondary: number | null;
	description: Uint8Array | undefined;
} => {
	const descriptor = child.descriptors.find(
		(d) => d.type === 'decoder-config-descriptor',
	);
	if (!descriptor) {
		throw new Error('No decoder-config-descriptor');
	}

	if (descriptor.type !== 'decoder-config-descriptor') {
		throw new Error('Expected decoder-config-descriptor');
	}

	if (descriptor.asNumber !== 0x40) {
		return {
			primary: descriptor.asNumber,
			secondary: null,
			description: undefined,
		};
	}

	const audioSpecificConfig = descriptor.decoderSpecificConfigs.find((d) => {
		return d.type === 'mp4a-specific-config' ? d : null;
	});
	if (

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Re-mux the file with a conformant tool (e.g. ffmpeg -i in.mp4 -c copy out.mp4) to regenerate a well-formed esds.
  2. Wrap the parse in a try/catch and fall back to a different field (e.g. codecString) or skip the track.
  3. Validate the source file with mp4box/ffprobe before parsing; reject files whose esds lacks the descriptor.

Example fix

// before
const info = getCodecSpecificatorFromEsdsBox({child: esdsBox});

// after
try {
  const info = getCodecSpecificatorFromEsdsBox({child: esdsBox});
} catch (err) {
  console.warn('Malformed esds, skipping track', err);
  continue;
}
Defensive patterns

Strategy: try-catch

Validate before calling

const hasDcd = esdsBox.descriptors.some((d) => d.type === 'decoder-config-descriptor');
if (!hasDcd) { /* skip or re-mux */ }

Type guard

null

Try / catch

try { getCodecSpecificatorFromEsdsBox({child: esdsBox}); } catch (e) { if (e.message === 'No decoder-config-descriptor') { /* malformed esds, skip track */ } else throw e; }

Prevention

When it happens

Trigger: Encountering an MP4 audio track whose esds box is missing the decoder-config-descriptor. Files produced by non-standard muxers, corrupted downloads, or transcoders that write incomplete esds boxes.

Common situations: Parsing user-uploaded audio that was muxed by older/buggy tooling. Processing files that survived an interrupted transfer. Handling variants where the esds was stripped during remuxing.

Related errors


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