Communitygithub.com

edit-video:口播原片直出 YouTube 成片

把口播原始素材剪成 YouTube 16:9 與 Instagram 9:16 成片的 Agent 技能:轉寫、精剪、動態圖形、B-roll、音效、可選配樂、逐字字幕、-14 LUFS 母帶與成片校驗。支援英語、印地語、泰盧固語及混說。

edit-video:口播原片直出 YouTube 成片 是什麼?

YouTube 單集配方第 1 步(剪輯),來自 SrigadaAkshayKumar/ai-video-editor(2026-10-09 發布;README 附成片 16:9 聯絡表,並介紹每天在 GitHub Actions 上自動執行的無臉頻道流程)。把原片放進 inbox/talking/,說一句「剪 video-1,節奏快一點」即可。Agent 會把你的風格描述轉成參數,轉寫(英語用 Whisper,泰盧固語/印地語用 ElevenLabs),精剪掉重講、口誤與空白,寫視覺規劃(6 種畫面配置、28 種動態圖形與 B-roll),以 Remotion 算圖,HyperFrames 做逐字字幕,ffmpeg 混音效與可選 CC0 配樂,母帶 -14 LUFS,最後校驗長度、響度、凍格與每個剪接點。所有決定都存在 JSON 檔裡,任何一步都能單獨重做。它會回報剪掉了什麼、為什麼,並坦白自己聽不到混音。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SrigadaAkshayKumar/ai-video-editor/tree/HEAD/.claude/skills/edit-video

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

edit-video — 說話人頭 → final-16x9.mp4 + final-9x16.mp4

你是剪輯師。tools/ 中的工具負責機械性工作;你做出每一個編輯決策,並將其記錄在檔案中 (work/edl.json、work/visual-plan.json、work/audio-plan.json),以便任何階段都可以重做。每個工作階段請閱讀一次 docs/lessons.md — 那裡的每一條規則都是用曾經的渲染失敗換來的。

架構(為什麼長這樣)

raw ─ transcribe ─ cut ─┬─ work/cleancut.mp4 ──────────────┐
                        │                                    │ (對話)
       visual-plan.json ┴─ Remotion `Doc` (靜音) ×2 格式 │
                             └─ HyperFrames 字幕處理 ×2 │
       audio-plan.json ─────────────── tools/mix.mjs ◄───────┘ → work/mix.wav (一次性)
                                                     finalize:影片 + -14 LUFS 主音軌 + 片頭/片尾
  • Remotion 繪製整個畫面:a-roll 使用六種舞台佈局之一(全螢幕 / 左側停靠 / 右側停靠 / 條帶 / 角落 / 佔據)、28 種動態圖形類型、b-roll 切換鏡頭、攝影機運鏡、章節軌。
  • HyperFrames 僅繪製單詞級別的字幕(瀏覽器排版可正確渲染泰盧固語/天城體)。
  • ffmpeg 處理所有音訊:任何渲染中均無 <audio> 標籤——在此儲存庫繼承的模板中,嵌入音訊會重複導致對話損壞。
  • 兩種格式共用一個乾淨剪輯的時間線、一個視覺計畫和一個混音。

階段

#階段工具技能 / 備註
0接收`npm run new -- --brief "…" [--lang tehi
1轉錄npm run transcribe -- <p>英語 → whisper (免費) · 泰盧固語/印地語 → ElevenLabs
2乾淨剪輯npm run cut -- <p> [--dry-run]clean-cut 技能。最重要的階段。
3視覺計畫撰寫 work/visual-plan.json;npm run visuals -- <p> --check;--stills t1,t2motion-graphics 技能
4B-roll`npm run broll -- searchget`
5渲染畫面npm run visuals -- <p>每分鐘影片每種格式約需 1-2 分鐘
6字幕npm run scaffold -- <p> (+ npm run captions -- <p> --style …)captions 技能
7音訊計畫撰寫 work/audio-plan.json;npm run sfx -- list;`npm run bgm -- searchget;npm run mix -- `
8最終化npm run finalize -- <p>lint、渲染、主音軌、片頭/片尾、output/credits.md
9驗證npm run verify -- <p> → 閱讀兩個 work/verify-*/sheet.jpg永遠不要跳過
10封裝youtube-metadata、youtube-thumbnail 技能在最後提供

npm run status 顯示進度。重新剪輯後:node tools/retime.mjs <p> 會將兩個計畫套用到新的時間線上(舊乾淨→原始→新乾淨),並列出任何被剪掉的片段。

執行方式

  1. 接收。 使用者將片段放入 inbox/talking/,並在提示中命名它("edit video-1 …",可能寫成 "/video-1" — 移除斜線)。npm run inbox 列出等待中的項目。 npm run new -- video-1 --brief "<使用者的風格文字,逐字>") (+ 如果他們提到語言就加上 --lang,如果是名稱/品牌則加上 --keyterms)。提示中的風格指示就是簡報 — 在規劃之前將其映射到設定(參見「風格簡報 → 設定」)。不要詢問提示已經回答的內容。 品牌/頻道:預設無 — 此儲存庫為許多客戶剪輯。只有當使用者說出這是誰的影片時,才載入 config/brands/<slug>.json(或根據他們提供的資訊建立),並傳遞 --brand,如果他們要求片頭/片尾,則加上從 inbox/brand/ 取得的 --intro/--outro 片段。
  2. 轉錄,然後完整閱讀 work/transcript.md。檢查標頭的 engine 和 language。
  3. 乾淨剪輯 — 嚴格遵循 clean-cut,包括邊界稽核和脆弱單詞輸出。
  4. 從 work/cleancut.transcript.md(乾淨剪輯時間)規劃視覺效果。 撰寫計畫,--check 它(它會驗證每個元件的必填欄位 — 這是模板中 #1 的無聲缺陷),修正,然後在 6-10 個感興趣的時間點渲染 --stills,並在兩種格式中閱讀它們,然後再進行完整渲染。 構圖:如果說話者在 9:16 中偏離中心,設定 "framing": {"9:16": "40% 45%"}。
  5. 渲染畫面、建立字幕框架、規劃音訊 和 混音、最終化、驗證。
  6. 報告:兩個輸出路徑;原始 → 乾淨剪輯的持續時間以及被剪掉的內容(按原因分類);疊加層/b-roll/SFX 數量;使用的音樂;任何脆弱或不確定的部分;必須放在描述中的致謝;並明確說明你無法聽到混音 — 請使用者聆聽接合處、背景音樂電平和閃避效果。 提供 /youtube-metadata 和 /youtube-thumbnail。

風格簡報 → 設定

將使用者的話語轉化為具體選擇,並在規劃前用一行說明:

使用者說設定為
快速 / 充滿活力 / Reels / 衝擊感keepPauseMax 0.25,字幕 pop 2-3 個單詞,每 2-4 秒一個節拍,攝影機推鏡,結構性次頻帶 SFX
平靜 / 專業 / 紀錄片 / 長片keepPauseMax 0.4-0.5,字幕 clean 4-6 個單詞,每 6-10 秒一個節拍,較少 SFX,柔和背景音樂
極簡 / 乾淨 / 不花俏少量疊加層(僅在有用處時加上文字標記),無跑馬燈/故障效果,clean 字幕或無字幕
大膽 / 高級 / 新聞 / 評論--style broadcast,高對比度強調色
說故事 / 情感karaoke 字幕,piano/cinematic 背景音樂,在關鍵台詞處留音樂空白
"不要音樂" / "不要音效" / "不要字幕" / "不要 b-roll"完全遵從;跳過該階段
(未提及音樂)無 BGM — 使用者在提示開始時會說明是否要添加音樂;預設為無。添加時:僅限 CC0(--cc0),且 SFX 必須在其上保持清晰可聞
一種顏色("用黃色"、一個十六進位碼)字幕 --accent,疊加層 section 強調色/品牌色

簡報中的任何異常都會覆蓋這些預設值。將簡報保留在 project.json.brief 中,以便後續重新剪輯遵循相同的風格。

審查關卡

預設:直接執行並報告。如果使用者要求檢查點(或 project.json.review 是 "stages"),則在乾淨剪輯後、視覺計畫後(顯示靜止幀)以及音訊計畫後停止。請求的更改是該階段的新標準 — 修改並重新展示同一階段。

規則

  • 所有計畫時間基於 乾淨剪輯時間線;EDL 時間基於 原始。
  • 疊加文字預設為簡短英語(原生文字位於字幕中),除非簡報另有說明。
  • 永遠不要手動編輯生成的檔案(compositions/captions.html、work/props-*.json) — 重新生成。
  • .env 中的金鑰:ELEVENLABS_API_KEY(泰盧固語/印地語),PEXELS_API_KEY 或 PIXABAY_API_KEY(b-roll)。 缺少任何一個 → 停止並明確指出是哪一個,以及它應該放在 C:\AI-edits\.env。
  • Windows:使用 Write 工具撰寫 JSON(PowerShell 會搞亂內聯 JSON;Out-File/Set-Content 會加入 BOM — 工具在 JSON 中可以容忍,但永遠不要以這種方式撰寫程式碼檔案)。
  • 一旦使用者確認最終版本,進行清理:render/、work/visuals-*.mp4、work/captioned-*、work/stills-*、work/verify-* 都是可重新生成的。保留 output/、work/*.json、assets/。

Individual skills in this repo

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

SrigadaAkshayKumar/ai-video-editor

Turn a finished AI-edits video (projects/<p>, or several parts of one long video) into YouTube Shorts. Reuses the edit's word timestamps, reads the whole transcript, picks self-contained dialog moments, adds text hooks + comment prompts, renders 9:16 clips with Remotion. Use when the user asks to clip/make shorts from an edited project or a long video.

SrigadaAkshayKumar/ai-video-editor

Choose, fetch and place background music for an edit — Openverse search (commercial-use CC, or CC0-only), music_cues in work/audio-plan.json with fades, offsets and a deliberate silence gap; tools/mix.mjs conditions every bed, sets it to one measured house level under the voice and sidechain-ducks it. Use when adding, swapping or re-levelling music.

SrigadaAkshayKumar/ai-video-editor

Generate and style word-synced captions (Telugu, Hindi, English, code-mixed) as the HyperFrames captions pass over each format's Remotion picture, fix caption text, black captions out under on-screen text, and check caption content at every cut join. Use when creating, restyling, correcting or repositioning captions in any edit.

SrigadaAkshayKumar/ai-video-editor

Editorial rules for turning a raw talking video or voiceover into a clean cut — removing retakes, repetitions, false starts, stutters, fillers, mispronounced words, contradictions/inconsistencies, off-script chatter and dead air — by writing work/edl.json for tools/cut.mjs. Telugu, Hindi, English and code-mixed speech. Use for stage 2 of edit-video or whenever the user asks to tighten/re-cut a video.

SrigadaAkshayKumar/ai-video-editor

Turns a bare voiceover (no presenter on camera) into a finished faceless documentary/explainer for YouTube 16:9 and Instagram 9:16 — clean-cuts the narration, DIRECTS it (story spine, tension curve, hooks, involvement beats), researches the claims and screenshots the real sources, plans a scene track (stock b-roll, stills, news screenshots, pure-graphic beats) with motion graphics, designs music + SFX, renders, captions and credits it. Use when the user gives a voiceover/narration file (or says "faceless video", "make a video from this VO", "documentary").

SrigadaAkshayKumar/ai-video-editor

Plan the picture of an edit in work/visual-plan.json — motion graphics (28 component types across six stage layouts that dock/shrink/dim the video), b-roll cutaways from Pexels/Pixabay, camera moves, a-roll framing for 9:16 — validate it, QA it with stills in both formats, and render it with Remotion. Use for any titles, charts, stats, lower thirds, diagrams, b-roll or zooms in a talking-head or faceless edit.

SrigadaAkshayKumar/ai-video-editor

Design the sound effects of an edit in work/audio-plan.json sfx_events — which effect, where, how often — using the measured SFX library (repo assets/sfx, HyperFrames' bundled set, CC0 fetches from Openverse) and the spectral rule that sub-band cues carry structure while vocal-band cues are rationed. Mixed and levelled by tools/mix.mjs. Use when adding or adjusting SFX in any edit.

SrigadaAkshayKumar/ai-video-editor

Write the upload package for a video this repo edited — YouTube title options, description with chapters, tags, pinned comment, thumbnail text, and the Instagram Reels caption + hashtags for the 9:16 cut — optimised for whichever channel/client the user says it is for (config/brands/ profiles, only when named). Use when the user asks what to title a video, for a description, tags, chapters, "the YouTube metadata", an Instagram caption, or SEO/CTR advice on a finished render.

SrigadaAkshayKumar/ai-video-editor

Design and build a high-CTR thumbnail for a video this repo edited — hook selection, the real face frame pulled from the footage, background cut-out, type set with real fonts (Telugu/Devanagari included), the YouTube 1280x720 thumbnail and the Instagram 1080x1920 cover, an optional image-generation prompt for the background layer, and a feed-size legibility check. Use when the user asks for a thumbnail, thumbnail ideas, a cover image, or how to make the thumbnail more clickable.

相關技能