remotion-dev/remotion · error
The selected media does not have an audio track.
Error message
The selected media does not have an audio track.
What it means
resampleMediaTo16Khz resolves the audio track of the selected media (explicit index, primary video's pairable audio track, or first track). Whisper transcription requires 16kHz mono audio, so if no audio track can be resolved, the function throws instead of failing later during decoding.
Source
Thrown at packages/studio/src/components/Transcription/resample-media-to-16-khz.ts:44
});
const waveformChunks: Array<{
readonly startFrame: number;
readonly waveform: Float32Array;
}> = [];
try {
onProgress(0);
const audioTracks = await input.getAudioTracks();
const primaryVideoTrack =
audioStreamIndex === null ? await input.getPrimaryVideoTrack() : null;
const audioTrack =
audioStreamIndex !== null
? (audioTracks[audioStreamIndex] ?? null)
: primaryVideoTrack
? await primaryVideoTrack.getPrimaryPairableAudioTrack()
: (audioTracks[0] ?? null);
if (audioTrack === null) {
throw new Error('The selected media does not have an audio track.');
}
if (await audioTrack.isLive()) {
throw new Error('Live media cannot be transcribed.');
}
const output = new Output({
format: new WavOutputFormat(),
target: new NullTarget(),
});
const conversion = await Conversion.init({
input,
output,
tracks: 'all',
video: {discard: true},
audio: (track) => {
if (track.id !== audioTrack.id) {
return {discard: true};View on GitHub (pinned to b2f4e34732)
Solutions
- Select a media file that actually contains an audio track.
- Verify the audioStreamIndex is within the number of audio tracks of the media.
- Remux/convert the media to include an audio track (e.g. via ffmpeg) before transcribing.
- If the source legitimately has no audio, skip transcription — captions cannot be generated from it.
Example fix
// before
addCaptionJob({src: videoWithoutAudio, ...});
// after
const hasAudio = getAudioTracks(src).length > 0;
if (hasAudio) addCaptionJob({src, ...}); Defensive patterns
Strategy: validation
Validate before calling
const audioTracks = await getAudioTracks(src);
if (audioTracks.length === 0) {
throw new Error('Source has no audio track; cannot transcribe.');
} Try / catch
try {
await transcribe(src);
} catch (e) {
if (e.message.includes('does not have an audio track')) {
showHint('Choose a media file with audio.');
}
} Prevention
- Check track counts before starting transcription.
- Validate audioStreamIndex bounds.
- Handle image/video-only assets separately.
When it happens
Trigger: Calling resampleMediaTo16Khz with media that has zero audio tracks, or with audioStreamIndex pointing at a nonexistent track index, or a video-only file where no pairable audio track exists.
Common situations: Selecting a silent video (muted export), an image sequence render, or a subtitle-only asset for transcription; passing a wrong audioStreamIndex; media whose codec is not pairable with the output.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Live media cannot be transcribed.
- No audio stream found in '${input_path}'. Ensure the video c
- Could not determine duration of ${src}, but "loop" was set.
- No audio track found
- No `src` was passed to <Audio>.
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09).
Data as JSON: /api/errors/55033fa96ca02949.
Report an issue: GitHub.