
Remotion Video
Ship MP4 tutorials, data-driven recap videos, and branded motion clips from React instead of manual timeline editing.
Overview
Remotion Video is an agent skill most often used in Build (also Launch distribution and Grow content) that teaches React-based programmatic video creation with Remotion.
Install
npx skills add https://github.com/wshuyi/remotion-video-skill --skill remotion-videoWhat is this skill?
- Covers five core APIs: Composition, useCurrentFrame, interpolate, spring, and Sequence on the timeline
- Supports batch generation, data-driven annual summaries, music visualization, and auto captions
- Tutorial and 3D paths: concept explainers, layered lessons, product showcase, logo motion, and 3D data viz
- Scaffold via npx create-video@latest and preview in Remotion Studio with npm run dev
- Standard project layout: Root.tsx compositions, public assets, remotion.config.ts
- 5 core Remotion concepts documented
- 11 numbered use-case scenarios in SKILL.md
Adoption & trust: 758 installs on skills.sh; 265 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need repeatable, data-driven MP4s and explainers but manual editing does not scale with your product or metrics.
Who is it for?
Indie builders who already use React and want coded promos, tutorials, or personalized recap videos on a schedule.
Skip if: One-off live-action edits, heavy VFX outside React, or teams that refuse a Node/React render pipeline.
When should I use this skill?
用代码做视频 / 编程视频 / React 视频 / Remotion / /remotion-video
What do I get? / Deliverables
You get a Remotion project pattern—compositions, timed sequences, and render workflow—so agents can generate and batch-export branded videos from code.
- Remotion project scaffold
- Composition components
- Rendered MP4 exports
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Remotion is where solo builders implement programmatic video as React compositions before export. Video scenes are React components using frames, sequences, and interpolate—same stack as product UI work.
Where it fits
Scaffold a Remotion composition that animates product UI for an onboarding clip.
Prototype a 30-second concept explainer to test messaging before a full marketing shoot.
Render variant hero videos for each ICP segment from the same React template.
Auto-generate weekly metric recap videos from API-fed JSON into Remotion scenes.
How it compares
Use for programmatic React video pipelines instead of one-off screen recordings or generic FFmpeg-only scripts without a preview studio.
Common Questions / FAQ
Who is remotion-video for?
Solo and indie builders shipping content, SaaS demos, or data stories who want MP4s defined as React components and rendered in batch.
When should I use remotion-video?
During Build when implementing motion assets; at Launch when producing distribution-ready explainers; at Grow when refreshing lifecycle or social clips from live data.
Is remotion-video safe to install?
Review the Security Audits panel on this Prism page and inspect the skill source before letting an agent run npx or npm commands in your repo.
SKILL.md
READMESKILL.md - Remotion Video
# Remotion Video 用 React 以编程方式创建 MP4 视频的框架。 ## 核心概念 1. **Composition** - 视频的定义(尺寸、帧率、时长) 2. **useCurrentFrame()** - 获取当前帧号,驱动动画 3. **interpolate()** - 将帧号映射到任意值(位置、透明度等) 4. **spring()** - 物理动画效果 5. **<Sequence>** - 时间轴上排列组件 ## 快速开始 ### 创建新项目 ```bash npx create-video@latest ``` 选择模板后: ```bash cd <project-name> npm run dev # 启动 Remotion Studio 预览 ``` ### 项目结构 ``` my-video/ ├── src/ │ ├── Root.tsx # 注册所有 Composition │ ├── HelloWorld.tsx # 视频组件 │ └── index.ts # 入口 ├── public/ # 静态资源(音频、图片) ├── remotion.config.ts # 配置文件 └── package.json ``` ## 基础组件示例 ### 最小视频组件 ```tsx import { AbsoluteFill, useCurrentFrame, useVideoConfig } from "remotion"; export const MyVideo = () => { const frame = useCurrentFrame(); const { fps, durationInFrames } = useVideoConfig(); return ( <AbsoluteFill style={{ backgroundColor: "white", justifyContent: "center", alignItems: "center" }}> <h1 style={{ fontSize: 100 }}>Frame {frame}</h1> </AbsoluteFill> ); }; ``` ### 注册 Composition ```tsx // Root.tsx import { Composition } from "remotion"; import { MyVideo } from "./MyVideo"; export const RemotionRoot = () => { return ( <Composition id="MyVideo" component={MyVideo} durationInFrames={150} // 5秒 @ 30fps fps={30} width={1920} height={1080} /> ); }; ``` ## 动画技巧 ### interpolate - 值映射 ```tsx import { interpolate, useCurrentFrame } from "remotion"; const frame = useCurrentFrame(); // 0-30帧:透明度 0→1 const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: "clamp", // 超出范围时钳制 }); // 位移动画 const translateY = interpolate(frame, [0, 30], [50, 0]); ``` ### spring - 物理动画 ```tsx import { spring, useCurrentFrame, useVideoConfig } from "remotion"; const frame = useCurrentFrame(); const { fps } = useVideoConfig(); const scale = spring({ frame, fps, config: { damping: 10, stiffness: 100 }, }); ``` ### Sequence - 时间编排 ```tsx import { Sequence } from "remotion"; <> <Sequence from={0} durationInFrames={60}> <Intro /> </Sequence> <Sequence from={60} durationInFrames={90}> <MainContent /> </Sequence> <Sequence from={150}> <Outro /> </Sequence> </> ``` ## AI 语音解说集成 为视频添加 AI 语音解说,实现音视频同步。支持两种方案: | 方案 | 优点 | 缺点 | 硬件要求 | 推荐度 | |------|------|------|----------|--------| | **MiniMax TTS** | 云端克隆、速度极快(<3秒)、音质优秀 | 按字符计费 | 无 | ⭐⭐⭐ 首选 | | **Edge TTS** | 零配置、免费 | 固定音色、无法自定义 | 无 | ⭐⭐ | ### 方案选择流程 ``` 1. 首选 MiniMax TTS - 检测 API Key 是否配置 - 测试调用是否正常(余额充足) - 如果成功 → 使用 MiniMax 2. MiniMax 不可用时 → 退回 Edge TTS(使用预设音色 zh-CN-YunyangNeural) ``` --- ## 方案一:MiniMax TTS(推荐) 云端 API 方案,无需本地 GPU,生成速度极快,音色克隆效果优秀。 ### 配置 1. 注册 https://www.minimax.io (国际版)或 https://platform.minimaxi.com (国内版) 2. 获取 API Key 3. 在 MiniMax Audio 上传音频克隆音色,获取 voice_id ### API 差异 | 版本 | API 域名 | 说明 | |------|----------|------| | 国际版 | `api.minimax.io` | 推荐,稳定 | | 国内版 | `api.minimaxi.com` | 需国内账号 | **⚠️ 常见错误**:`api.minimax.chat` 是**错误的域名**,会返回 "invalid api key"。请确认使用上表中的正确域名。 ### 生成脚本 使用 `scripts/generate_audio_minimax.py` 生成音频,支持: - **断点续作**:已存在的音频文件自动跳过 - **实时进度**:显示生成进度,避免茫然等待 - **自动更新配置**:生成完成后自动更新 Remotion 的场景配置 ```bash # 设置环境变量 export MINIMAX_API_KEY="your_api_key" export MINIMAX_VOICE_ID="your_voice_id" # 运行脚本 python scripts/generate_audio_minimax.py ``` ### 价格参考(2025年) | 模型 | 价格 | |------|------| | speech-02-hd | ¥0.1/千字符 | | speech-02-turbo | ¥0.05/千字符 | ### ⚠️ MiniMax TTS 踩坑经验 | 问题 | 原因 | 解决方案 | |------|------|----------| | `invalid api key` | 使用了错误的 API 域名 | 国际版用 `api.minimax.io`,国内版用 `api.minimaxi.com` | | config.ts 语法错误 `Syntax