Communitygithub.com

akshayDev17/ai-视频组装器

组合视频的各个片段——无声渲染每个窗口、拼接、一次性混入旁白,并验证。属于“从课程内容生成讲解视频”流程的第8阶段。

ai-视频组装器 是什么?

这是一个用于AI代理的视频组装技能,属于“explainer-video-from-coursework”流程的第8阶段(共8阶段),是整个渲染阶段的编排器。该技能的核心作用是将已渲染的多个视频片段(每个片段从其自己的窗口和配置无声渲染)拼接成一个完整的视频文件,并精确混入旁白。它支持通过 `--only <key>` 参数对单个片段进行烟雾测试,并使用 `ffmpeg` 和 headless Chromium 运行。该技能会验证时间线窗口是否连续无间隙、每个片段是否都有 `manifest.json` 条目,以及最终音轨是否在样本级别与旁白完全匹配。支持平台包括 Cursor, Codex 和 Claude Code。通过自动化处理分割渲染、无声渲染、流水线拼接和单次旁白混入,它避免了在每次片段边界处重启音轨的问题,极大地提高了视频组装的效率和准确性。

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

在你喜欢的 AI 中提问

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

文档

craft-video-assemble — 成品视频

属于 explainer-video-from-coursework 流程的一部分 — 第 8 阶段,共 8 阶段。作为渲染阶段的编排器。

该流程的工具和场景宿主位于同级技能 explainer-video-from-coursework 中:以 node ../explainer-video-from-coursework/tools/<tool>.mjs 的方式运行,相对于本技能文件夹。从项目目录运行,因此 out/ 临时文件会位于笔记旁边。

前置条件: 脚本、out/<name>/<NN>/timeline.json、manifest.json 和 narration.wav;机器上需安装 ffmpeg 和 headless Chromium(参见 SETUP.md)。

出现 [setup] / Playwright cache not found 错误表示缺少 ffmpeg 或 Chromium — 请将相应的 SETUP.md 步骤告知用户,然后重新运行。

node ../explainer-video-from-coursework/tools/assemble.mjs --script out/<name>/scripts/<NN>-*.json \
                        --work out/<name>/<NN> --name <output> \
                        --dest <destination>

每个片段:通过其自身的宿主和配置渲染自己的窗口,无声地 — 片段故意无声,因为如果在每个片段上混入旁白,会在每个边界处重启整个音轨。然后拼接(-c copy),一次性混入单一测量旁白音轨,并验证。--only <key> 渲染单个片段,用于烟雾测试。

断言:每个片段都有一个时间线窗口 和 一个 manifest.json 条目 · 这些窗口在时间线上平铺无间隙 · 最终音轨在样本级别与旁白匹配。

完成条件: 运行退出码为 0 并打印 [done] …<output>.mp4 以及 audio ok。MP4 文件已被复制到 --dest。

维护

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

Individual skills in this repo

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

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

Render one scene config over one time window to an MP4 (or a handful of QA stills). Stage 7 of explainer-video-from-coursework — the render primitive.

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.

相关技能