remotion-dev/remotion · error
The transcription asset must be audio or video.
Error message
The transcription asset must be audio or video.
What it means
The WebMcp transcription tool resolves the asset then checks its preview file type. Whisper can only transcribe audio/video, so assets of other types (images, fonts, JSON, etc.) are rejected with this error.
Source
Thrown at packages/studio/src/components/WebMcp.tsx:506
},
noRepeatNgramSize: {type: 'integer', minimum: 0, default: 0},
},
additionalProperties: false,
},
annotations: {readOnlyHint: false},
execute: async (input) => {
if (!isOptionalPackageInstalled(WHISPER_WEBGPU_PACKAGE)) {
return missingOptionalPackageResult(WHISPER_WEBGPU_PACKAGE);
}
const assetPath = resolveAssetPath({
assetPath: input.assetPath,
currentContent: currentContentRef.current,
staticFiles: staticFilesRef.current,
});
const fileType = getPreviewFileType(assetPath);
if (fileType !== 'audio' && fileType !== 'video') {
throw new Error(
'The transcription asset must be audio or video.',
);
}
const whisper = await import('@remotion/whisper-webgpu');
const modelName = input.model ?? 'small.en';
if (typeof modelName !== 'string') {
throw new Error('model must be a string.');
}
const model = whisper
.getAvailableModels()
.find((candidate) => candidate.name === modelName);
if (!model) {
throw new Error(`Unknown Whisper model: ${modelName}.`);
}
const task = input.task ?? 'transcribe';View on GitHub (pinned to b2f4e34732)
Solutions
- Pass assetPath pointing at an audio or video file (e.g. .mp3, .wav, .mp4, .mov).
- Select the correct media asset in Studio before invoking the tool.
- If the source is a different format, convert it to audio first.
- Verify the file's actual media type matches its extension.
Example fix
// before
await tool.execute({assetPath: 'poster.png'});
// after
await tool.execute({assetPath: 'voiceover.mp3'}); Defensive patterns
Strategy: validation
Validate before calling
const fileType = getPreviewFileType(assetPath);
if (fileType !== 'audio' && fileType !== 'video') {
throw new Error('Transcription requires an audio or video asset.');
} Try / catch
try {
await transcribeTool({assetPath});
} catch (e) {
if (e.message.includes('must be audio or video')) {
chooseMediaAssetInstead();
}
} Prevention
- Check getPreviewFileType before calling.
- Keep media assets organized separately in public/.
- Never point transcription at images/fonts/data files.
When it happens
Trigger: Calling the WebMcp transcribe tool with assetPath (or a selected Studio asset) pointing to a non-media file in public/ — e.g. a .png, .json, or .ttf file.
Common situations: Agents picking the wrong asset from public/; users selecting a thumbnail or data file in Studio; assets with misleading extensions (e.g. a .txt containing a transcript).
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- No audio track found
- No `src` was passed to <Audio>.
- No `src` was passed to <Video>.
- The artifact filename ${artifact.filename} was emitted more
- No `src` was passed to <NewAudioForPreview>.
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09).
Data as JSON: /api/errors/6a90e66c209fe056.
Report an issue: GitHub.