remotion-dev/remotion · error · Error

No audio track found

Error message

No audio track found

What it means

Thrown inside useWindowedAudioData()'s metadata fetch when mediabunny's input.getPrimaryAudioTrack() returns a falsy track (line 132-134). It means the container either has no audio stream at all or only has video/data tracks, so there is nothing to window or visualize. The thrown error is caught and forwarded to cancelRender(), which fails the Remotion render.

Source

Thrown at packages/media-utils/src/use-windowed-audio-data.ts:133

				source: new UrlSource(
					src,
					initialRequestInit ? {requestInit: initialRequestInit} : undefined,
				),
			});

			const onAbort = () => {
				input.dispose();
			};

			signal.addEventListener('abort', onAbort, {once: true});

			try {
				const durationInSeconds = await input.computeDuration();

				const audioTrack = await input.getPrimaryAudioTrack();

				if (!audioTrack) {
					throw new Error('No audio track found');
				}

				if (await audioTrack.isLive()) {
					throw new Error(
						'Live streams are not currently supported by Remotion. Sorry! Source: ' +
							src,
					);
				}

				if (await audioTrack.isRelativeToUnixEpoch()) {
					throw new Error(
						'Streams with UNIX timestamps are not currently supported by Remotion. Sorry! Source: ' +
							src,
					);
				}

				const canDecode = await audioTrack.canDecode();

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Confirm the source file actually contains an audio stream using ffprobe <file> or mediainfo; look for an Audio stream entry.
  2. If the asset is intentionally silent, do not call useWindowedAudioData; render a flat waveform placeholder instead.
  3. Re-mux/transcode the asset to include an audio track (e.g. ffmpeg -i in.mp4 -c:v copy -c:a aac out.mp4).
  4. Point the hook at the original audio source rather than a derived video proxy that may have dropped audio.

Example fix

// before (video-only src -> 'No audio track found')
const {audioData} = useWindowedAudioData({src: staticFile('clip-no-audio.mp4'), ...});

// after (validate before use, fall back gracefully)
const hasAudio = await probeAudioTrack(staticFile('clip.mp4'));
return hasAudio
  ? <Waveform src={staticFile('clip.mp4')} ... />
  : <SilentWaveformPlaceholder />;
Defensive patterns

Strategy: validation

Validate before calling

// Probe the file for an audio stream before invoking the hook
import {execFileSync} from 'child_process';

function hasAudioTrack(file: string): boolean {
  const out = execFileSync('ffprobe', ['-v', 'error', '-select_streams', 'a', '-show_entries', 'stream=index', '-of', 'csv=p=0', file], {encoding: 'utf8'});
  return out.trim().length > 0;
}

// in the component:
return hasAudioTrack(file)
  ? <Waveform src={file} ... />
  : <SilentWaveformPlaceholder />;

Type guard

async function hasAudioTrackMediabunny(src: string): Promise<boolean> {
  const {Input} = await import('mediabunny');
  const input = new Input({source: src});
  try {
    return Boolean(await input.getPrimaryAudioTrack());
  } catch {
    return false;
  } finally {
    input.dispose();
  }
}

Try / catch

// useWindowedAudioData forwards this to cancelRender(); wrap an ErrorBoundary
// around the composition subtree and fall back to a static placeholder:
// <ErrorBoundary fallback={<StaticWaveform/>}>
//   <WindowedWaveform src={src} .../>
// </ErrorBoundary>

Prevention

When it happens

Trigger: Pointing useWindowedAudioData at a video-only file (no audio stream), a silent/placeholder MP4 with a video track only, a muted proxy export, a still image mislabeled as audio, or a corrupt file where the audio track could not be parsed.

Common situations: Using a stock video clip that ships video-only; rendering a waveform for an asset that was transcoded without an audio track (-an flag); pointing at the wrong file (e.g. a thumbnail); progressive download truncated before the audio moov atom.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/267a02f2c7e968df. Report an issue: GitHub.