{"record":{"id":"267a02f2c7e968df","repo":"remotion-dev/remotion","slug":"no-audio-track-found","errorCode":null,"errorMessage":"No audio track found","messagePattern":"No audio track found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/media-utils/src/use-windowed-audio-data.ts","lineNumber":133,"sourceCode":"\t\t\t\tsource: new UrlSource(\n\t\t\t\t\tsrc,\n\t\t\t\t\tinitialRequestInit ? {requestInit: initialRequestInit} : undefined,\n\t\t\t\t),\n\t\t\t});\n\n\t\t\tconst onAbort = () => {\n\t\t\t\tinput.dispose();\n\t\t\t};\n\n\t\t\tsignal.addEventListener('abort', onAbort, {once: true});\n\n\t\t\ttry {\n\t\t\t\tconst durationInSeconds = await input.computeDuration();\n\n\t\t\t\tconst audioTrack = await input.getPrimaryAudioTrack();\n\n\t\t\t\tif (!audioTrack) {\n\t\t\t\t\tthrow new Error('No audio track found');\n\t\t\t\t}\n\n\t\t\t\tif (await audioTrack.isLive()) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Live streams are not currently supported by Remotion. Sorry! Source: ' +\n\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (await audioTrack.isRelativeToUnixEpoch()) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Streams with UNIX timestamps are not currently supported by Remotion. Sorry! Source: ' +\n\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst canDecode = await audioTrack.canDecode();\n","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/media-utils/src/use-windowed-audio-data.ts#L115-L151","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Confirm the source file actually contains an audio stream using ffprobe <file> or mediainfo; look for an Audio stream entry.","If the asset is intentionally silent, do not call useWindowedAudioData; render a flat waveform placeholder instead.","Re-mux/transcode the asset to include an audio track (e.g. ffmpeg -i in.mp4 -c:v copy -c:a aac out.mp4).","Point the hook at the original audio source rather than a derived video proxy that may have dropped audio."],"exampleFix":"// before (video-only src -> 'No audio track found')\nconst {audioData} = useWindowedAudioData({src: staticFile('clip-no-audio.mp4'), ...});\n\n// after (validate before use, fall back gracefully)\nconst hasAudio = await probeAudioTrack(staticFile('clip.mp4'));\nreturn hasAudio\n  ? <Waveform src={staticFile('clip.mp4')} ... />\n  : <SilentWaveformPlaceholder />;","handlingStrategy":"validation","validationCode":"// Probe the file for an audio stream before invoking the hook\nimport {execFileSync} from 'child_process';\n\nfunction hasAudioTrack(file: string): boolean {\n  const out = execFileSync('ffprobe', ['-v', 'error', '-select_streams', 'a', '-show_entries', 'stream=index', '-of', 'csv=p=0', file], {encoding: 'utf8'});\n  return out.trim().length > 0;\n}\n\n// in the component:\nreturn hasAudioTrack(file)\n  ? <Waveform src={file} ... />\n  : <SilentWaveformPlaceholder />;","typeGuard":"async function hasAudioTrackMediabunny(src: string): Promise<boolean> {\n  const {Input} = await import('mediabunny');\n  const input = new Input({source: src});\n  try {\n    return Boolean(await input.getPrimaryAudioTrack());\n  } catch {\n    return false;\n  } finally {\n    input.dispose();\n  }\n}","tryCatchPattern":"// useWindowedAudioData forwards this to cancelRender(); wrap an ErrorBoundary\n// around the composition subtree and fall back to a static placeholder:\n// <ErrorBoundary fallback={<StaticWaveform/>}>\n//   <WindowedWaveform src={src} .../>\n// </ErrorBoundary>","preventionTips":["Pre-validate assets with ffprobe to confirm an Audio stream exists before rendering.","Prefer original recordings over transcoded proxies that may have dropped audio.","Do not call useWindowedAudioData on video-only assets; render a flat/silent placeholder instead.","Watch for assets truncated mid-upload; re-fetch if the moov/audio atom may be incomplete."],"tags":["audio","validation","media","mediabunny","render-failure"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}