{"record":{"id":"cb3db115ca121c21","repo":"remotion-dev/remotion","slug":"no-src-passed-offthreadvideoforrendering","errorCode":null,"errorMessage":"No src passed","messagePattern":"No src passed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/video/OffthreadVideoForRendering.tsx","lineNumber":111,"sourceCode":"\t\tframe: volumePropsFrame,\n\t\tmediaVolume: 1,\n\t});\n\n\twarnAboutTooHighVolume(volume);\n\tconst audioEnabled = useAudioEnabled();\n\tconst {shouldUseAudio} = useMediaAudioState({\n\t\tmuted,\n\t\tvolume,\n\t\taudioEnabled,\n\t});\n\n\tif (!videoConfig) {\n\t\tthrow new Error('No video config found');\n\t}\n\n\tuseEffect(() => {\n\t\tif (!src) {\n\t\t\tthrow new Error('No src passed');\n\t\t}\n\n\t\tif (!shouldUseAudio) {\n\t\t\treturn;\n\t\t}\n\n\t\tregisterRenderAsset({\n\t\t\ttype: 'video',\n\t\t\tsrc: getAbsoluteSrc(src),\n\t\t\tid,\n\t\t\tframe: absoluteFrame,\n\t\t\tvolume,\n\t\t\tmediaFrame: frame,\n\t\t\tplaybackRate,\n\t\t\ttoneFrequency,\n\t\t\taudioStartFrame: Math.max(\n\t\t\t\t0,\n\t\t\t\t-(sequenceContext?.cumulatedNegativeFrom ?? 0),","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/core/src/video/OffthreadVideoForRendering.tsx#L93-L129","documentation":"OffthreadVideoForRendering validates its `src` prop inside a useEffect and throws 'No src passed' when src is falsy (undefined, null, or empty string). The <OffthreadVideo> API requires a src pointing at the video asset to extract frames from.","triggerScenarios":"Rendering `<OffthreadVideo />` or `<OffthreadVideo src={undefined} />`, passing a variable that is empty/undefined at render time (e.g. staticFile result not yet computed, missing asset field in data), or conditionally building the src and accidentally passing ''.","commonSituations":"Data-driven videos where a JSON entry lacks a video URL, forgetting to wrap a local path with staticFile(), or an import resolving to undefined.","solutions":["Always pass a non-empty src, e.g. <OffthreadVideo src={staticFile('video.mp4')} />.","Guard with a check before rendering: only mount OffthreadVideo when src is truthy.","Verify dynamic data (JSON/API) actually contains the URL; add a fallback or throw a clearer error upstream.","Check that imports of asset URLs are correct and not undefined."],"exampleFix":"// before\n<OffthreadVideo src={item.videoUrl} />\n// after\n{item.videoUrl ? <OffthreadVideo src={staticFile(item.videoUrl)} /> : null}","handlingStrategy":"validation","validationCode":"if (!src) {\n  throw new Error('OffthreadVideo requires a non-empty src');\n}\nreturn <OffthreadVideo src={src} />;","typeGuard":"const hasSrc = (src: unknown): src is string =>\n  typeof src === 'string' && src.length > 0;","tryCatchPattern":"// Error is thrown in useEffect during render; validate props instead.\nif (!hasSrc(src)) {\n  return null; // or a placeholder\n}\nreturn <OffthreadVideo src={src} />;","preventionTips":["Always build src with staticFile() for local assets.","Validate data-driven inputs (JSON/API) before rendering sequences.","Never render <OffthreadVideo> when the asset URL is missing; render a fallback instead.","Type the src prop as string and avoid optional chaining that can yield undefined."],"tags":["props","validation","video"],"backgroundTag":"missing-required-argument","analyzedSha":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-09-18T00:12:20.256Z","contentChangedAt":"2026-09-18T00:12:20.256Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}