Communitygithub.com

akshayDev17/ai-视频解释器

在一个时间窗口内渲染一个场景配置并输出为 MP4(或一组 QA 静态帧)。这是 explainer-video-from-coursework 管线的第 7 阶段——渲染原语。

ai-视频解释器 是什么?

这个技能是 'explainer-video-from-coursework' 管线中的第 7 阶段(共 8 个阶段),名为 craft-video-render。它作为一个渲染原语,将单个场景配置在一个时间窗口内渲染成 MP4 视频,或者生成一组 QA 静态帧用于场景创作时调试。它依赖于 ffmpeg 和无头 Chromium 浏览器,通过 CDP 协议捕获 PNG 序列,再用 ffmpeg 编码为 H.264 视频。该技能支持通过 --shots 参数渲染特定时间点的静态帧,或用 --keep-frames 保留中间 PNG 文件。它通常由管线的 assemble 阶段驱动,但也能独立运行。主要适用于 Claude Code、Cursor、Codex 等支持 Node.js 和 CLI 工具的 AI 代理平台,适合用于自动化视频生成流程中的渲染步骤。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/akshayDev17/ai-explainer-video/tree/HEAD/skills/craft-video-render

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

craft-video-render —— 帧到 MP4

属于 explainer-video-from-coursework 管线 —— 第 7 阶段(共 8 个)。渲染 原语;组装阶段会根据每个片段驱动它。它也可以在场景创作期间单独运行以生成 QA 静态帧。

管线的工具和场景宿主位于兄弟技能 explainer-video-from-coursework 中:请运行 node ../explainer-video-from-coursework/tools/<tool>.mjs,路径相对于该技能文件夹。从项目目录运行,因此 out/ 临时文件会放在你的笔记旁边。

前置条件: 一个场景配置;对于分窗口渲染,还需要 out/<name>/<NN>/timeline.json;机器上需要安装 ffmpeg + 无头 Chromium(参见 SETUP.md)。

如果出现 [node] / [setup] / Playwright cache not found 错误,表明缺少某前置条件——请向用户提供对应的 SETUP.md 步骤,然后重新运行。

node ../explainer-video-from-coursework/tools/render.mjs --scene "src/scene-diagram.html?scene=<name>" \
                      --range <t0>,<t1> --outdir out/<name>/<NN>/parts --name part-<key>

渲染单个场景配置在一个窗口内——通过 CDP 使用无头 Chromium 捕获 PNG 序列,然后用 ffmpeg 编码为 H.264 格式。它不是整个视频的渲染器:--scene 接受单个 host?scene=<config>,因此多场景视频需要逐窗口渲染。没有 --narration 的窗口渲染出来是无声的,这符合组装阶段的要求。

--shots 6,20,34 渲染 QA 静态帧而非完整序列;--keep-frames 保留 PNG 序列。

完成条件: 运行退出码为 0 并打印 [done] …<name>.mp4。

维护

如果你修改本文件,或者用户要求更改此阶段,请告知用户主技能 explainer-video-from-coursework 的 “Stage 7 —— /render” 部分必须同步更新以保持一致,并在回复中指明该部分。

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

akshayDev17/ai-explainer-video

Assemble one video from its segments — render each window silent, concatenate, mux the narration once, and verify. Stage 8 of explainer-video-from-coursework.

akshayDev17/ai-explainer-video

Synthesize narration and build the measured timeline for one video. Stage 4 of explainer-video-from-coursework — the one-shot TTS primitive.

akshayDev17/ai-explainer-video

Retitle and curate the videos in an explainer-video plan — write enrichment.json and merge it. Stage 2 of explainer-video-from-coursework; run it alone to retitle an existing plan.

akshayDev17/ai-explainer-video

Decompose a coursework notes directory into an explainer-video plan and prove no content-bearing section is dropped. Stage 1 of explainer-video-from-coursework; run it alone to (re)plan a directory.

akshayDev17/ai-explainer-video

Generate YouTube chapters and English captions for one finished video. Stage 6 of explainer-video-from-coursework.

akshayDev17/ai-explainer-video

Author and iterate the animated visuals for one video's segments. Stage 5 of explainer-video-from-coursework; it re-invokes the audio stage when a beat needs a hold.

akshayDev17/ai-explainer-video

Write and validate the spoken narration for one explainer-video. Stage 3 of explainer-video-from-coursework; run it alone to (re)write a video's script.

akshayDev17/ai-explainer-video

Plan an explainer-video series from a directory of coursework notes — decompose into videos (proving nothing is dropped), retitle and curate, write the narration, synthesize the audio, author the visuals, then render and assemble the finished cut. Use when the user wants to turn structured coursework notes into explainer videos.

相关技能