{"record":{"id":"3c38168bbdb2cf79","repo":"remotion-dev/remotion","slug":"no-video-config-found","errorCode":null,"errorMessage":"No video config found","messagePattern":"No video config found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/video/VideoForRendering.tsx","lineNumber":96,"sourceCode":"\t\tuseContext(RenderAssetManager);\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`video-${random(\n\t\t\t\tprops.src ?? '',\n\t\t\t)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`,\n\t\t[\n\t\t\tprops.src,\n\t\t\tsequenceContext?.cumulatedFrom,\n\t\t\tsequenceContext?.relativeFrom,\n\t\t\tsequenceContext?.durationInFrames,\n\t\t],\n\t);\n\n\tif (!videoConfig) {\n\t\tthrow new Error('No video config found');\n\t}\n\n\tconst volume = evaluateVolume({\n\t\tvolume: volumeProp,\n\t\tframe: volumePropsFrame,\n\t\tmediaVolume: 1,\n\t});\n\n\twarnAboutTooHighVolume(volume);\n\n\tuseEffect(() => {\n\t\tif (!props.src) {\n\t\t\tthrow new Error('No src passed');\n\t\t}\n\n\t\tif (props.muted) {\n\t\t\treturn;\n\t\t}","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/video/VideoForRendering.tsx#L78-L114","documentation":"The rendering path of `<Video>` (`VideoForRendering`) reads the active video config via `useUnsafeVideoConfig()`. If the component is mounted outside a `<Composition>` / `<Player>` context that provides a config, the value is `null` and the component throws.","triggerScenarios":"Rendering `<Video>` outside of any `<Composition>`, `<Player>`, or `<CurrentFrameContext>`-providing wrapper during a server render.","commonSituations":"Unit-testing a component that contains `<Video>` without wrapping it in a `RemotionRoot`/`Composition`, or rendering a fragment standalone.","solutions":["Ensure `<Video>` is always rendered within a `<Composition>` (or `<Player>`).","In tests, wrap the component in a `<Composition>` and use Remotion's test harness.","Move the `<Video>` out of any standalone-preview code path."],"exampleFix":"// before (standalone)\nrender(<Video src={url} />);\n// after\nrender(<Composition component={() => <Video src={url} />} ... />);","handlingStrategy":"type-guard","validationCode":"// Ensure composition context exists before mounting\nimport {useVideoConfig} from 'remotion';\nconst cfg = useVideoConfig(); // throws a clearer error if missing","typeGuard":"const hasVideoConfig = (): boolean => Boolean(useUnsafeVideoConfig());","tryCatchPattern":null,"preventionTips":["Render `<Video>` only inside `<Composition>` or `<Player>`.","Wrap standalone previews in a `RemotionRoot` with compositions.","Use Remotion's official test utilities for component tests."],"tags":["video","composition-context","rendering","config"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}