{"record":{"id":"0c8ee9ec6135f3cc","repo":"remotion-dev/remotion","slug":"unsupported-version-version","errorCode":null,"errorMessage":"Unsupported version ${version}","messagePattern":"Unsupported version (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/media-parser/src/containers/iso-base-media/stsd/samples.ts","lineNumber":307,"sourceCode":"\t\t\t\t\trevisionLevel,\n\t\t\t\t\tvendor: [...Array.from(new Uint8Array(vendor))],\n\t\t\t\t\tsize: boxSize,\n\t\t\t\t\ttype: 'audio',\n\t\t\t\t\tnumberOfChannels: numAudioChannel,\n\t\t\t\t\tsampleSize,\n\t\t\t\t\tcompressionId,\n\t\t\t\t\tpacketSize,\n\t\t\t\t\tsampleRate: higherSampleRate,\n\t\t\t\t\tsamplesPerPacket,\n\t\t\t\t\tbytesPerPacket: null,\n\t\t\t\t\tbytesPerFrame,\n\t\t\t\t\tbitsPerSample: bitsPerChannel,\n\t\t\t\t\tchildren,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\tthrow new Error(`Unsupported version ${version}`);\n\t}\n\n\tif (isVideo) {\n\t\tconst version = iterator.getUint16();\n\t\tconst revisionLevel = iterator.getUint16();\n\t\tconst vendor = iterator.getSlice(4);\n\t\tconst temporalQuality = iterator.getUint32();\n\t\tconst spacialQuality = iterator.getUint32();\n\t\tconst width = iterator.getUint16();\n\t\tconst height = iterator.getUint16();\n\t\tconst horizontalResolution = iterator.getFixedPointUnsigned1616Number();\n\t\tconst verticalResolution = iterator.getFixedPointUnsigned1616Number();\n\t\tconst dataSize = iterator.getUint32();\n\t\tconst frameCountPerSample = iterator.getUint16();\n\t\tconst compressorName = iterator.getPascalString();\n\t\tconst depth = iterator.getUint16();\n\t\tconst colorTableId = iterator.getInt16();\n","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/media-parser/src/containers/iso-base-media/stsd/samples.ts#L289-L325","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Inspect the file with `ffprobe -show_streams input.mp4` to see the actual audio codec and version.","Re-mux: `ffmpeg -i input.mp4 -c:a aac -b:a 128k remuxed.mp4` to normalize the audio sample entry.","If you only need video, drop the audio: `ffmpeg -i input.mp4 -an video_only.mp4`.","Report the codec/file upstream so the parser's audio sample-entry coverage is extended."],"exampleFix":"// before: ALAC audio sample entry with version 2 throws\nffmpeg -i input.m4a -c:a aac -b:a 128k normalized.m4a\n// after: standard AAC v0 sample entry parses cleanly","handlingStrategy":"try-catch","validationCode":"// Probe audio codec/version with ffprobe before parsing\n// ffprobe -show_streams -select_streams a input.mp4 → check codec_name and profile","typeGuard":null,"tryCatchPattern":"try {\n  await parseMedia({src, fields: {dimensions: true}});\n} catch (err) {\n  if (err instanceof Error && err.message.startsWith('Unsupported version')) {\n    // audio sample entry version unsupported; transcode or drop audio\n  } else throw err;\n}","preventionTips":["Normalize audio to AAC with ffmpeg before parsing exotic codecs.","Probe streams with ffprobe to detect unusual audio codecs upstream.","For user uploads, re-encode audio to a standard codec as a preprocessing step."],"tags":["media-parser","isobmff","stsd","audio","parser-coverage","mp4"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}