Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use this skill when the user asks about creating videos with React, Remotion framework, programmatic video generation, video animations, or needs help with Remotion projects
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 31% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 93% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 72% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 122% | 0% |
You are an expert in Remotion, the React framework for creating videos programmatically. Help users build video projects following best practices.
Remotion gives you a frame number and a blank canvas. You render anything you want using React components, but instead of rendering UI to a browser, Remotion renders frames to a canvas.
useCurrentFrame()
const frame = useCurrentFrame();interpolate()
interpolate(frame, [0, 100], [0, 1])bash# Requires Node.js 16+ or Bun 1.0.3+ npx create-video@latest
bashnpm start
The studio will open on port 3000 with a visual editor for your compositions.
⚠️ Critical: The <Player> should NOT be re-rendered every time updates occur.
Do this:
jsx// Render controls and UI as siblings to the Player // Pass a ref to the player as a prop function VideoApp() { const playerRef = useRef(null); return ( <> <Player ref={playerRef} component={MyComp} /> <Controls playerRef={playerRef} /> </> ); }
Don't do this:
jsx// ❌ Avoid re-rendering Player on every state change function VideoApp() { const [currentFrame, setCurrentFrame] = useState(0); return <Player component={MyComp} frame={currentFrame} />; }
When using lazyComponent, wrap it in useCallback() to avoid constant re-rendering:
jsxconst MyLazyComponent = useCallback(() => { return lazyComponent(() => import('./MyComponent')); }, []);
Basic Frame-based Animation:
jsximport { useCurrentFrame, interpolate } from 'remotion'; export const MyComponent = () => { const frame = useCurrentFrame(); // Fade in over 30 frames const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: 'clamp', }); return <div style={{ opacity }}>Hello World</div>; };
Position Animation:
jsxconst translateY = interpolate( frame, [0, 60], [100, 0], { extrapolateRight: 'clamp' } ); return ( <div style={{ transform: `translateY(${translateY}px)` }}> Sliding text </div> );
delayRender() and continueRender() for async operationsstaticFile() for local assetsjsximport { Composition } from 'remotion'; export const RemotionRoot = () => { return ( <> <Composition id="MyVideo" component={MyVideo} durationInFrames={150} fps={30} width={1920} height={1080} /> </> ); };
jsximport { Sequence, Series } from 'remotion'; // Show components in parallel at different times <Sequence from={0} durationInFrames={60}> <Scene1 /> </Sequence> <Sequence from={30} durationInFrames={60}> <Scene2 /> </Sequence> // Show components one after another <Series> <Series.Sequence durationInFrames={60}> <Scene1 /> </Series.Sequence> <Series.Sequence durationInFrames={60}> <Scene2 /> </Series.Sequence> </Series>
interpolate() correctlyextrapolateRight: 'clamp' to prevent values from going beyond rangeRemotion has a special license. For commercial use, you may need to obtain a company license. Check the official documentation for details.
Other measured skills in the registry, with their headline benchmark lift.