mcpField
R
remotion-best-practices

remotion-best-practices

github.com/remotion-dev创意与媒体2647 次安装3 天前更新
代码仓库

关于 remotion-best-practices

remotion-best-practices 为 Remotion 视频项目提供操作指引,涵盖新建、预览和渲染,并按任务引导加载相关指南。它强调保留用户已有修改,且默认先预览而非渲染。

主要功能

  1. 01按任务提供 Remotion 指引
  2. 02项目与合成设置
  3. 03Studio 预览流程
  4. 04渲染与故障排查指引

适用场景

  1. 01开始制作 Remotion 视频
  2. 02构建地图或多媒体合成
  3. 03导出前预览合成

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/remotion-dev/codex-plugin --skill remotion-best-practices

安装后在 Claude Code 中输入/remotion-best-practices确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

agents/
openai.yaml
assets/
remotion-icon.svg
remotion-captions/
display-captions.md
import-srt-captions.md
REFERENCE.md
transcribe-captions.md
remotion-captions/agents/
openai.yaml
remotion-captions/assets/
remotion-icon.svg
remotion-create/
REFERENCE.md
tailwind.md
video-layout.md
remotion-create/agents/
openai.yaml
remotion-create/assets/
remotion-icon.svg
remotion-docs/
REFERENCE.md
remotion-docs/agents/
openai.yaml
remotion-docs/assets/
remotion-icon.svg
remotion-interactivity/
inline-effects.md
REFERENCE.md
timeline-structure.md
remotion-interactivity/agents/
openai.yaml
remotion-interactivity/assets/
remotion-icon.svg
remotion-maps/
REFERENCE.md
remotion-maps/agents/
openai.yaml
remotion-maps/assets/
remotion-icon.svg
remotion-maps/techniques/cesium/assets/
cesium-path.json
city-path.json
flight-path.ts
sample-river.geojson
remotion-maps/techniques/cesium/references/
3d-data-sources.md
3d-flyover-architecture.md

详细介绍

保留用户更改

用户可能会在对话之外对代码进行编辑。

如果你在此期间发现意外的更改,不要覆盖它,应假定它是有意为之,或请求确认。

创建视频

如果用户要求制作、创建或构建一个新视频或合成,加载 Create a new Remotion video,无论是否已存在 Remotion 项目。

新项目设置

如果当前不存在 Remotion 项目,加载 Create a new Remotion project

React 标记最佳实践

如果你正在编写 Remotion React 标记,加载 Remotion Markup Best Practices

地图

对于静态地图、动画路线和标记、地理讲解、Mapbox、MapLibre、MapTiler、GeoJSON 或 3D 地理飞越,加载 Remotion Maps。

多媒体

对于在浏览器中完成多媒体任务,例如裁剪、剪裁视频,或从中获取元数据,加载 Remotion Multimedia

提升交互性

通过良好地组织 Remotion 标记,我们可以让用户在 Studio 中交互式地更改内容并写回代码。如果相关:Interactivity Best Practices

打开预览

如果用户要求“制作”视频、“创建”视频等。 默认不要渲染视频,除非他们非常明确。他们想要的是查看交互式预览。 一旦项目可以运行,就在构建或编辑合成之前启动 Studio 并在浏览器中打开预览。在你工作期间保持其打开,以便用户可以观看进度并进行引导。

如需默认启动预览服务器而不打开系统浏览器,请传入 --no-open:

npx remotion studio --no-open

这将启动一个长时间运行的进程,并打印预览的服务器 URL。 如果服务器已经启动,它将打印该 URL。 在 Codex 应用内浏览器中打开确切的 URL。验证 Studio 是否加载。一旦合成存在,验证其视频预览是否加载。如果应用内浏览器不可用,请保持预览服务器运行,并将 URL 提供给用户。 你可以通过导航到 /[composition-id] 访问特定合成,例如 http://localhost:3000/MapAnimation。

:::note Studio 支持 WebMCP 工具。 :::

更多选项

要在 Remotion Studio 中启动项目、打开其确切的本地 URL,或配置 Studio CLI 标志,加载 Remotion Studio。

渲染视频

仅在用户非常明确地要求时才渲染。
例如“渲染视频”、“导出”、“给我 MP4”。

预览还有一个更直观的渲染界面,因此可以考虑使用它而不是命令行来进行渲染。

npx remotion render

如需更多选项,请参阅 Rendering。

对于超出简单 npx remotion render 的高级渲染,请参阅:Rendering Best Practices

字幕

在处理字幕时,加载 Remotion Captions。

创建 SaaS、自动化或应用程序

使用 Remotion SaaS skill 了解有关 Remotion 驱动的 SaaS 应用的知识,例如 <Player>、在 Lambda、Vercel、Cloudflare 上渲染、通过 Express.js 渲染、客户端渲染,或用于查找合适的 SaaS 模板。

查阅 Remotion API 和文档

要查找并阅读当前的 Remotion 文档,加载 Remotion Docs。

升级

要升级 Remotion、相关包、兼容的 Mediabunny 包以及已安装的 Remotion Agent Skills,加载 Remotion Upgrade。

Codex 故障排除

在 Codex 中运行时,请先尝试在不打开系统浏览器的情况下启动 Remotion Studio:

npx remotion studio --no-open

仅当该方式因文件监视器限制(例如 EMFILE: too many open files, watch)而失败时,才改用轮询方式重试,并且不从 Codex 中打开浏览器:

npx remotion studio --no-open --webpack-poll 1000

如果 Studio 仍无法从 Codex 启动,请让用户从 macOS Terminal 手动启动它,然后继续使用已在运行的 Studio。从 Codex 启动 Chromium 时出现的沙箱错误,很可能是由 Codex/macOS 沙箱引起的,而不是 Remotion 项目本身的问题。

评论

支持 Markdown