用途:在 React 中构建真正的 MP4/GIF/WebM 视频,是 After Effects 的代码优先替代方案,适合社交短片、标题卡、讲解视频,以及模板化/数据驱动(按用户、按记录、按 CSV/DB 行)的批量视频。
主要能力:帧驱动动画(interpolate 映射区间、spring 生成自然运动);用 Sequence 与 Series 排布时间线;Composition 注册 id、尺寸、fps、时长与 defaultProps,配合 zod schema 让 props 类型安全并可在 Studio 侧栏编辑;calculateMetadata 可按 props 计算时长;Audio 与离线检测的节拍同步;支持嵌入着色器/Three.js。
使用方式:浏览器 Studio 预览,CLI 无界面渲染。常用命令:npx remotion studio;npx remotion render Promo out/promo.mp4 --props='{"title":"Launch","accent":"#f43"}';npx remotion render Promo out.gif --codec=gif;npx remotion still Promo out/f-mid.png --frame=75。批量管线可用 @remotion/renderer 在 Node 中一次打包多次渲染。建议先渲染首/中/末帧 PNG 检查,再编码完整视频。
限制与注意:禁止 Math.random()、Date.now() 与动画计时器,需用 random(seed) 保持确定性;字体与资源用 staticFile() 加载并配合 delayRender/continueRender;interpolate 默认会外推,需 clamp;Sequence 内 useCurrentFrame 是局部时间。资料未提供收费、价格与平台支持信息。