{"record":{"id":"01f5e56b804c4fd3","repo":"remotion-dev/remotion","slug":"no-src-was-passed-to-offthreadvideo","errorCode":null,"errorMessage":"No `src` was passed to <OffthreadVideo>.","messagePattern":"No `src` was passed to <OffthreadVideo>\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/video/OffthreadVideoForRendering.tsx","lineNumber":71,"sourceCode":"\t// https://discord.com/channels/809501355504959528/844143007183667220/1311639632496033813\n\tcrossOrigin,\n\taudioStreamIndex,\n\tpreservePitch: _preservePitch,\n\t...props\n}) => {\n\tconst absoluteFrame = useTimelinePosition();\n\n\tconst frame = useCurrentFrame();\n\tconst volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);\n\tconst videoConfig = useUnsafeVideoConfig();\n\tconst sequenceContext = useContext(SequenceContext);\n\tconst mediaStartsAt = useMediaStartsAt();\n\n\tconst {registerRenderAsset, unregisterRenderAsset} =\n\t\tuseContext(RenderAssetManager);\n\n\tif (!src) {\n\t\tthrow new TypeError('No `src` was passed to <OffthreadVideo>.');\n\t}\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`offthreadvideo-${random(\n\t\t\t\tsrc,\n\t\t\t)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`,\n\t\t[\n\t\t\tsrc,\n\t\t\tsequenceContext?.cumulatedFrom,\n\t\t\tsequenceContext?.relativeFrom,\n\t\t\tsequenceContext?.durationInFrames,\n\t\t],\n\t);\n\n\tif (!videoConfig) {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/video/OffthreadVideoForRendering.tsx#L53-L89","documentation":"`<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.","triggerScenarios":"Mounting `<OffthreadVideo>` without `src`, or passing `src={undefined}` during a server render.","commonSituations":"Dynamic compositions where the asset is conditionally fetched, or a typo in the prop name, or destructuring a payload that omits the URL.","solutions":["Always pass a `src` string to `<OffthreadVideo>`.","If src is computed, gate the component: `{url && <OffthreadVideo src={url} />}`.","Add a TypeScript guard at the boundary so the prop is statically required."],"exampleFix":"// before\n{show && <OffthreadVideo />}\n// after\n{show && url && <OffthreadVideo src={url} />}","handlingStrategy":"type-guard","validationCode":"if (!src || typeof src !== 'string') {\n  throw new TypeError('OffthreadVideo requires a string src');\n}","typeGuard":"const hasStringSrc = (p: {src?: unknown}): p is {src: string} => typeof p.src === 'string' && p.src.length > 0;","tryCatchPattern":null,"preventionTips":["Make `src` a required string in your component's TypeScript props.","Conditionally render `<OffthreadVideo>` only when src is present.","Use `staticFile()` for local assets."],"tags":["offthreadvideo","src","rendering","validation"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}