Remotion CLI
$ remotion 官方出品 中风险Remotion CLI(@remotion/cli)通过无头 Chromium 与 FFmpeg 将 React 组件渲染为 MP4、WebM、GIF 或单帧 PNG/JPEG(remotion still)。支持 --props JSON 传参、--frames 帧范围控制及 remotion compositions -q,适合无头自动化视频生产。
npm install -g @remotion/cli React 打包与多帧无头 Chromium 渲染通过 remotion render 在本地或 CI 运行更直接高效。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
具备丰富的无头参数(--props JSON、--frames、compositions -q、--log=error),但 remotion studio 为交互式服务且 compositions 缺少 --json。
- Accepts
--propsJSON and--framesslicing remotion studiostarts a blocking local web UI
输出至显式文件路径,但完整渲染会拉起 Chromium 与 FFmpeg 工作进程消耗大量 CPU/磁盘,且存在商业授权合规要求。
- Requires explicit output path; commercial licensing terms apply to >3-person companies
依赖 Node.js 项目环境(@remotion/cli)、无头 Chromium 下载与 FFmpeg。
- Depends on Node.js, Chromium, and FFmpeg binaries
将参数化 React/CSS/Canvas 动画渲染为像素精确 MP4/WebM/静帧的顶级方案。
- Supports
render,still,compositions, andlambdacloud rendering
Remotion 官方仓库(remotion-dev/remotion),更新迭代迅速且维护积极。
- First-party
remotion-dev/remotionrepository
remotion.dev/docs/cli 文档详尽,完整覆盖各子命令、参数与授权层级。
- Official CLI reference at remotion.dev/docs/cli
安全边界、鉴权与放权指南
可选通过 --license-key 或 REMOTION_LICENSE_KEY 环境变量读取 Remotion 企业授权密钥。
源码可用协议:个人、非营利组织及 3 人及以下团队免费;4 人及以上企业或自动化管线需购买商业授权。
# Remotion CLI Agent Rules - Test layouts using `remotion still --frame=<n>` or `remotion render --frames=0-29` before triggering a full multi-minute MP4 render. - Never launch `remotion studio` inside a headless agent turn—it starts a long-running interactive web server. - Verify Remotion commercial licensing (`REMOTION_LICENSE_KEY`) when rendering in companies with 4+ employees.
Agent 高频安全命令配方
只读查询(安全推荐)
npx remotion compositions -q
打包项目入口并输出空格分隔的合成 ID 列表,不渲染任何帧。
受控写入与预演
npx remotion still Main out/preview.png --frame=30 --props='{"title":"Demo"}' 传入 JSON props 并将合成 Main 的第 30 帧渲染为 out/preview.png 以便快速视觉验证。
核心优势
- +
remotion still --frame=<n>让 Agent 在导出整段视频前几秒内即可校验单帧渲染效果。 - + 原生 JSON
--props注入非常适合数据驱动的自动化视频生成管线。
注意事项与踩坑点
- ! 采用源码可用商业许可,4 人及以上公司或自动化 SaaS 场景需付费授权。
- ! 运行时依赖较重(Node.js + 无头 Chromium + FFmpeg),且
remotion studio会阻塞进程。