Communitygithub.com

SrigadaAkshayKumar/ai-video-editor

生成並為字幕(泰盧固語、印地語、英語、混合代碼)添加樣式,使字幕與話語同步,並支援修改、黑底遮罩以及剪輯銜接檢查。

ai-video-editor 是什麼?

這個技能是專為影片編輯而設計的字幕自動化工具,能夠根據清理過的語音辨識結果(work/cleancut.words.json)生成高度可自訂的同步字幕,並支援多種語言(泰盧固語、印地語、英語、混合代碼)與平台格式(16:9、9:16)。使用者可以透過命令列參數選擇三種視覺風格(pop、clean、karaoke)、調整每組顯示的字數、字幕垂直位置、強調色以及是否強制大寫,所有設定會自動儲存在 project.json 中,方便後續重新套用。此外,技能還提供文字修正機制(透過修正 work/edl.json 中的原始文字 ID 而非手動編輯 HTML),以及利用 caption_blackouts 區段來遮罩已顯示在畫面上的字幕(例如全螢幕引文),避免重疊。最後,verify 指令會在每個剪輯接縫處抓取影格,確保每個字幕組都是單一句子的片段,不會因為剪接而產生文法錯誤。支援的主要平台包括 Remotion(用於生成最終影片)、以及常見的短影片格式如 Instagram Reels 和 YouTube Shorts。

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

在你喜歡的 AI 中提問

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

說明文件

captions

npm run captions -- <p> [--format 9:16] [--style pop|clean|karaoke] [--max-words N] [--position bottom|middle] [--accent "#hex"] [--uppercase]

為每個格式(或僅 --format 指定的格式)寫入 edit-<fmt>/compositions/captions.html,資料來源為 work/cleancut.words.json(已在清理剪輯時間軸上)。style、accent 和 uppercase 是所有格式共用的(保持一致的品牌外觀);max-words 和 position 則依格式而異 —— 請連同 --format 一起傳遞。所有設定都會記在 project.json → captions 中,因此不帶旗標重新執行時會保留原有設定。腳手架已經掛載了字幕(<div id="captions" … data-track-index="4">)。

預設值:兩種格式皆為底部區域 —— 16:9 5 個字詞,64px · 9:16 3 個字詞,76px,y≈1348,位於 Instagram 的安全區內。Remotion 圖形會刻意避開這個區域(詳見 remotion/src/doc/theme.ts 中的 CAPTION_SAFE_Y),因此字幕與圖形永遠不會碰撞。

npm run scaffold -- <p> 會建構字幕層並疊加到 work/visuals-<fmt>.mp4 上,同時生成字幕;單獨重新執行 npm run captions 即可重新設定樣式。

選擇樣式

內容樣式每組字詞數
Shorts / reels / 活潑 / 鉤子pop(白色、粗外框、強調色活躍詞、單詞彈跳)2–3
教育 / 訪談 / 長片clean(深色圓角矩形、強調色用於活躍詞)4–6
故事 / 平靜 / 音樂導向karaoke(播放時從暗色漸變為白色填滿)3–5

強調色 = 來自簡報的品牌顏色,否則使用 #FFD400。僅限純英文影片使用 --uppercase(對印度文無效)。

文字修正

絕對不要手動編輯生成的 HTML。請從來源修正文字:

  • 在 work/edl.json 中加入 "textFixes": { "<原始文字 ID>": "Correct" },然後重新執行 npm run cut 和 npm run scaffold(重新整理)—— 原始 ID 來自 work/cleancut.words.json 中的 src 欄位。
  • 常見修正:品牌/人名、ASR 以泰盧固文/天城文寫出但使用者想要拉丁字母(或相反)的英文詞、剪輯後句子開頭的大小寫、數字(當 ఇరవై 改成 20 閱讀效果更好時)。

字體與字型

泰盧固文(Noto Sans Telugu)、天城文(Noto Sans Devanagari)和拉丁文(Poppins)字型以 woff2 格式配送至每個 edit-<fmt>/assets/fonts/ 目錄,並同時在 index.html 和字幕範本中宣告 —— 渲染器沒有系統字型。如果在任何地方加入新字型,則需要透過本機 woff2 檔案設定獨立的 @font-face,否則 lint 會因 font_family_without_font_face 而失敗。

印度文字的字串較長:在 9:16 格式中請維持 --max-words ≤ 3;生成器也會限制每組的字元數。

黑底遮罩

當卡片已經顯示文字(例如 sample_answer、正在朗讀的全螢幕引用)時,請在 work/visual-plan.json 中加入 "caption_blackouts": [{ "start", "end" }],然後重新執行 npm run captions。範圍內的文字會被移除,任何間隙都會結束一個字幕組,因此不會有跨越卡片的行(避免範本中出現「間隙前的詞 + 間隙後的詞」這種垃圾行)。

檢查銜接

npm run verify -- <p> 會在每個剪輯後立即抓取一個影格。請閱讀試算表:每個字幕必須是某個句子的真實片段。一個行內拼接了兩個不同鏡頭的內容是一個內容錯誤,沒有任何 linter 能發現。一次只能看到一個字幕組;組會在短暫停頓期間保持不變,且絕不重疊。

npm run captions 會將該階段標記為完成。

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

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

End-to-end editor for TALKING-HEAD videos (a person on camera) in this repo. Use when the user hands over a raw video with a speaker and wants a finished edit, or asks to continue/resume/redo any stage of an existing talking-head project — clean cut, motion graphics, b-roll, SFX, music, captions, final render, thumbnail. Delivers YouTube 16:9 and Instagram 9:16. Telugu, Hindi, English and code-mixed speech. For a voiceover with no presenter use edit-video-faceless.

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.

相關技能