用途:在编写或调试 Remotion 代码时提供领域知识,Remotion 用 React/TypeScript 以编程方式制作视频并渲染为 MP4。
主要能力与用法:空目录可用 npx create-video@latest --yes --blank --no-tailwind my-video 搭建项目;用 npx remotion studio 启动预览;可用 npx remotion still [composition-id] --scale=0.25 --frame=30 渲染单帧做布局检查。动画使用 useCurrentFrame() 与 interpolate(),除非需要物理运动否则优先 interpolate() 而非 spring(),用 Easing.bezier() 定制时序;为便于在 Studio 中编辑,interpolate() 应内联在 style 中并使用 scale、translate、rotate 等独立 CSS transform 属性。禁止使用 CSS transition/animation 与 Tailwind 动画类名。素材放 public/ 并用 staticFile() 引用,图片用 <Img>,视频与音频用 @remotion/media 的 <Video>、<Audio>,也支持远程 URL。用 <Sequence> 的 from 延迟、durationInFrames 限时,内联内容用 layout="none"。视频宽高、fps、时长在 src/Root.tsx 的 <Composition> 中定义,也可用 calculateMetadata 动态计算。
适用场景:视频布局与文字排版、字幕、FFmpeg 操作、静音检测、音频可视化、音效、视觉与像素特效、Three.js 3D、高级音频、动态时长与数据、Google/本地字体、GIF、Lottie、DOM 与文本测量、转场、透明视频、裁剪、参数化视频(Zod)、地图、ElevenLabs 配音等,均有对应规则文件可加载。
限制:资料未提供收费、价格、平台支持范围与效果保证等信息。