{"record":{"id":"4e5dc632297bb8ef","repo":"remotion-dev/remotion","slug":"unknown-audio-format","errorCode":null,"errorMessage":"Unknown audio format","messagePattern":"Unknown audio format","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/media-parser/src/containers/webm/make-track.ts","lineNumber":173,"sourceCode":"\n\t\tconst bitDepth = getBitDepth(track);\n\t\tif (bitDepth === null) {\n\t\t\tthrow new Error('Expected bit depth');\n\t\t}\n\n\t\tif (bitDepth === 8) {\n\t\t\treturn 'pcm-u8';\n\t\t}\n\n\t\tif (bitDepth === 16) {\n\t\t\treturn 'pcm-s16';\n\t\t}\n\n\t\tif (bitDepth === 24) {\n\t\t\treturn 'pcm-s24';\n\t\t}\n\n\t\tthrow new Error('Unknown audio format');\n\t}\n\n\tif (codec.value === 'A_AAC') {\n\t\treturn `aac`;\n\t}\n\n\tif (codec.value === 'A_MPEG/L3') {\n\t\treturn 'mp3';\n\t}\n\n\tthrow new Error(`Unknown codec: ${codec.value}`);\n};\n\nconst getMatroskaAudioCodecString = (track: TrackEntry): string => {\n\tconst codec = getCodecSegment(track);\n\tif (!codec) {\n\t\tthrow new Error('Expected codec segment');\n\t}","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/media-parser/src/containers/webm/make-track.ts#L155-L191","documentation":"Thrown by `getMatroskaAudioCodecEnum` (make-track.ts:173) for an `A_PCM/INT/LIT` track whose `AudioBitDepth` is present but not 8, 16, or 24. The enum mapping only knows those three PCM widths; any other value (e.g. 12, 32, 20) is unsupported.","triggerScenarios":"A PCM track with bit depth 32 (float or int), 12, 20, or any value outside {8,16,24}. 32-bit PCM is the most common real-world hit since high-res audio sometimes uses it.","commonSituations":"High-resolution audio (32-bit PCM); unusual bit depths from niche encoders; PCM/floating-point (`A_PCM/FLOAT/IEEE`) mislabelled as INT.","solutions":["Down-convert to a supported depth: `ffmpeg -i in.mkv -c:a pcm_s16le out.mkv` (16-bit) or `pcm_s24le`.","Report at https://remotion.dev/report if you need 32-bit PCM supported.","Use a different container/codec (FLAC, WAV at 16/24-bit) for guaranteed parseability."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm PCM bit depth is one of {8,16,24} before parsing.\nimport { execFile } from 'node:child_process';\nimport { promisify } from 'node:util';\nconst exec = promify(execFile);\nconst SUPPORTED_PCM = new Set([8, 16, 24]);\nasync function isSupportedPcm(filePath) {\n  const { stdout } = await exec('ffprobe', ['-v', 'error', '-select_entries', 'stream=codec_name,bits_per_sample', '-of', 'json', filePath]);\n  const info = JSON.parse(stdout);\n  return info.streams?.every((s) => !/pcm/i.test(s.codec_name ?? '') || SUPPORTED_PCM.has(s.bits_per_sample ?? 0)) ?? true;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await parseMedia({ src, fields: { tracks: true } });\n} catch (err) {\n  if (err instanceof Error && err.message === 'Unknown audio format') {\n    console.error('Unsupported PCM bit depth — down-convert to 16/24-bit.');\n  }\n  throw err;\n}","preventionTips":["Down-convert 32-bit/12-bit PCM to 16 or 24 bits before parsing: ffmpeg -c:a pcm_s16le.","Avoid storing 32-bit PCM in Matroska; use FLAC or WAV instead.","Probe bit depth with ffprobe for PCM assets from untrusted sources."],"tags":["media-parser","webm","pcm","unsupported-feature","audio-codec"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}