remotion-dev/remotion · error · Error
Only supporting WAVE with PCM audio format, but got ${subFor
Error message
Only supporting WAVE with PCM audio format, but got ${subFormat.length} What it means
Inside the EXTENSIBLE branch the parser slices 16 bytes for the subFormat GUID and re-checks its length; if the underlying buffer had fewer than 16 bytes left (truncated fmt chunk) the slice is short and this throws. NOTE: the message is misleading — it says 'PCM audio format' but the real condition is subFormat.length !== 16. Treat it as a truncated-corrupt-header error, not a codec-compatibility error.
Source
Thrown at packages/media-parser/src/containers/wav/parse-fmt.ts:103
type: 'wav-fmt',
};
state.structure.getWavStructure().boxes.push(wavHeader);
if (audioFormat === 65534) {
const extraSize = iterator.getUint16Le();
if (extraSize !== 22) {
throw new Error(
`Only supporting WAVE with 22 extra bytes, but got ${extraSize} bytes extra size`,
);
}
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: {View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Confirm the fmt chunk is intact (ffprobe loads the file cleanly).
- Re-download or re-export the WAV.
- Re-encode with ffmpeg to a clean PCM WAV.
- Use Mediabunny; try/catch parseMedia().
Example fix
# verify integrity, then re-encode
ffprobe -v error in.wav && ffmpeg -i in.wav -c:a pcm_s16le out.wav
await parseMedia({ src: 'out.wav' }); Defensive patterns
Strategy: try-catch
Validate before calling
// verify the fmt chunk is intact (file loads cleanly in ffprobe) // ffprobe -v error in.wav
Try / catch
try {
await parseMedia({ src: 'in.wav' });
} catch (err) {
// NOTE: misleading message — this is really a truncated subFormat GUID
if (err instanceof Error && /PCM audio format, but got/.test(err.message)) {
// treat as corrupt header — re-download / re-encode
} else throw err;
} Prevention
- Remember error 1425's message is misleading: it signals a truncated GUID, not a codec issue.
- Re-download truncated assets before retrying.
- Use Mediabunny.
When it happens
Trigger: A WAVE_FORMAT_EXTENSIBLE fmt chunk where fewer than 16 bytes remain after cbSize/valid-bps/channel-mask, so iterator.getSlice(16) returns a short slice.
Common situations: Truncated/partial download; stream cut off mid-fmt; corrupted fmt chunk bytes.
Related errors
- Only supporting WAVE with 22 extra bytes, but got ${extraSiz
- Expected data box
- Expected size 4 for fact box, got ${size}
- Only supporting WAVE with PCM audio format, but got ${audioF
- Unsupported bits per sample: ${bitsPerSample}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/8dcd7aebcea7407c.
Report an issue: GitHub.