remotion-dev/remotion · error · Error
Unsupported subformat: ${subFormat}
Error message
Unsupported subformat: ${subFormat} What it means
For EXTENSIBLE WAVs the 16-byte subFormat GUID is tested against the PCM GUID and the IEEE-float GUID (subformatIsPcm / subformatIsIeeeFloat). If it matches neither, the parser does not know how to decode the samples and throws the raw GUID bytes. Only PCM and IEEE-float subtypes are modeled.
Source
Thrown at packages/media-parser/src/containers/wav/parse-fmt.ts:113
);
}
iterator.getUint16Le(); // valid bits per sample
const channelMask = iterator.getUint32Le();
const subFormat = iterator.getSlice(16);
// check if same as [ 1, 0, 0, 0, 0, 0, 16, 0, 128, 0, 0, 170, 0, 56, 155, 113 ]
if (subFormat.length !== 16) {
throw new Error(
`Only supporting WAVE with PCM audio format, but got ${subFormat.length}`,
);
}
if (subformatIsPcm(subFormat)) {
// is pcm
} else if (subformatIsIeeeFloat(subFormat)) {
// is ieee float
} else {
throw new Error(`Unsupported subformat: ${subFormat}`);
}
const channels = getChannelsFromMask(channelMask);
wavHeader.numberOfChannels = channels.length;
}
await registerAudioTrack({
track: {
type: 'audio',
codec: format,
codecData: null,
description: undefined,
codecEnum: format,
numberOfChannels,
sampleRate,
originalTimescale: 1_000_000,
trackId: 0,
startInSeconds: 0,View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Identify the underlying codec with ffprobe.
- Re-encode to PCM: ffmpeg -i in.wav -c:a pcm_s16le out.wav.
- Use Mediabunny for wider GUID/codec handling.
- try/catch parseMedia() and skip the file.
Example fix
# unknown subFormat GUID -> PCM
ffmpeg -i in.wav -c:a pcm_s16le out.wav
await parseMedia({ src: 'out.wav' }); Defensive patterns
Strategy: try-catch
Validate before calling
// confirm the subFormat is PCM or IEEE float via ffprobe codec_name // ffprobe -show_entries stream=codec_name in.wav
Type guard
const SUPPORTED_SUBFORMATS = new Set(['pcm_s16le','pcm_s24le','pcm_s32le','pcm_f32le']); const isSupportedSubformat = (codec: string) => SUPPORTED_SUBFORMATS.has(codec);
Try / catch
try {
await parseMedia({ src: 'in.wav' });
} catch (err) {
if (err instanceof Error && /Unsupported subformat/i.test(err.message)) {
// unknown GUID — re-encode to PCM or skip
} else throw err;
} Prevention
- Avoid wrapping non-PCM codecs in WAVE_FORMAT_EXTENSIBLE.
- Probe codec_name before parsing.
- Use Mediabunny for broader GUID handling.
When it happens
Trigger: A WAVE_FORMAT_EXTENSIBLE WAV whose subFormat GUID is neither KSDATAFORMAT_SUBTYPE_PCM nor the IEEE-float subtype — e.g. ADPCM, A-law, μ-law, WMA, or another codec wrapped in the EXTENSIBLE format.
Common situations: Compressed audio wrapped in WAVE_FORMAT_EXTENSIBLE; proprietary/legacy codec GUIDs; DAW exports of unusual codecs.
Related errors
- Only supporting WAVE with PCM audio format, but got ${audioF
- Unsupported bits per sample: ${bitsPerSample}
- Unexpected sampling frequency index ${samplingFrequencyIndex
- Unexpected sample rate ${sampleRate}
- Unexpected audio object type ${audioObjectType}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/da2ffee1e0fbfc1e.
Report an issue: GitHub.