{"record":{"id":"54c4b6e20c128479","repo":"remotion-dev/remotion","slug":"no-video-config-found-likely-reasons-you-are-pr","errorCode":null,"errorMessage":"No video config found. Likely reasons:- 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.- You have multiple versions of Remotion installed which causes the React context to get lost.","messagePattern":"No video config found\\. Likely reasons:- 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\\.- You have multiple versions of Remotion installed which causes the React context to get lost\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/use-video-config.ts","lineNumber":21,"sourceCode":"import {useIsPlayer} from './is-player.js';\nimport {useUnsafeVideoConfig} from './use-unsafe-video-config.js';\nimport type {VideoConfig} from './video-config.js';\n\n/*\n * @description Retrieves information about the composition context in which it is used, including dimensions, frame rate, duration, and more.\n * @see [Documentation](https://www.remotion.dev/docs/use-video-config)\n */\nexport const useVideoConfig = (): VideoConfig => {\n\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;","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/use-video-config.ts#L3-L39","documentation":"useVideoConfig throws this Player-specific variant when no video config is found and the code detects it is running inside @remotion/player (window.remotion_isPlayer or useIsPlayer true). It means useVideoConfig was called from a component that is not a descendant of the component passed to <Player component={...}/>, or that multiple Remotion versions split the context.","triggerScenarios":"Calling useVideoConfig in a sibling/parent of the Player's child component rather than inside it; rendering the Player and a separate component tree that shares a hook; duplicate @remotion/core copies so the Player's provider does not reach the hook.","commonSituations":"Extracting a hook call outside the component passed to <Player>; HOCs that call useVideoConfig before the Player subtree mounts; monorepo with mismatched @remotion versions across packages; bundler dedupe issues.","solutions":["Move the useVideoConfig() call inside the component you pass to <Player component={...}>.","Deduplicate Remotion: `npm ls @remotion/core` should show one version; add overrides/resolutions if multiple resolve.","Confirm the component passed to <Player> is the same component (or a descendant) that calls useVideoConfig.","See https://www.remotion.dev/docs/player/examples for the correct Player wiring."],"exampleFix":"// before\nfunction Outer() {\n  const {fps} = useVideoConfig(); // outside Player subtree\n  return <Player component={Inner} {...props} />;\n}\n\n// after\nfunction Inner() {\n  const {fps} = useVideoConfig();\n  return <h1>{fps}</h1>;\n}\nfunction Outer() {\n  return <Player component={Inner} {...props} />;\n}","handlingStrategy":"validation","validationCode":"// Move useVideoConfig() inside the component passed to <Player>.\n// Dedupe Remotion: ensure `npm ls @remotion/core` shows one version.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Call useVideoConfig only inside the component passed via <Player component={...}>.","Deduplicate Remotion across the workspace with package manager overrides.","When extracting logic, pass needed config values as props instead of calling the hook outside."],"tags":["remotion","player","use-video-config","context","version-mismatch"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}