Beginner

Setting Up Remotion + Claude Code

Install Remotion, understand the project structure, configure Claude Code CLI for video development, and create your first AI-generated video component.

Step 1: Install Remotion

Create a new Remotion project using the official CLI:

Terminal
# Create a new Remotion project
npx create-video@latest my-video

# Navigate to the project
cd my-video

# Start the development studio
npx remotion studio

The Remotion Studio will open in your browser at http://localhost:3000, showing a preview of the default video with a frame scrubber and playback controls.

Step 2: Project Structure

Understanding the Remotion project structure is essential:

Project Structure
my-video/
├── src/
│   ├── Root.tsx           # Registers all compositions
│   ├── HelloWorld.tsx     # A video component
│   └── MyComposition.tsx  # Another video component
├── public/                # Static assets (images, fonts)
├── remotion.config.ts     # Remotion configuration
├── package.json
└── tsconfig.json

Key Concepts

Concept Description
Composition A registered video with defined width, height, FPS, and duration. Think of it as a video "project."
Sequence A time-shifted section within a composition. Used to arrange scenes one after another.
Frame A single image in the video. At 30fps, a 10-second video has 300 frames.
useCurrentFrame() Hook that returns the current frame number. This is how you animate.
useVideoConfig() Hook that returns fps, width, height, and durationInFrames.
interpolate() Maps a frame range to an output range. Essential for smooth animations.
spring() Creates physics-based spring animations for natural motion.

Step 3: Configure Claude Code

Set up Claude Code CLI to work effectively with your Remotion project. Create a CLAUDE.md file in your project root to give Claude context:

CLAUDE.md
# Remotion Video Project

This is a Remotion video project using React and TypeScript.

## Key Files
- src/Root.tsx: Register all compositions here
- src/: Video components go here
- public/: Static assets (images, audio, fonts)

## Conventions
- Use TypeScript for all components
- Use useCurrentFrame() and interpolate() for animations
- Use spring() for physics-based motion
- Use <Sequence> to arrange scenes in order
- Videos are 1920x1080 at 30fps unless specified
- Export components from their own files
- Register compositions in Root.tsx

Step 4: Your First AI-Generated Component

Open Claude Code CLI in your project directory and ask it to create a video component:

Claude Code Prompt
# In your project directory, run:
claude

# Then ask Claude Code:
"Create a Remotion component called TitleCard that
shows a centered title 'Hello AI Video' with a
fade-in animation over 1 second, then stays visible
for 2 seconds, then fades out over 0.5 seconds.
Use a dark gradient background. Register it as a
composition in Root.tsx with 30fps and the correct
duration."

Claude Code will create the component file and update Root.tsx. Run npx remotion studio to see the result instantly in your browser.

Tip: Be specific about timing, colors, and positioning in your prompts. "Fade in over 1 second" is better than "fade in." "Dark blue gradient from #1a1a2e to #16213e" is better than "dark background."

💡 Try It: Create Your First Video

Follow the steps above to install Remotion and create your first project. Then use Claude Code to generate a simple title card component. Preview it in the Remotion Studio and experiment with changing the text, colors, and animation timing.