remotion-dev/remotion · error

The audio track cannot be decoded in this browser. Try conve

Error message

The audio track cannot be decoded in this browser. Try converting the media to WAV first.

What it means

After Mediabunny conversion setup, the code checks conversion.isValid. If false, the browser's WebCodecs stack could not decode the audio track (unsupported codec or decoder unavailable), so transcription aborts and suggests converting the media to WAV first.

Source

Thrown at packages/studio/src/components/Transcription/resample-media-to-16-khz.ts:90

								Float32Array.BYTES_PER_ELEMENT,
						);
						sample.copyTo(floats, {format: 'f32', planeIndex: 0});
						waveformChunks.push({
							startFrame: Math.round(
								sample.timestamp * WHISPER_WEBGPU_SAMPLE_RATE,
							),
							waveform: floats,
						});
						return sample;
					},
					sampleFormat: 'f32',
					sampleRate: WHISPER_WEBGPU_SAMPLE_RATE,
				};
			},
		});

		if (!conversion.isValid) {
			throw new Error(
				'The audio track cannot be decoded in this browser. Try converting the media to WAV first.',
			);
		}

		conversion.onProgress = (progress) => onProgress(progress);
		await conversion.execute();
		onProgress(1);
	} finally {
		input.dispose();
	}

	const waveformLength = waveformChunks.reduce(
		(maximum, chunk) =>
			Math.max(maximum, chunk.startFrame + chunk.waveform.length),
		0,
	);
	const waveform = new Float32Array(waveformLength);
	for (const chunk of waveformChunks) {

View on GitHub (pinned to b2f4e34732)

Solutions

  1. Convert the media to WAV (e.g. `ffmpeg -i input.mp4 -vn -ac 1 -ar 16000 output.wav`) and use that as the source.
  2. Use a media file with a widely supported audio codec (AAC, MP3, Opus in a supported container).
  3. Try a different browser (typically Chrome) that supports the source codec via WebCodecs.
  4. Update the browser to the latest version for broader codec support.

Example fix

// before
addCaptionJob({src: 'movie.mkv'}); // EAC3 audio, not decodable
// after
// ffmpeg -i movie.mkv -vn -ac 1 -ar 16000 movie.wav
addCaptionJob({src: '/assets/movie.wav'});
Defensive patterns

Strategy: fallback

Validate before calling

if (typeof AudioDecoder === 'undefined') {
  console.warn('WebCodecs AudioDecoder unavailable; convert media to WAV first.');
}

Try / catch

try {
  await transcribe(src);
} catch (e) {
  if (e.message.includes('cannot be decoded in this browser')) {
    promptUserToConvertToWav(src);
  }
}

Prevention

When it happens

Trigger: Calling resampleMediaTo16Khz on media whose audio codec is not decodable in the current browser — e.g. EAC3, AC3, Opus in a container the browser can't demux, or a browser without the needed AudioDecoder support.

Common situations: Safari/Chrome codec gaps (e.g. DTS/EAC3 audio in MKV/MP4); older browsers lacking WebCodecs; browser without GPU/WebGPU Whisper prerequisites where fallback decode fails.

Related errors


AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09). Data as JSON: /api/errors/49eb292c05f3996d. Report an issue: GitHub.