Communitygithub.com

muyunxue/dance-mmd-subtitle-kit

設計與交付 MMD / K-pop 舞蹈影片的字幕風格 mockup 及動畫對比樣品 — S1–S6 風格目錄(Y2K 鉻字、極簡動態、故障、混排雜誌感、圖形強調、手寫螢光筆),PIL/numpy 效果食譜、字型清單、連拍 / 對比影片慣例,以及用於 S4 vs S6 的平行子代理工作流程。

dance-mmd-subtitle-kit 是什麼?

這個技能提供了一套完整的工具與工作流程,專為 MMD 與 K-pop 舞蹈影片設計字幕風格。它涵蓋六種分類明確的風格(S1–S6),從 Y2K 鉻字、極簡動態到故障未來感與混排雜誌感,每種風格都附有對應的字型、效果函式與適用場景的建議。底層使用 PIL 與 numpy 直接繪製靜態幀與動畫小樣,無需依賴 AI 函式庫,確保精準控制與可重複性。技能中還定義了嚴謹的交付規範(解析度、編碼、關鍵幀表與說明文件),以及創新的「平行子代理」工作流程:主代理準備共用素材後,由多個子代理分別產出不同風格的樣片,最後再由主代理統整為對比影片與驗收報告。此技能特別適合在 Claude Code、Cursor 或 Codex 等終端機或 IDE 環境中執行,開發者或設計師只需呼叫對應的 Python 腳本,即可快速產出高品質的字幕風格提案。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/muyunxue/dance-mmd-subtitle-kit/tree/HEAD/skills/style-frames-compare

在你喜歡的 AI 中提問

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

說明文件

字幕風格方案 / 靜態幀 / 對比小樣

0. 先調研、再出稿

女團 PV 字幕的公開資料歸納(2024 KCI 論文 + K-pop Y2K Seoul 風格指南):

  • Graphic 圖形強調:粗細對比不規則、裝飾性筆畫的大字(Blackpink / XG 海報系);
  • Mix & Match 混排:襯線 + 無襯線 + 壓縮體 + 傾斜混用,雜誌編輯感;
  • Minimalism 極簡:乾淨無襯線、去裝飾、留白,隨節拍出現(NewJeans/aespa kinetic typography);
  • Futurism 未來感:數位化無襯線 + glitch / RGB 錯位 / 掃描線;
  • Y2K 鉻字 + 貼紙:chrome bubble lettering、糖果色(hot pink + aqua)、貼紙拼貼、星光閃點;
  • 手寫日記感:馬克筆/螢光筆 + 便條 + 塗鴉(NewJeans 青春感)。

1. 六種本片適配風格(S1–S6)

代號風格關鍵元素適合
S1Y2K 鉻字 + 貼紙Bungee 鉻字漸變 + 粉色徽章 + 星光最「女團」,粉/水色可換紫粉
S2極簡動態Anton 白色大字、錯位、細線、Silkscreen 小字正規歌詞版,最穩、不搶背景
S3故障未來感RubikGlitch + Anton、RGB 錯位、掃描線、HUD 角break / 轉場
S4混排雜誌感Georgia Italic × Bebas Neue × Archivo Black、膠帶、GO! 色塊、便條青春/雜誌感,段落過渡
S5圖形強調Anton 巨字 + 白色貼紙描邊 + 粉色錯位 + 條紋副歌爆點短詞
S6手寫/螢光筆Permanent Marker + 粉色螢光塊 + 便條 + ♥★ 箭頭間奏/特寫點綴

2. 製作靜態幀(PIL + numpy,無 AI 庫)

腳本:

  • 字幕\build\kpop_styles.py — S1–S6 六張 2560×1080 靜態稿(2025 調研版)
  • 字幕\build\art_frames.py — 早期 6 個藝術字方案(故障切片/霓虹崩壞/立體巨字/拼貼/輪廓回聲/豎排)
  • 字幕\build\gothic_art.py — 哥特全屏(已被用戶否掉,留檔) 字型目錄:字幕\build\fonts\(Anton, ArchivoBlack, BebasNeue, Bungee, Monoton, PermanentMarker, RubikGlitch, Silkscreen, PirataOne, UnifrakturCook)+ C:\Windows\Fonts(Georgia / Georgia Italic / Microsoft YaHei / Impact / Arial Black)。 下載字型(Google Fonts GitHub raw 可用):
https://raw.githubusercontent.com/google/fonts/main/ofl/<family>/<File>.ttf

常用效果函式(PIL/numpy)

  • 文字層:逐字繪製 + tracking(text_img),stroke_width/stroke_fill 做描邊;
  • 鉻字:alpha mask 上貼豎向多段漸層(gradient_fill)+ 斜向高光帶;
  • 貼紙描邊:對 alpha 做 MaxFilter(3) 膨脹 N 次再著色;
  • 錯位/故障:RGB 通道分別平移(chroma)、橫向條帶隨機位移(glitch_slices)、掃描線;
  • 立體字:同一文字多次偏移疊畫,由遠到近做深紫→薰衣草漸層;
  • 半調:網格圓點疊加(halftone);
  • 手寫螢光筆:文字後墊半透明圓角矩形 + GaussianBlur;
  • 便條/膠帶:半透明矩形 + 細線紋理 + 旋轉;
  • 星光/愛心:4 角星多邊形、雙圓 + 三角心形;
  • 顆粒:np.random.normal 疊加 1–3 級防色帶。

3. 動態小樣(ASS 動畫)

  • 5s 三風格:字幕\build\styles_anim.py → 公眾號/輸出/字幕風格參考/小樣_S2_5s.mp4 等;
  • S4/S6 30s:字幕\輸出\S4S6_30s\(兩個子代理各做一版,見下);
  • 炸場 FLARE:flare.py + flare_video.py;霓虹:neon_wide.py;
  • 完全避讓霓虹:avoid_side2.py。
  • 動畫套路:砸入(\fscx118→100 + \t + \blur)、旋轉落字(\frz + \t)、滑入(\move)、淡入、色塊縮放/掃出(\p1 + \fscx)、便條上移、拍點脈衝(每 0.447s 一個 134BPM 拍)。

4. 對比交付規範

  • 單條樣片:2560×1080 / 30fps / H.264 crf16 / faststart;30s=900 幀,5s=150 幀。
  • 對比影片:上下 vstack,每條縮到 1280×540,輸出 1280×1080(或 3 條 → 1280×1620),用 ASS 疊標籤。
  • 關鍵幀表:2×2 / 2×3 / 3×3 拼圖,每格 853×360 或 1280×540,帶風格名和時刻標籤。
  • 說明 md:風格說明 + 檔案表 + 時間軸 + 已知限制。
  • 示例:字幕\輸出\字幕風格參考\(6 風格靜態 + S2/S4/S6 5s 對比)、字幕\輸出\S4S6_30s\(兩版 30s + 對比)。

5. 並行子代理工作流(「子代理分開做」)

  1. 主代理準備共用底片(裁好 + 輕微壓暗)→ _base_30s.mp4;複製 fonts/ 到輸出目錄;寫 cue sheet(相對時間)。
  2. 每個風格一個子代理,提示詞必須包含:
    • 底片絕對路徑、輸出目錄、輸出檔案名(S4_30s.mp4 / S6_30s.mp4);
    • 字型目錄、ffmpeg 路徑、ASS 硬規則(時間格式、Style 色值無尾 &、fontsdir 相對、ASCII 檔案名);
    • 逐句時間軸(8 句)+ 風格描述 + 「不要中文 / 不擋臉」約束;
    • 自查要求(ffprobe 30s、抽幀看字、無中文、臉部乾淨)。
  3. 子代理只寫自己前綴的檔案,互不覆蓋;完成後彙報排版/動效/踩坑。
  4. 主代理收齊後:s4s6_compare.py 合成對比影片 + 關鍵幀表 + 統一說明 md;再自己抽幀驗收一遍。

6. 選型建議(紫粉霓虹舞台 + 翅膀人物)

  • 最穩:S2 極簡動態;
  • 最女團:S1 Y2K 鉻字(把顏色換紫粉主題色);
  • 段落過渡:S4 混排;爆點:S5;間奏/特寫:S6;break:S3。
  • 用戶明確否過:哥特全屏、血紅配色。別再出哥特方向。

7. 驗收清單

  • 靜態稿是 2560×1080、無中文錯字
  • 動態樣片 ffprobe 時長正確(5.000/30.000)
  • 抽幀確認字幕出現、不擋臉、無中文
  • 對比影片 + 關鍵幀表 + 說明 md 齊全
  • 風格名/檔案命名統一(S4_30s.mp4、對比_S4S6_30s.mp4)

Individual skills in this repo

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

muyunxue/dance-mmd-subtitle-kit

Hard rules, templates, ffmpeg commands and failure diagnosis for authoring ASS/SSA subtitles and burning them with libass on this machine. Load this before writing any ASS file, when a burn "succeeds" but no text appears, when text is misplaced/too big, when \p1 drawings are offset, or when you need the transparent-overlay export recipe. Contains the exact pitfalls hit in this project (timestamp format, style colour trailing ampersand, fontsdir, drawing anchor, chained \t, Permanent Marker sizing).

muyunxue/dance-mmd-subtitle-kit

Character-avoiding subtitle layout for the MMD dance videos — measure the dancer's per-frame bounding box, compute a per-cue union, place text in safe side/top columns, and verify zero overlap on every frame. Load this when asked 字幕不要挡住人物/完全不挡/避让, or when text overlaps wings/body and you need a verified-free layout with measured overlap counts.

muyunxue/dance-mmd-subtitle-kit

End-to-end recipe for making subtitles for the MMD dance videos in this workspace (字幕/ project) — probe the source, pick a segment, map LRC cues, choose a style, build ASS, burn, verify, and deliver. Load this when starting or resuming any subtitle task (静态稿/5s小样/30s小样/全片/透明叠加层), when a render "succeeded" but the video has no text, or when you need this project's paths, font list, cue sheet and acceptance criteria.

muyunxue/dance-mmd-subtitle-kit

Subject-aware colour grading for the MMD dance videos in this workspace — make the dancer stand out (background dim/cool/desat, subject lift/warm/sharpen/bloom) using either a soft stage-light ellipse or a hard character matte, with ffmpeg recipes, measured parameter sets and known failure modes (cast-shadow matte contamination, banding, truncated sources). Load this when asked to 调色/突出人物/压背景/统一色调, or when a graded clip shows weird bright blobs around the dancer.

相關技能