remotion-best-practices

Provides best practices and code patterns for creating videos programmatically with Remotion in React.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/NT-boop-star/BRMV-tract --skill remotion-best-practices-nt-boop-star
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: remotion-best-practices
Source: https://github.com/NT-boop-star/BRMV-tract/tree/main/antigravity/skills/remotion
Command: npx skills add https://github.com/NT-boop-star/BRMV-tract --skill remotion-best-practices-nt-boop-star

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing Remotion video code without domain knowledge leads to common mistakes like flickering animations, unsynchronized captions, broken asset loading, and incorrect rendering. This Skill supplies the domain-specific rules and code patterns needed to write correct Remotion compositions. ## Core Features & Use Cases - Animation & Timing Rules: Enforces frame-driven animations via useCurrentFrame(), spring physics, and easing curves while forbidding CSS transitions that break rendering. - Media Handling Patterns: Covers importing images, videos, audio, GIFs, Lottie files, fonts, and 3D content with the correct Remotion components and packages. - Captions & Audio Workflows: Guides transcription with Whisper, SRT import, TikTok-style caption display, audio visualization, and sound effects. - Use Case: When asked to build a video with animated captions synced to a voiceover, load this Skill to get the correct @remotion/captions workflow, sequence timing patterns, and word-highlighting code. ## Quick Start Use the remotion-best-practices skill to create a Remotion composition with a fade-in title animation and background music.

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 Remotion without flickering?

Drive all animations with the useCurrentFrame() hook combined with interpolate() or spring() from Remotion. CSS transitions, CSS animations, and Tailwind animate classes are forbidden because they do not render correctly during video export.

How do I add captions or subtitles to a Remotion video?

Use the @remotion/captions package with the Caption type. Transcribe audio with @remotion/install-whisper-cpp, import existing .srt files with parseSrt(), then display them using createTikTokStyleCaptions() with word-level highlighting.

How do I import images and videos into a Remotion composition?

Place assets in the public/ folder and reference them with staticFile(). Use the <Img> component from remotion for images and <Video> from @remotion/media for videos, which ensure assets fully load before rendering.

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 3D animations must be driven by useCurrentFrame(); using useFrame() from @react-three/fiber is forbidden to prevent flickering.

How do I get a video's duration or dimensions in Remotion?

Use Mediabunny to extract metadata by creating an Input with UrlSource and calling computeDuration() for duration or reading displayWidth and displayHeight from the primary video track. These values can feed calculateMetadata to set composition settings dynamically.

Why does my Remotion animation look different in the rendered video?

Rendering differences usually come from CSS transitions, Tailwind animation classes, or self-animating libraries that ignore the frame timeline. Remotion renders frame-by-frame, so every visual change must derive from useCurrentFrame() to stay deterministic.