remotion-dev/remotion · error · TypeError
No `src` was passed to <Audio>.
Error message
No `src` was passed to <Audio>.
What it means
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.
Source
Thrown at packages/media/src/audio/audio-for-rendering.tsx:61
const defaultLogLevel = Internals.useLogLevel();
const logLevel = overriddenLogLevel ?? defaultLogLevel;
const frame = useCurrentFrame();
const absoluteFrame = Internals.useTimelinePosition();
const videoConfig = Internals.useUnsafeVideoConfig();
const {registerRenderAsset, unregisterRenderAsset} = useContext(
Internals.RenderAssetManager,
);
const startsAt = Internals.useMediaStartsAt();
const environment = useRemotionEnvironment();
if (!videoConfig) {
throw new Error('No video config found');
}
if (!src) {
throw new TypeError('No `src` was passed to <Audio>.');
}
const {fps} = videoConfig;
const {delayRender, continueRender} = useDelayRender();
const [replaceWithHtml5Audio, setReplaceWithHtml5Audio] = useState(false);
const [initialRequestInit] = useState(requestInit);
const sequenceContext = useContext(Internals.SequenceContext);
// Generate a string that's as unique as possible for this asset
// but at the same time the same on all threads
const id = useMemo(
() =>
`media-audio-${random(
src,
)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`,
[View on GitHub (pinned to 78fe4bb3fd)
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.
Example fix
// before
<Audio src={props.audio} /> // props.audio undefined at render time
// after
{props.audio ? <Audio src={props.audio} /> : null} Defensive patterns
Strategy: validation
Validate before calling
const audioSrc = typeof src === 'string' && src.length > 0 ? src : null;
return audioSrc ? <Audio src={audioSrc} /> : null; Type guard
const isNonEmptyString = (v: unknown): v is string => typeof v === 'string' && v.trim().length > 0;
Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- No `src` was passed to <NewAudioForPreview>.
- The `<Audio>` tag requires a string for `src`, but got ${JSO
- No `src` was passed to <Video>.
- No 'src' was passed to <Html5Audio>.
- No src passed
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/73ede338964950b7.
Report an issue: GitHub.