remotion-best-practices

Guides creation of programmatic videos in React using Remotion APIs and patterns.

3.3k|126|Updated Mar 18, 2022
One-click install
npx skills add https://github.com/haydenbleasel/ultracite --skill remotion-best-practices-haydenbleasel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: remotion-best-practices
Source: https://github.com/haydenbleasel/ultracite/tree/main/packages/video/.agents/skills/remotion-best-practices
Command: npx skills add https://github.com/haydenbleasel/ultracite --skill remotion-best-practices-haydenbleasel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing videos as React code with Remotion requires frame-accurate animation, correct asset handling, and knowledge of many specialized APIs; this Skill supplies the domain-specific rules and code patterns so generated Remotion code renders correctly. ## Core Features & Use Cases - Animation & Timing Patterns: Enforces useCurrentFrame() and interpolate() driven animation, forbids CSS transitions, and covers sequencing, transitions, and trimming. - Media & Asset Handling: Covers images, videos, audio, GIFs, Lottie, fonts, captions, and 3D content via dedicated rule files loaded on demand. - Dynamic Compositions: Explains calculateMetadata, Zod-parameterized compositions, and media duration/dimension probing with Mediabunny. - Use Case: Ask the assistant to build a captioned promotional video with an animated title, background music, and a light-leak transition, and it scaffolds a Remotion project and writes correct composition code. ## Quick Start Ask the assistant to create a new Remotion video project with an animated title scene and preview it in Remotion Studio.

Frequently Asked Questions about remotion-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I animate elements in a Remotion video?▼

Animate with useCurrentFrame() and interpolate(), optionally with Easing.bezier() for custom timing. CSS transitions and Tailwind animation classes are forbidden because they do not render correctly in Remotion's frame-based rendering.

How do I add images, video, and audio to a Remotion composition?▼

Place assets in the public/ folder and reference them with staticFile(). Use the Img component for images, and the Video and Audio components from @remotion/media for media files; remote URLs are also supported.

Can I use Three.js 3D content inside Remotion?▼

Yes, install @remotion/three and wrap 3D content in ThreeCanvas with explicit width and height. All animation must be driven by useCurrentFrame(); useFrame() from @react-three/fiber is forbidden to avoid flickering during renders.

How do I make a Remotion composition duration dynamic?▼

Pass a calculateMetadata function to the Composition that returns durationInFrames, width, height, or transformed props. It can fetch data or probe media files with Mediabunny to compute values before rendering.

Why do CSS animations not work in Remotion renders?▼

Remotion renders each frame deterministically, so time-based CSS transitions and animations do not advance per frame and produce incorrect output. All motion must be computed from useCurrentFrame() so every frame is reproducible.