remotion-dev/remotion · error · Error
No video config found. You are probably calling useVideoConf
Error message
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.
What it means
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.
Source
Thrown at packages/core/src/use-video-config.ts:30
const videoConfig = useUnsafeVideoConfig();
const context = useContext(CanUseRemotionHooks);
const isPlayer = useIsPlayer();
if (!videoConfig) {
if (
(typeof window !== 'undefined' && window.remotion_isPlayer) ||
isPlayer
) {
throw new Error(
[
'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.',
].join('-'),
);
}
throw new Error(
'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.',
);
}
if (!context) {
throw new Error('Called useVideoConfig() outside a Remotion composition.');
}
return videoConfig;
};
View on GitHub (pinned to 78fe4bb3fd)
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.
Example fix
// before
function App() {
return <MyVideo />; // MyVideo calls useVideoConfig, no composition
}
// after
<Composition id="my-video" component={MyVideo} durationInFrames={150} fps={30} width={1920} height={1080} /> Defensive patterns
Strategy: validation
Validate before calling
// Register the component as a composition before using it.
// <Composition id="x" component={MyComp} durationInFrames={150} fps={30} width={1920} height={1080} /> Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- No video config found. Likely reasons:- You are probably cal
- Called useVideoConfig() outside a Remotion composition.
- <Composition> was mounted inside the `component` that was pa
- <Composition> mounted inside another composition. See https:
- TimelineContext is not available. This hook must be used ins
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/0648b60702de3521.
Report an issue: GitHub.