{"record":{"id":"0648b60702de3521","repo":"remotion-dev/remotion","slug":"no-video-config-found-you-are-probably-calling-us","errorCode":null,"errorMessage":"No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.","messagePattern":"No video config found\\. You are probably calling useVideoConfig\\(\\) from a component which has not been registered as a <Composition />\\. See https://www\\.remotion\\.dev/docs/the-fundamentals#defining-compositions for more information\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/use-video-config.ts","lineNumber":30,"sourceCode":"\tconst videoConfig = useUnsafeVideoConfig();\n\tconst context = useContext(CanUseRemotionHooks);\n\tconst isPlayer = useIsPlayer();\n\n\tif (!videoConfig) {\n\t\tif (\n\t\t\t(typeof window !== 'undefined' && window.remotion_isPlayer) ||\n\t\t\tisPlayer\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t[\n\t\t\t\t\t'No video config found. Likely reasons:',\n\t\t\t\t\t'- You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.',\n\t\t\t\t\t'- You have multiple versions of Remotion installed which causes the React context to get lost.',\n\t\t\t\t].join('-'),\n\t\t\t);\n\t\t}\n\n\t\tthrow new Error(\n\t\t\t'No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.',\n\t\t);\n\t}\n\n\tif (!context) {\n\t\tthrow new Error('Called useVideoConfig() outside a Remotion composition.');\n\t}\n\n\treturn videoConfig;\n};\n","sourceCodeStart":12,"sourceCodeEnd":41,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/use-video-config.ts#L12-L41","documentation":"The non-Player variant of the 'No video config found' error. useVideoConfig throws this when there is no config and the code is NOT in a Player context, meaning the hook was called from a component that was never registered as a <Composition>. Remotion only populates the config context for components rendered through its composition tree.","triggerScenarios":"Calling useVideoConfig() in a component rendered by React directly (e.g. in the Studio shell, a docs demo, or a plain app) rather than inside a <Composition component={...}>; mounting a composition component outside the <RemotionRoot>/Composition registration.","commonSituations":"Reusing a video component in a non-video part of the app; rendering a composition component in Storybook/docs without the composition context; importing a composition's inner component and rendering it standalone.","solutions":["Only call useVideoConfig inside a component that is registered via <Composition component={...}>.","Register the component as a composition: `<Composition id=\"x\" component={MyComp} .../>`.","If you need dimensions outside a composition, pass them as props instead of via the hook.","Wrap test renders in the composition/test providers that supply a config."],"exampleFix":"// before\nfunction App() {\n  return <MyVideo />; // MyVideo calls useVideoConfig, no composition\n}\n\n// after\n<Composition id=\"my-video\" component={MyVideo} durationInFrames={150} fps={30} width={1920} height={1080} />","handlingStrategy":"validation","validationCode":"// Register the component as a composition before using it.\n// <Composition id=\"x\" component={MyComp} durationInFrames={150} fps={30} width={1920} height={1080} />","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only call useVideoConfig inside a component registered via <Composition>.","For non-composition usage, pass dimensions/fps as explicit props.","Keep composition components out of plain React app trees."],"tags":["remotion","composition","use-video-config","context"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}