remotion-dev/remotion · error
Only "1" is supported as a stream type in .avi, got ${handle
Error message
Only "1" is supported as a stream type in .avi, got ${handler} What it means
Thrown by parseStrh() for an 'auds' stream when the handler value (read as a little-endian uint32) is not 1. For audio streams the handler field is interpreted as wFormatTag; tag 1 is PCM, and the parser treats only that value as acceptable at the strh level. (Note: track construction in makeAviAudioTrack separately requires formatTag 255 for AAC, so an 'auds' stream must satisfy both gates depending on path.)
Source
Thrown at packages/media-parser/src/containers/riff/parse-strh.ts:29
}): RiffBox => {
const box = iterator.startBox(size);
const fccType = iterator.getByteString(4, false);
if (fccType !== 'vids' && fccType !== 'auds') {
throw new Error('Expected AVI handler to be vids / auds');
}
const handler =
fccType === 'vids'
? iterator.getByteString(4, false)
: iterator.getUint32Le();
if (typeof handler === 'string' && handler !== 'H264') {
throw new Error(
`Only H264 is supported as a stream type in .avi, got ${handler}`,
);
}
if (fccType === 'auds' && handler !== 1) {
throw new Error(
`Only "1" is supported as a stream type in .avi, got ${handler}`,
);
}
const flags = iterator.getUint32Le();
const priority = iterator.getUint16Le();
const language = iterator.getUint16Le();
const initialFrames = iterator.getUint32Le();
const scale = iterator.getUint32Le();
const rate = iterator.getUint32Le();
const start = iterator.getUint32Le();
const length = iterator.getUint32Le();
const suggestedBufferSize = iterator.getUint32Le();
const quality = iterator.getUint32Le();
const sampleSize = iterator.getUint32Le();
box.discardRest();
const ckId = iterator.getByteString(4, false);View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Remux/transcode so the audio stream is AAC and conforms to what the parser expects: ffmpeg -i in.avi -c:v copy -c:a aac out.avi
- Strip the audio if only video is needed: ffmpeg -i in.avi -an -c:v copy out.avi
- Inspect with ffprobe -show_streams to confirm strh handler values before parsing.
Example fix
// before
await parseMediaStream({src: 'oddstrh.avi'});
// after: normalize the audio
// ffmpeg -i oddstrh.avi -c:v copy -c:a aac out.avi
await parseMediaStream({src: 'out.avi'}); Defensive patterns
Strategy: validation
Validate before calling
// Inspect the auds strh handler value; must be 1 (PCM-style tag) for the parser. // Use ffprobe to confirm AVI audio structure before parsing.
Type guard
function isPcmHandler(handler: number): boolean {
return handler === 1;
} Try / catch
try {
await parseMediaStream({src: 'in.avi'});
} catch (err) {
if (err instanceof Error && err.message.startsWith('Only "1" is supported')) {
// remux/transcode the audio: ffmpeg -i in.avi -c:v copy -c:a aac out.avi
} else throw err;
} Prevention
- Author AVI audio streams with a strh handler of 1.
- Re-mux with ffmpeg to normalize unusual handler values.
- Validate with ffprobe before parsing.
When it happens
Trigger: An AVI audio stream whose strh handler/codec field is not 1 — e.g. an audio stream declared with a non-PCM format tag at the strh level.
Common situations: AVIs where the audio stream's strh handler is set to a non-1 value (MP3=0x55, AAC=0x00FF, etc.). Files produced by encoders that write the actual codec tag into strh.handler instead of 1.
Related errors
- Unsupported audio format ${strf.formatTag}
- Not a RIFF file
- File type ${fileType} not supported
- Unsupported video codec ${strh.handler}
- Unsupported track type ${strh.fccType}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/825fa5283f4c4665.
Report an issue: GitHub.