remotion
Verifiedby remotion-dev · Updated Apr 16, 2026
Best practices and comprehensive guide for Remotion - programmatic video creation in React with animations, compositions, and media handling
See It In Action
Let me explore the codebase and load the Remotion skill in parallel.
Let me pull the key reference docs to give you a grounded plan.
Here's your game plan. The skeleton is already wired — Root.tsx registers a 1080x1920 / 30fps / 1350-frame composition pointing at src/LaunchRecap.tsx, which doesn't exist yet.
Video Structure — 45s / 1350 frames / 5 scenes
Use <Series> for the linear timeline so you don't hand-calculate from offsets:
| # | Scene | Duration | Frames | What's on screen |
|---|---|---|---|---|
| 1 | Hook / Title | 3s | 90 | Title spring-pops in, subtitle fades up, bg gradient animates |
| 2 | KPI Highlights | 10s | 300 | 3-4 animated counters (users, revenue, signups) stagger in |
| 3 | Growth Chart | 12s | 360 | Animated bar or line chart draws on, labels fade in |
| 4 | Feature Showcase | 14s | 420 | 3-4 feature cards slide in sequentially, optional product screenshots |
| 5 | CTA / Outro | 6s | 180 | Logo, call-to-action text, social handles fade in |
Total: 1350 frames. Use negative offset on Series items if you want cross-fade overlaps between scenes.
Captions
Use @remotion/captions (already in deps) with a hardcoded Caption[] array — no whisper transcription needed for a recap video with known copy.
- Style: TikTok-style word highlighting, positioned
bottom: 200pxin the safe zone - Font: 48-52px, weight 700-800, white text + dark text-shadow
- Active word: highlight with a spring-scaled pop + color shift (gold/green)
- Pages:
createCaptionPages()withcombineTokensWithinMilliseconds: 3000 - Layer the
<CaptionDisplay>as a persistent<Sequence>that spans the full video, on top of scene content
Charts (Scene 3)
Pick one of these patterns from the reference:
- Bar chart — best for comparing KPIs (users vs revenue vs signups). Stagger bars with
frame - i * 8delay,Easing.out(Easing.cubic), animate both bar height AND the counter label above each bar. - Line chart — best for showing growth over time. SVG polyline that progressively reveals points, with a leading dot.
- Donut — best for showing channel mix (organic/paid/referral). Draws segments with
strokeDasharray.
Keep it to 3-5 data points max — viewers process fast. Use high-contrast colors.
Animations Toolkit
| What | How |
|---|---|
| Entrances | spring() with { damping: 15, stiffness: 300, mass: 0.4 } |
| Fade in/out | interpolate(frame, [0, 15, dur-15, dur], [0, 1, 1, 0]) with clamp |
| Slide up | interpolate(frame, [0, 20], [40, 0]) on translateY |
| Stagger | frame - i * 8 per item |
| Number counters | interpolate(frame, [0, 45], [0, targetValue]) with Easing.out(Easing.cubic) |
| Color shifts | interpolateColors(frame, [0, 60], ['#color1', '#color2']) |
No CSS transitions/animations — they won't render. Everything through interpolate() or spring().
Media / Assets
Create a public/ directory for static assets loaded via staticFile():
public/
logo.png # brand logo for intro + outro
bgm.mp3 # background music (volume 0.2-0.3, fade in/out)
product-shot.png # optional product screenshot for feature scene
- BGM: Use
<Audio>with a volume function that fades in over 15 frames and out over the last 15 frames - Images: Use
<Img>(not<img>) for deterministic loading - Video clips: If you have any, use
<OffthreadVideo>withstartFrom/endAtfor trimming
File Structure to Build
src/
Root.tsx # already done
LaunchRecap.tsx # main composition — Series of scenes + caption overlay
scenes/
TitleScene.tsx # scene 1
KPIScene.tsx # scene 2 — animated counters
ChartScene.tsx # scene 3 — bar/line chart
FeatureScene.tsx # scene 4 — feature cards
OutroScene.tsx # scene 5 — CTA
components/
CaptionOverlay.tsx # persistent caption layer
AnimatedKPI.tsx # reusable KPI counter
AnimatedBarChart.tsx
Render
The build script in package.json already has:
npm run build # renders LaunchRecap composition to MP4
npm start # Remotion Studio for preview
For explicit render control:
npx remotion render src/index.ts LaunchRecap out/launch-recap.mp4 \
--codec h264 \
--image-format jpeg \
--crf 18
- Codec:
h264for broad compatibility,h265if file size matters - CRF 18: good quality/size balance (lower = bigger/better)
- Vertical 1080x1920 is already set in the composition
Execution Order
- Create
src/LaunchRecap.tsxwith the<Series>skeleton + caption overlay - Build scene components one at a time (Title -> KPIs -> Chart -> Features -> Outro)
- Add caption data array with your actual copy
- Drop assets into
public/, wire up BGM - Preview in Studio (
npm start), tweak timing - Render (
npm run build)
Want me to start building the components?
External Tools
| Tool | Type |
|---|---|
| node | binary |
| npm | binary |
Permissions
| Scope | Description |
|---|---|
| filesystem:read | |
| filesystem:write | |
| process:spawn |
SKILL.md
Remotion - Video Creation in React
Comprehensive skill set for creating programmatic videos using Remotion, a framework for creating videos programmatically using React.
When to use
Use this skill whenever you are dealing with Remotion code to obtain domain-specific knowledge about:
- Creating video compositions with React components
- Animating elements using frame-based animations
- Working with audio, video, and image assets
- Building charts and data visualizations
- Implementing text animations and captions
- Using 3D content with Three.js
- Applying transitions and sequencing
- Integrating Tailwind CSS and Lottie animations
Core Concepts
Remotion allows you to create videos using:
- React Components: Build video content with familiar React syntax
- Frame-based Animations: All animations driven by
useCurrentFrame()hook - Compositions: Define video compositions with duration, dimensions, and props
- Assets: Import and manipulate images, videos, audio, and fonts
- Rendering: Export videos programmatically with customizable settings
Key Features
- Frame-by-frame control over animations
- Dynamic metadata calculation
- Media processing (trimming, volume, speed, pitch)
- Caption generation and display
- Data visualization with charts
- 3D content integration
- Professional text animations
- Scene transitions and sequencing
How to use
Read individual rule files for detailed explanations and code examples:
Core Animation & Timing
- references/animations.md - Fundamental animation techniques for Remotion
- references/timing.md - Interpolation curves: linear, easing, spring animations
- references/sequencing.md - Delay, trim, and limit duration of items
- references/trimming.md - Cut the beginning or end of animations
Compositions & Metadata
- references/compositions.md - Defining compositions, stills, folders, default props
- references/calculate-metadata.md - Dynamically set composition duration, dimensions, and props
Assets & Media
- references/assets.md - Importing images, videos, audio, and fonts
- references/images.md - Embedding images using the Img component
- references/videos.md - Embedding videos with trimming, volume, speed, looping, pitch
- references/audio.md - Using audio and sound with trimming, volume, speed, pitch
- references/gifs.md - Displaying GIFs synchronized with timeline
Text & Typography
- references/text-animations.md - Typography and text animation patterns
- references/measuring-text.md - Measuring text dimensions, fitting text, checking overflow
- references/fonts.md - Loading Google Fonts and local fonts
Captions & Transcription
- references/display-captions.md - Displaying captions with TikTok-style pages and word highlighting
- references/import-srt-captions.md - Importing .srt subtitle files using @remotion/captions
- references/transcribe-captions.md - Transcribing audio to generate captions
Data Visualization
- references/charts.md - Chart and data visualization patterns
Advanced Features
- references/3d.md - 3D content using Three.js and React Three Fiber
- references/lottie.md - Embedding Lottie animations
- references/transitions.md - Scene transition patterns
Styling & Layout
- references/tailwind.md - Using TailwindCSS in Remotion
- references/measuring-dom-nodes.md - Measuring DOM element dimensions
Media Processing (Mediabunny)
- references/can-decode.md - Check if a video can be decoded by the browser
- references/extract-frames.md - Extract frames from videos at specific timestamps
- references/get-audio-duration.md - Getting the duration of an audio file
- references/get-video-dimensions.md - Getting the width and height of a video file
- references/get-video-duration.md - Getting the duration of a video file
Quick Start Example
import { useCurrentFrame, useVideoConfig, interpolate } from "remotion";
export const MyComposition = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const opacity = interpolate(frame, [0, 2 * fps], [0, 1], {
extrapolateRight: 'clamp',
});
return (
<div style={{ opacity }}>
<h1>Hello Remotion!</h1>
</div>
);
};
Best Practices
- Always use
useCurrentFrame()- Drive all animations from the current frame - Avoid CSS animations - They won't render correctly in videos
- Think in seconds - Multiply time in seconds by
fpsfor frame calculations - Use interpolate for smooth animations - Built-in interpolation with easing functions
- Clamp extrapolation - Prevent values from exceeding intended ranges
- Test frequently - Preview in Remotion Studio before rendering
Resources
- Documentation: https://www.remotion.dev/docs
- Repository: https://github.com/remotion-dev/remotion
- Skills Repository: https://github.com/remotion-dev/skills
- Community: Discord and GitHub Discussions
- License: MIT
FAQ
What does remotion do?
Best practices and comprehensive guide for Remotion - programmatic video creation in React with animations, compositions, and media handling
When should I use remotion?
Use it when you need a repeatable workflow that produces text response.
What does remotion output?
In the evaluated run it produced text response.
How do I install or invoke remotion?
npx skills add https://github.com/davila7/claude-code-templates --skill remotion
Which agents does remotion support?
Claude Code
What tools, channels, or permissions does remotion need?
It uses node, npm; channels commonly include text; permissions include filesystem:read, filesystem:write, process:spawn.
Is remotion safe to install?
Static analysis marked this skill as medium risk; review side effects and permissions before enabling it.
How is remotion different from an MCP or plugin?
A skill packages instructions and workflow conventions; tools, MCP servers, and plugins are dependencies the skill may call during execution.
Does remotion outperform not using a skill?
About remotion
When to use remotion
Building programmatic videos in React with Remotion. Adding animations, captions, charts, or media sequences to a Remotion composition. Maintaining or extending an existing Remotion codebase.
When remotion is not the right choice
Working on non-Remotion video editing workflows. Needing direct publishing, hosting, or third-party media service integrations rather than local code guidance.
What it produces
Produces text response.
Install
npx skills add https://github.com/davila7/claude-code-templates --skill remotionInvoke: Ask Claude Code to use remotion for the task.