remotion-video▌
wshuyi/remotion-video-skill · updated Apr 25, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Programmatic video creation with React components, animations, and audio synchronization.
- ›Compose videos using React components with frame-based animation via useCurrentFrame() and interpolate() for precise timing and motion control
- ›Supports audio integration (MiniMax TTS for voice cloning, Edge TTS for free synthesis) with automatic scene synchronization via audioConfig.ts
- ›Includes 3D video capabilities via React Three Fiber for product demos, character animation, and data visualiza
Remotion Video
用 React 以编程方式创建 MP4 视频的框架。
核心概念
- Composition - 视频的定义(尺寸、帧率、时长)
- useCurrentFrame() - 获取当前帧号,驱动动画
- interpolate() - 将帧号映射到任意值(位置、透明度等)
- spring() - 物理动画效果
- - 时间轴上排列组件
快速开始
创建新项目
npx create-video@latest
选择模板后:
cd <project-name>
npm run dev # 启动 Remotion Studio 预览
项目结构
my-video/
├── src/
│ ├── Root.tsx # 注册所有 Composition
│ ├── HelloWorld.tsx # 视频组件
│ └── index.ts # 入口
├── public/ # 静态资源(音频、图片)
├── remotion.config.ts # 配置文件
└── package.json
基础组件示例
最小视频组件
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
// 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 - 值映射
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 - 物理动画
import { spring, useCurrentFrame, useVideoConfig } from "remotion";
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const scale = spring({
frame,
fps,
config: { damping: 10, stiffness: 100 },
});
Sequence - 时间编排
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,生成速度极快,音色克隆效果优秀。
配置
- 注册 https://www.minimax.io (国际版)或 https://platform.minimaxi.com (国内版)
- 获取 API Key
- 在 MiniMax Audio 上传音频克隆音色,获取 voice_id
API 差异
| 版本 | API 域名 | 说明 |
|---|---|---|
| 国际版 | api.minimax.io |
推荐,稳定 |
| 国内版 | api.minimaxi.com |
需国内账号 |
⚠️ 常见错误:api.minimax.chat 是错误的域名,会返回 "invalid api key"。请确认使用上表中的正确域名。
生成脚本
使用 scripts/generate_audio_minimax.py 生成音频,支持:
- 断点续作:已存在的音频文件自动跳过
- 实时进度:显示生成进度,避免茫然等待
- 自动更新配置:生成完成后自动更新 Remotion 的场景配置
# 设置环境变量
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 error "n" |
Python 脚本在 f-string 中用 ",\\n".join() 产生了字面量 \n 而非真正换行 |
见下方「Python 生成 TypeScript 注意事项」 |
| 长时间无进度显示 | 后台执行命令看不到输出 | 前台执行脚本,或用 tail -f 实时查看日志 |
Python 生成 TypeScript 注意事项
❌ 错误写法:在 f-string 中使用 \n 会产生字面量字符
# 这会在生成的文件中写入字面的 \n 字符串,而非换行!
content = f'export const SCENES = [How to use remotion-video on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add remotion-video
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches remotion-video from GitHub repository wshuyi/remotion-video-skill and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate remotion-video. Access the skill through slash commands (e.g., /remotion-video) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.7★★★★★56 reviews- ★★★★★Kwame Jain· Dec 28, 2024
I recommend remotion-video for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Luis Brown· Dec 20, 2024
remotion-video reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Soo Huang· Dec 20, 2024
Registry listing for remotion-video matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Dhruvi Jain· Dec 16, 2024
Registry listing for remotion-video matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Lucas Anderson· Dec 12, 2024
Solid pick for teams standardizing on skills: remotion-video is focused, and the summary matches what you get after install.
- ★★★★★Dev Bansal· Nov 19, 2024
Keeps context tight: remotion-video is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Mia Khan· Nov 15, 2024
Useful defaults in remotion-video — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Kwame Kapoor· Nov 11, 2024
Registry listing for remotion-video matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Dev Iyer· Nov 11, 2024
remotion-video reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Oshnikdeep· Nov 7, 2024
remotion-video reduced setup friction for our internal harness; good balance of opinion and flexibility.
showing 1-10 of 56