Communitygithub.com

akshayDev17/ai-explainer-video

將單一場景設定在指定時間視窗內渲染為 MP4 影片(或輸出幾張 QA 靜態圖)。是 explainer-video-from-coursework 管線的第 7 階段——渲染基本單元。

ai-explainer-video 是什麼?

此技能是 `explainer-video-from-coursework` 管線中的最後渲染步驟(第 7 階段),負責將單一場景設定在特定時間視窗內渲染為 H.264 編碼的 MP4 檔案。它透過無頭 Chromium (CDP) 擷取 PNG 序列,再經由 ffmpeg 組合為影片。支援平台為 Node.js 環境,需安裝 ffmpeg 與無頭 Chromium(詳見 `SETUP.md`)。開發者可以指定 `--scene` 參數傳入單一場景 HTML 主機,並使用 `--range` 定義時間範圍;若需 QA 靜態圖,可改用 `--shots` 參數。渲染完成的標誌為退出碼 0 並輸出 `[done] …<name>.mp4`。此技能並非一次性渲染整部影片,而是每個場景視窗逐一渲染,組裝階段再合併為最終影片。

相容平台~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 技能中的 「第 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.

相關技能