Remotion Rule: Videos
Remotion skill rule: Embedding videos in Remotion - trimming, volume, speed, looping, pitch. Part of the official Remotion Agent Skill for programmatic video in React.
Agent 可直接安装
这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。
npx -y tokrepo@latest install 3260bbfa-8ec9-463a-9cba-3e03f8862984 --target codex先 dry-run 确认安装计划,再运行此命令。
What it is
The Remotion Videos rule is part of the official Remotion Agent Skill that teaches AI coding agents how to embed and manipulate video clips inside Remotion compositions. It covers trimming start and end frames, adjusting volume, changing playback speed, enabling loops, and shifting pitch.
This rule targets developers and AI agents building programmatic videos in React with Remotion. If you use Claude Code or another AI assistant to generate Remotion projects, this rule ensures the agent produces correct video embedding code on the first try.
How it saves time or tokens
Without this rule, an AI agent guesses at Remotion's video API and often produces incorrect prop names or missing imports. The rule preloads the correct patterns so the agent generates working code in one shot, saving iteration cycles and token spend. The rule is estimated at around 500 tokens to install.
How to use
- Install the Remotion skills pack:
npx skills add remotion-dev/skills
- The Videos rule activates automatically when the agent detects video embedding tasks in a Remotion project.
- Write a prompt like 'Add a background video trimmed to 3 seconds with 50% volume' and the agent applies the correct Remotion API.
Example
import { Video, staticFile } from 'remotion';
export const MyComp: React.FC = () => {
return (
<Video
src={staticFile('background.mp4')}
startFrom={30}
endAt={120}
volume={0.5}
playbackRate={1.2}
loop
/>
);
};
Related on TokRepo
- Featured workflows — Browse curated AI workflows and skills
- AI tools for coding — Developer-focused AI tools and agent skills
Common pitfalls
- Forgetting that
startFromandendAtuse frame numbers, not seconds. Multiply seconds by fps to get the right value. - Setting
volumeabove 1.0 causes clipping in most browsers. Stick to the 0-1 range. - Using
loopon very long clips without settingendAtleads to unexpectedly long compositions that break rendering.
常见问题
It covers embedding video files in Remotion compositions with controls for trimming (startFrom/endAt), volume, playback speed (playbackRate), looping, and pitch shifting. The rule is part of the official Remotion Agent Skill pack.
Run 'npx skills add remotion-dev/skills' in your project. The Videos rule activates automatically when the AI agent detects a video embedding task inside a Remotion project. No manual configuration is needed beyond the install command.
Yes. The Remotion Agent Skill is designed for AI coding agents including Claude Code. Once installed, Claude Code reads the rule and applies the correct Remotion video API patterns without extra prompting.
Yes. Use the startFrom and endAt props with frame numbers. For example, at 30 fps, to start at 1 second and end at 4 seconds, set startFrom={30} and endAt={120}. The rule teaches the agent this conversion automatically.
Remotion supports MP4 (H.264), WebM, and MOV files. MP4 with H.264 encoding is the most reliable across browsers and rendering targets. Place video files in the public folder and reference them with staticFile().
引用来源 (3)
- Remotion Skills GitHub— Remotion Agent Skill is the official skill pack by remotion-dev
- Remotion Docs— Remotion Video component API with startFrom, endAt, volume, playbackRate props
- Remotion staticFile Docs— staticFile() helper loads assets from the public directory
来源与感谢
Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule:
videos
Part of the Remotion AI Skill collection on TokRepo.
讨论
相关资产
Remotion Rule: Assets
Remotion skill rule: Importing images, videos, audio, and fonts into Remotion. Part of the official Remotion Agent Skill for programmatic video in React.
Remotion Rule: Extract Frames
Remotion skill rule: Extract frames from videos at specific timestamps using Mediabunny. Part of the official Remotion Agent Skill for programmatic video in React.
Remotion Rule: Trimming
Remotion skill rule: Trimming patterns for Remotion - cut the beginning or end of animations. Part of the official Remotion Agent Skill for programmatic video in React.
Remotion Rule: Lottie
Remotion skill rule: Embedding Lottie animations in Remotion.. Part of the official Remotion Agent Skill for programmatic video in React.