{"record":{"id":"73ede338964950b7","repo":"remotion-dev/remotion","slug":"no-src-was-passed-to-audio","errorCode":null,"errorMessage":"No `src` was passed to <Audio>.","messagePattern":"No `src` was passed to <Audio>\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/media/src/audio/audio-for-rendering.tsx","lineNumber":61,"sourceCode":"\tconst defaultLogLevel = Internals.useLogLevel();\n\tconst logLevel = overriddenLogLevel ?? defaultLogLevel;\n\tconst frame = useCurrentFrame();\n\tconst absoluteFrame = Internals.useTimelinePosition();\n\n\tconst videoConfig = Internals.useUnsafeVideoConfig();\n\tconst {registerRenderAsset, unregisterRenderAsset} = useContext(\n\t\tInternals.RenderAssetManager,\n\t);\n\tconst startsAt = Internals.useMediaStartsAt();\n\n\tconst environment = useRemotionEnvironment();\n\n\tif (!videoConfig) {\n\t\tthrow new Error('No video config found');\n\t}\n\n\tif (!src) {\n\t\tthrow new TypeError('No `src` was passed to <Audio>.');\n\t}\n\n\tconst {fps} = videoConfig;\n\n\tconst {delayRender, continueRender} = useDelayRender();\n\tconst [replaceWithHtml5Audio, setReplaceWithHtml5Audio] = useState(false);\n\tconst [initialRequestInit] = useState(requestInit);\n\n\tconst sequenceContext = useContext(Internals.SequenceContext);\n\n\t// Generate a string that's as unique as possible for this asset\n\t// but at the same time the same on all threads\n\tconst id = useMemo(\n\t\t() =>\n\t\t\t`media-audio-${random(\n\t\t\t\tsrc,\n\t\t\t)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`,\n\t\t[","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/media/src/audio/audio-for-rendering.tsx#L43-L79","documentation":"Thrown by <Audio> (audio-for-rendering) in @remotion/media when `src` is falsy during a server render. The render path must register a concrete asset URL with the RenderAssetManager so ffmpeg can mux it, so an empty source is unrecoverable for rendering specifically.","triggerScenarios":"Rendering <Audio src={undefined} /> or <Audio src={''} /> and running `remotion render`. The error surfaces during asset registration, which only happens on the render path (not in Studio preview).","commonSituations":"Passing audio src through props that are undefined in the render entry but populated in preview, or conditionally building src that collapses to empty for certain composition props.","solutions":["Pass a valid asset URL: <Audio src={staticFile('voiceover.wav')} /> or a remote URL.","Gate the component: {src && <Audio src={src} />} so empty audio is skipped rather than rendered.","Check the composition's input props in the render CLI invocation match what your code expects."],"exampleFix":"// before\n<Audio src={props.audio} /> // props.audio undefined at render time\n\n// after\n{props.audio ? <Audio src={props.audio} /> : null}","handlingStrategy":"validation","validationCode":"const audioSrc = typeof src === 'string' && src.length > 0 ? src : null;\nreturn audioSrc ? <Audio src={audioSrc} /> : null;","typeGuard":"const isNonEmptyString = (v: unknown): v is string =>\n  typeof v === 'string' && v.trim().length > 0;","tryCatchPattern":null,"preventionTips":["Ensure input props passed to `remotion render` always include the audio src.","Gate <Audio> rendering behind a non-empty src check.","Test the render path with the same props you use in preview."],"tags":["audio","src","render","media","validation"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}