{"record":{"id":"0b74f444c838eaf5","repo":"remotion-dev/remotion","slug":"no-decoder-config-descriptor","errorCode":null,"errorMessage":"No decoder-config-descriptor","messagePattern":"No decoder-config-descriptor","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/media-parser/src/get-audio-codec.ts","lineNumber":52,"sourceCode":"\nexport const hasAudioCodec = (state: ParserState): boolean => {\n\treturn getHasTracks(state, true);\n};\n\nconst getCodecSpecificatorFromEsdsBox = ({\n\tchild,\n}: {\n\tchild: EsdsBox;\n}): {\n\tprimary: number;\n\tsecondary: number | null;\n\tdescription: Uint8Array | undefined;\n} => {\n\tconst descriptor = child.descriptors.find(\n\t\t(d) => d.type === 'decoder-config-descriptor',\n\t);\n\tif (!descriptor) {\n\t\tthrow new Error('No decoder-config-descriptor');\n\t}\n\n\tif (descriptor.type !== 'decoder-config-descriptor') {\n\t\tthrow new Error('Expected decoder-config-descriptor');\n\t}\n\n\tif (descriptor.asNumber !== 0x40) {\n\t\treturn {\n\t\t\tprimary: descriptor.asNumber,\n\t\t\tsecondary: null,\n\t\t\tdescription: undefined,\n\t\t};\n\t}\n\n\tconst audioSpecificConfig = descriptor.decoderSpecificConfigs.find((d) => {\n\t\treturn d.type === 'mp4a-specific-config' ? d : null;\n\t});\n\tif (","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/media-parser/src/get-audio-codec.ts#L34-L70","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Re-mux the file with a conformant tool (e.g. ffmpeg -i in.mp4 -c copy out.mp4) to regenerate a well-formed esds.","Wrap the parse in a try/catch and fall back to a different field (e.g. codecString) or skip the track.","Validate the source file with mp4box/ffprobe before parsing; reject files whose esds lacks the descriptor."],"exampleFix":"// before\nconst info = getCodecSpecificatorFromEsdsBox({child: esdsBox});\n\n// after\ntry {\n  const info = getCodecSpecificatorFromEsdsBox({child: esdsBox});\n} catch (err) {\n  console.warn('Malformed esds, skipping track', err);\n  continue;\n}","handlingStrategy":"try-catch","validationCode":"const hasDcd = esdsBox.descriptors.some((d) => d.type === 'decoder-config-descriptor');\nif (!hasDcd) { /* skip or re-mux */ }","typeGuard":"null","tryCatchPattern":"try { getCodecSpecificatorFromEsdsBox({child: esdsBox}); } catch (e) { if (e.message === 'No decoder-config-descriptor') { /* malformed esds, skip track */ } else throw e; }","preventionTips":["Validate MP4 files with mp4box/ffprobe before parsing.","Re-mux suspect files with ffmpeg.","Catch malformed-esds errors and skip the affected track."],"tags":["mp4","audio","codec","esds","corrupt-file"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}