When to use
Use this skill whenever you are dealing with Remotion code to obtain domain-specific knowledge for programmatic video creation.
Core Principles
Remotion allows you to create videos using React components. Key concepts:
- Compositions: Define video compositions with duration, fps, width, and height
- Frame-based Animation: Use
useCurrentFrame() and useVideoConfig() for animations
- Interpolation: Use
interpolate() for smooth transitions and animations
- Sequencing: Use
<Sequence> to control timing of components
Best Practices
Animations
- Use
interpolate() for smooth value transitions
- Leverage spring animations for natural motion
- Apply easing functions (linear, ease-in, ease-out, cubic-bezier)
- Synchronize animations with the timeline using
useCurrentFrame()
Assets
- Import images, videos, audio using ES6 imports or
staticFile()
- Use
<Img>, <Video>, and <Audio> components from Remotion
- Ensure assets are in the
public/ folder for staticFile() usage
Performance
- Optimize heavy computations with
useMemo()
- Use
delayRender() and continueRender() for async operations
- Keep component trees shallow for better rendering performance
Typography & Text
- Load fonts using
@remotion/google-fonts or local font files
- Measure text dimensions with
measureText() for dynamic layouts
- Animate text with character-by-character reveals or word highlighting
Audio
- Trim audio using
<Audio> component props
- Control volume, playback speed, and pitch
- Get audio duration with
getAudioDurationInSeconds()
Video Embedding
- Use
<OffthreadVideo> for better performance
- Trim videos with
startFrom and endAt props
- Control playback speed, volume, and looping
Common Patterns
Fade In/Out:
const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: 'clamp' });
Scale Animation:
const scale = spring({ frame, fps, config: { damping: 200 } });
Sequencing Multiple Scenes:
<Sequence from={0} durationInFrames={90}>
<Scene1 />
</Sequence>
<Sequence from={90} durationInFrames={120}>
<Scene2 />
</Sequence>
Resources
For detailed rules and examples, refer to the Remotion documentation and the remotion-dev/skills repository for comprehensive guides on:
- 3D content, charts, captions, transitions
- Lottie animations, GIFs, fonts
- Audio/video manipulation, trimming, transcription
1---2name: remotion-video3description: Best practices for Remotion - Video creation in React. Use when working with programmatic video generation, animations, compositions, and motion graphics.4---56## When to use78Use this skill whenever you are dealing with Remotion code to obtain domain-specific knowledge for programmatic video creation.910## Core Principles1112Remotion allows you to create videos using React components. Key concepts:13141. **Compositions**: Define video compositions with duration, fps, width, and height152. **Frame-based Animation**: Use `useCurrentFrame()` and `useVideoConfig()` for animations163. **Interpolation**: Use `interpolate()` for smooth transitions and animations174. **Sequencing**: Use `<Sequence>` to control timing of components1819## Best Practices2021### Animations22- Use `interpolate()` for smooth value transitions23- Leverage spring animations for natural motion24- Apply easing functions (linear, ease-in, ease-out, cubic-bezier)25- Synchronize animations with the timeline using `useCurrentFrame()`2627### Assets28- Import images, videos, audio using ES6 imports or `staticFile()`29- Use `<Img>`, `<Video>`, and `<Audio>` components from Remotion30- Ensure assets are in the `public/` folder for `staticFile()` usage3132### Performance33- Optimize heavy computations with `useMemo()`34- Use `delayRender()` and `continueRender()` for async operations35- Keep component trees shallow for better rendering performance3637### Typography & Text38- Load fonts using `@remotion/google-fonts` or local font files39- Measure text dimensions with `measureText()` for dynamic layouts40- Animate text with character-by-character reveals or word highlighting4142### Audio43- Trim audio using `<Audio>` component props44- Control volume, playback speed, and pitch45- Get audio duration with `getAudioDurationInSeconds()`4647### Video Embedding48- Use `<OffthreadVideo>` for better performance49- Trim videos with `startFrom` and `endAt` props50- Control playback speed, volume, and looping5152## Common Patterns5354**Fade In/Out**:55```javascript56const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: 'clamp' });57```5859**Scale Animation**:60```javascript61const scale = spring({ frame, fps, config: { damping: 200 } });62```6364**Sequencing Multiple Scenes**:65```javascript66<Sequence from={0} durationInFrames={90}>67 <Scene1 />68</Sequence>69<Sequence from={90} durationInFrames={120}>70 <Scene2 />71</Sequence>72```7374## Resources7576For detailed rules and examples, refer to the Remotion documentation and the remotion-dev/skills repository for comprehensive guides on:77- 3D content, charts, captions, transitions78- Lottie animations, GIFs, fonts79- Audio/video manipulation, trimming, transcription