remotion-dev/remotion · error

No audio-specific-config

Error message

No audio-specific-config

What it means

Thrown when an mp4a/AAC decoder-config-descriptor (objectTypeIndication 0x40) has no child of type 'mp4a-specific-config'. For AAC the audio-specific-config holds the audioObjectType and decoder bytes; without it the codec cannot be positively identified as AAC, so the parser refuses to guess.

Source

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

		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 (
		!audioSpecificConfig ||
		audioSpecificConfig.type !== 'mp4a-specific-config'
	) {
		throw new Error('No audio-specific-config');
	}

	return {
		primary: descriptor.asNumber,
		secondary: audioSpecificConfig.audioObjectType,
		description: audioSpecificConfig.asBytes,
	};
};

type AudioCodecInfo = {
	format: string;
	primarySpecificator: number | null;
	secondarySpecificator: number | null;
	description: Uint8Array | undefined;
};

export const getCodecPrivateFromTrak = (
	trakBox: TrakBox,

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Re-mux with ffmpeg (ffmpeg -i in.mp4 -c:a aac -b:a 128k out.mp4) to regenerate a complete esds with audio-specific-config.
  2. Catch the error and treat the track as AAC by default, or skip codec-string derivation.
  3. Validate with mp4box -info; reject tracks lacking audio-specific-config before parsing.

Example fix

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

// after
let cfg = null;
try {
  cfg = getCodecSpecificatorFromEsdsBox({child: esdsBox});
} catch (err) {
  // descriptor present but no audio-specific-config; assume AAC
  cfg = {primary: 0x40, secondary: null, description: undefined};
}
Defensive patterns

Strategy: try-catch

Validate before calling

const dcd = esdsBox.descriptors.find((d) => d.type === 'decoder-config-descriptor');
const hasAsc = dcd?.decoderSpecificConfigs.some((d) => d.type === 'mp4a-specific-config');
if (!hasAsc) { /* handle as best-effort AAC */ }

Type guard

null

Try / catch

try { getCodecSpecificatorFromEsdsBox({child: esdsBox}); } catch (e) { if (e.message === 'No audio-specific-config') { /* best-effort AAC */ } else throw e; }

Prevention

When it happens

Trigger: An MP4 audio track whose esds declares objectType 0x40 (AAC) but omits the mp4a-specific-config element. Truncated or hand-edited esds boxes; files produced by muxers that skip the config for raw AAC.

Common situations: Parsing files muxed with stripped/placeholder esds. Handling fragmented MP4 where the config lives elsewhere. Encountering HE-AAC or LC-AAC variants with non-standard descriptor layouts.

Related errors


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