remotion-dev/remotion · error · TypeError

No `src` was passed to <OffthreadVideo>.

Error message

No `src` was passed to <OffthreadVideo>.

What it means

`<OffthreadVideo>` (rendering path) requires a `src` to extract frames from; if no `src` is supplied it throws a `TypeError` synchronously during render rather than producing an empty video. This guard fires before asset registration so the failure is loud and early.

Source

Thrown at packages/core/src/video/OffthreadVideoForRendering.tsx:71

	// https://discord.com/channels/809501355504959528/844143007183667220/1311639632496033813
	crossOrigin,
	audioStreamIndex,
	preservePitch: _preservePitch,
	...props
}) => {
	const absoluteFrame = useTimelinePosition();

	const frame = useCurrentFrame();
	const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
	const videoConfig = useUnsafeVideoConfig();
	const sequenceContext = useContext(SequenceContext);
	const mediaStartsAt = useMediaStartsAt();

	const {registerRenderAsset, unregisterRenderAsset} =
		useContext(RenderAssetManager);

	if (!src) {
		throw new TypeError('No `src` was passed to <OffthreadVideo>.');
	}

	// 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(
		() =>
			`offthreadvideo-${random(
				src,
			)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`,
		[
			src,
			sequenceContext?.cumulatedFrom,
			sequenceContext?.relativeFrom,
			sequenceContext?.durationInFrames,
		],
	);

	if (!videoConfig) {

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Always pass a `src` string to `<OffthreadVideo>`.
  2. If src is computed, gate the component: `{url && <OffthreadVideo src={url} />}`.
  3. Add a TypeScript guard at the boundary so the prop is statically required.

Example fix

// before
{show && <OffthreadVideo />}
// after
{show && url && <OffthreadVideo src={url} />}
Defensive patterns

Strategy: type-guard

Validate before calling

if (!src || typeof src !== 'string') {
  throw new TypeError('OffthreadVideo requires a string src');
}

Type guard

const hasStringSrc = (p: {src?: unknown}): p is {src: string} => typeof p.src === 'string' && p.src.length > 0;

Prevention

When it happens

Trigger: Mounting `<OffthreadVideo>` without `src`, or passing `src={undefined}` during a server render.

Common situations: Dynamic compositions where the asset is conditionally fetched, or a typo in the prop name, or destructuring a payload that omits the URL.

Related errors


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