remotion-best-practices

Provides domain rules and code patterns for building videos programmatically with Remotion in React.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/zamansepeti43/c-rak-agent --skill remotion-best-practices-zamansepeti43
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: remotion-best-practices
Source: https://github.com/zamansepeti43/c-rak-agent/tree/main/video-engine/.agents/skills/remotion-best-practices
Command: npx skills add https://github.com/zamansepeti43/c-rak-agent --skill remotion-best-practices-zamansepeti43

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing Remotion video code without domain knowledge leads to common failures like flickering animations, broken rendering from CSS transitions, and incorrect asset handling. This Skill supplies the correct patterns and constraints for every major Remotion feature area. ## 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: Covers importing images, videos, audio, GIFs, fonts, and Lottie files, plus trimming, volume control, and audio visualization with Mediabunny. - Captions & Subtitles: Guides transcription, SRT import, and TikTok-style caption display with word highlighting. - Use Case: When asked to build a video composition with animated captions and background music, the agent loads the relevant rule files to produce correct, render-safe Remotion code. ## Quick Start Use the remotion-best-practices skill to create a Remotion composition with a fade-in title animation and background audio.

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?

Drive all animations with the useCurrentFrame() hook combined with interpolate() or spring() from Remotion. CSS transitions, CSS animations, and Tailwind animation 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. You can transcribe audio to generate captions, import existing .srt files with parseSrt(), and display them with createTikTokStyleCaptions() for word-by-word highlighting.

How do I trim a video in Remotion?

Use the trimBefore and trimAfter props on the Video component from @remotion/media for non-destructive trimming. Alternatively, run bunx remotion ffmpeg with re-encoding to trim the file permanently and avoid frozen frames.

Can I use Three.js 3D content in 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 because it causes flickering.

Why does my Remotion animation flicker during rendering?

Flickering occurs when animations are not driven by useCurrentFrame(), such as CSS transitions, self-animating shaders, or third-party library animations. Disable library animations and compute all motion from the current frame value.

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

Use Mediabunny's Input class with UrlSource or FileSource to call computeDuration() for duration or read displayWidth and displayHeight from the primary video track. These values can feed calculateMetadata to set composition settings dynamically.