Communitygithub.com

內嵌字幕 — 32 視覺身份口播目錄出貨

用一份目錄(CATALOG.md)裡的 32 種視覺身份給口播影片加字幕。適合在不重剪畫面下為單人口播燒上有風格的硬字幕。

內嵌字幕 — 32 視覺身份口播目錄出貨 是什麼?

Launch Video 第 3 步(字幕/出貨):starter-nextjs-embedded-captions。分鏡合成與 Apple-like 拋光後燒目錄風格字幕。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/1345AbhishekKumar/starter-nextjs/tree/HEAD/.agents/skills/embedded-captions

在你喜歡的 AI 中提問

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

說明文件

內嵌字幕

單一目錄,於前端選取(CATALOG.md — 17 種身份;背後的三種引擎是後端細節)。標準(預設)會建立一個乾淨的逐字 軌道(承載大部分文字的下三分之一字幕)+ 一個 內嵌 高潮,合成 於 主體後方的場景中,達到視覺高點。電影 模式是純內嵌 — 無軌道,每個字幕都合成於主體後方(英雄字體、累積、遮蔽作為效果)。主題 模式是一個完整的主題構成 — 主體範例 × 英雄設定片頭 × 前景特效 × 底版反應,由註冊表組成(themes/README.md):ordnance、terminal、neonsign、stardust、stomp。大多數解說 / 旁白使用 標準 模式;內嵌是稀缺且應得的視覺高點 — 每個字都內嵌是常見錯誤;主題模式用於 VFX 級別的要求(如「炸」、「特效」、「像 AE 做的」)。


操作流程(簡而言之)

下方的工藝散文較長;但流程本身很短 — 所有確定性的事物都是計算或編譯出來的,從不手寫:

  1. 決策閘門(拒絕不良片段)→ 從 CATALOG.md 中選取一個身份(17 種身份;引擎/編譯器透過查表取得 — 絕不詢問模式/類別問題)
  2. hyperframes init(若專案目錄已存在且內含影片,則跳過 — matte.cjs/transcribe.cjs 會將目錄中的任何影片視為 source.mp4)→ bash scripts/prepare.sh <project>(平行執行 matte ∥ transcribe ∥ audio-envelope,然後執行 safe-zones v2 並包含場景色板/光學/照明 — 一個指令,無遺漏)
  3. 撰寫一個小型的創意選擇 JSON(先讀取 safe-zones.json): 電影模式 → plan.json → fill-timings.cjs → fit-fonts.cjs → make-composition.cjs; 主題模式 → theme.json → make-theme.cjs(軌道/面板/詩句/接管範例;anchor 是靜默的軌道預設)
  4. 視覺 QA:node scripts/preview-frames.cjs <project> → 約 2 秒/幀的高傳真合成預覽(無需渲染)。在付費渲染前檢查 § 視覺 QA。
  5. render-and-composite.sh → 閘門(時間/遮蔽+英雄/溢出/交接)→ final.mp4

人們常忽略的關鍵規則:

  • 軌道(預設)+ 內嵌(提升)。 drop(填充詞,不顯示)/ rail(逐字下三分之一字幕,在前方,承載大部分文字)/ embed(合成於主體後方的關鍵詞)。標準模式兩者都做,僅內嵌視覺高點。參見 § 字幕模型。
  • 影片以未修改的方式交付(標準/電影模式;主題模式的 PLATE 預算是唯一的例外 — 註冊表控制的反應節拍(充能變暗、衝擊、晃動、顆粒)根據每個主題 DNA 定義,並在遮罩合成後套用,使主體+文字+底版作為一個畫面移動) — 僅新增字幕;遮罩只是讓主體遮蔽內嵌軌道。從不調色/重新著色/添加掃描線。
  • 兩本規則書:軌道 → references/rail.md(較薄),內嵌工藝 → references/composition-craft.md(豐富,僅內嵌)。依需求瀏覽。

字幕模型 — 軌道 + 內嵌

每個口語短語都是以下三種之一:

內容顯示方式
drop填充詞 — 嗯/呃、口吃、自我修正不顯示
rail預設 — 普通口語內容(逐字)乾淨的下三分之一字幕,在前方,可讀。重點字詞可以有行內 emphasis 高亮(強調色 / 字詞活動彈跳)— 它仍停留在軌道上。
embed提升的視覺高點 — 標題性節拍一個大字合成於 主體後方(遮罩遮蔽),設計入場和出場

軌道承載大部分文字;內嵌是稀缺且應得的視覺高點。 稀缺性以 每個節拍/區塊為單位,而非每個片段:每個區塊(思想)最多一個英雄,永不共存,英雄視窗之間至少一個節拍的空白(編譯器會對低於 0.6 秒的情況發出警告)。短片段 → 通常 1–2 個;長解說 → 每個部分大約一個。在多個英雄中,最大的那個是 APEX(它獨自獲得完整的鎖定內嵌 + 寬度適配提升);較小的則是 次要高點,作為超大強調行(前景,阻尼運動)跟隨其列 — 並非每個節拍都需要遮罩展示,這正是保持頂點事件性的關鍵。將每個字都內嵌仍是常見錯誤。

軌道表面身份正是建立這個結構(軌道 = rail.html,內嵌 = index.html 中的高潮)。列流身份則放棄軌道,將所有內容以內嵌風格呈現 — 僅在需要氛圍勝過逐字可讀性的情況下推薦,絕不用於解說 / 旁白(文字必須可讀)(CATALOG.md 針對每個身份編碼了此建議)。


步驟 0 — 從目錄中選取一個身份

一個前端,三個引擎在背後。 使用者從 CATALOG.md 選取一個身份(17 個條目:12 個經典 + 5 個主題);引擎、編譯器和撰寫檔案透過查閱目錄行來取得。絕不將「標準 vs 電影 vs 主題」作為問題提出 — 這些是後端名稱(一個產品即使有多個引擎也只有一個 UX)。目錄編碼了路由所需的一切:閱讀表面、語調、推薦場景、場景需求、以及對於真正接近的配對(loud↔ordnance、neon↔neonsign、cream↔stardust)的相鄰性備註。

程序:探測片段 → 從目錄中縮小範圍至 2–3 個身份 → 推薦一個並附上一行原因 → 使用者選取 → 撰寫該身份的檔案。身份與引擎鎖定(無交叉組合;開啟一個身份是一個驗證事件 — 參見 dna/README.md)。

在撰寫前,始終先提出你的推薦並讓使用者選擇。 不要默默採用預設值。

(完整的身份表格位於 CATALOG.md — 路由的單一事實來源。下方的引擎文件描述了每個後端的撰寫合約。)

推薦啟發法:使用 CATALOG.md 中的「縮小範圍啟發法」 — 它們是身份層級的(例如,「炸」會縮小至 ordnance/stomp/terminal/loud,並根據應該爆炸的內容來選取),絕非類別層級。不確定時 → anchor。

  • 電影模式 → 為鎖定的模板撰寫 plan.json,由 make-composition.cjs 編譯。
  • 主題模式 → 閱讀 themes/README.md,撰寫 theme.json,執行 scripts/render-theme.sh(編譯 + 渲染 + 底版反應 → final_fx.mp4)。

決策閘門 — 優先執行

在任一模式前,探測影片並對場景進行分類。

ffprobe <video.mp4>                    # 規格
ffmpeg -ss <t> -i <video.mp4> -vframes 1 sample.png   # 在 20/50/80% 處

閱讀樣本。在以下情況拒絕:

  • 多個說話者 / 硬切(分割並分別渲染每個鏡頭,或拒絕)
  • 無人類主體(此技能適用於說話頭像)
  • 少於 3 秒,無語音,或臉部從未清晰可見 — transcribe.cjs 會在音訊接近靜音時發出警告(Whisper 可能會在靜音上幻覺出「Thank you.」等字詞);留意並拒絕,而不是為編造的文字加上字幕
  • 來源已含有燒錄字幕 / 子標題 / 大量文字圖形 — 添加第二個字幕系統會產生衝突,且素材以未修改的方式交付(無覆蓋/修復)。燒錄文字通常只在中段出現:取樣一個 1fps 連絡表(ffmpeg -i in.mp4 -vf "fps=1,scale=160:-1,tile=10x5" sheet.png),不要只相信 3 個隨機幀。
  • 轉錄稿很差 — 非母語/濃重口音的語音可能被轉錄成看似自信的胡言亂語。在撰寫前理智檢查 transcript.json;如果無法解析為語言,嘗試一次 WHISPER_MODEL=medium,否則拒絕(編造文字的逐字軌道比沒有字幕更糟)。
  • 忙碌的手持拍攝,快速運動(遮罩會閃爍)

預飛探測(無成本,防止最嚴重的失敗)

  1. 鏡頭切換探測。 在 20%、50%、80% 處取樣幀。如果出現不同的主體/場景,在切點之前裁剪片段。
  2. 信箱 / 柱箱探測。 第一幀有黑邊?計算安全內容矩形並將字幕放置限制在該區域內。
  3. 亮度探測。 取樣字幕區域的平均亮度 — 低於 60 → 亮色文字直接可讀,60–180 → 添加字形遮罩,180+ → 不透明文字 + 遮罩(絕不單獨使用亮色文字)。電影模板是奶油色+screen 且鎖定 — 使用此探測來 選取一個合適的身份(明亮場景 → ink,或 anchor 主題的不透明軌道),絕不重新著色一個。
  4. 根據語調推薦身份(你推薦;使用者選取 — 參見步驟 0 + CATALOG.md)。 解說 / 訪談 / 必須閱讀文字 → 軌道/面板表面身份;詩意 / 社交 / 「電影感」 → 根據語調選擇列流身份;「炸 / 特效 / VFX」 / 命名世界 → 主題身份。不確定時 → anchor(文字可讀,場景安全)— 但提供一個短名單並讓使用者選擇。

流程 — 5 個步驟

1. hyperframes init <project> --non-interactive --video <video.mp4>
2. bash scripts/prepare.sh <project>       # 平行執行 matte ∥ transcribe → safe-zones。一個指令。
                                           #   → frames_fg/ transcript.json safe-zones.json
3. [代理步驟 — 唯一的創意步驟] 根據模式撰寫小型 JSON;見下方
   電影模式:撰寫 plan.json → node scripts/fill-timings.cjs → fit-fonts.cjs → make-composition.cjs
   主題模式:撰寫 theme.json → bash scripts/render-theme.sh <project>   (編譯 + 渲染 + 底版特效)
4. node scripts/preview-frames.cjs <project>   # 約 2 秒/幀的合成預覽 → § 視覺 QA(在渲染之前)
5. bash scripts/render-and-composite.sh <project>  # 閘門 → final.mp4 + history/ 快照
   (主題模式:跳過步驟 3b/5 — render-theme.sh 已執行編譯 + render-and-composite
    + _postfx.sh;交付物是 final_fx.mp4,final.mp4 是底版反應前的版本)

步驟 1 的 init 會檢查已安裝的技能是否為 GitHub 上的最新版本,並在必要時更新全域集合。

步驟 3 因模式而異:

步驟 3 — 電影模式(純內嵌)

  1. 先讀取 safe-zones.json。 旁白平面位於 zones.hugLeft/hugRight — 緊靠輪廓的乾淨條帶(遠離主體的文字看起來像是浮動的,而非內嵌;遠角是備用方案,而非預設)。英雄預設位於 heroAnchor/heroBands.best(居中於主體上,約 30–55% 被遮蔽)。recommendation:"fg" 會將旁白移到前方以提升可讀性;只要 heroBands.feasible,英雄就始終保持內嵌 — 英雄前景是最後手段。
  2. DNA 是你在步驟 0 中選取的身份(CATALOG.md)— 不要在再次開啟選擇。根據場景進行理智檢查(英雄波段亮度 > 150 需要 ink;完整的選取指南位於目錄中,涵蓋所有十種身份,包括 neon / glitch / chrome / velocity)。陳述你的選擇 + 原因;由使用者決定。DNA 鎖定類型/色板/混合/運動 + 英雄三幕劇;safe-zones v2(色板/光學/照明)會自動根據此場景進行參數化。
  3. 撰寫 <project>/cinematic.json — "dna": "<名稱>" + 思想區塊,而非原始群組:每個區塊 = 文字行(按從句邊界分組 2–5 個)+ 它所堆疊的平面 + 每行 css(僅大小/粗細/樣式 — 無位置)+ 最多一行標記為 "hero": true(被提升的單詞;"text" 用於顯示形式)。模式:scripts/make-cinematic.cjs 標頭。
  4. 編譯:node scripts/make-cinematic.cjs <project> — 將區塊轉換為 plan.json → index.html。為你生成:轉錄稿時間、區塊內累積、區塊間翻頁、英雄鎖定(英雄區塊的前文、英雄和後文堆疊成一個以主體為中心的單一合成構圖 — 閱讀順序自上而下 = 依構造的說話順序;前文浮於前方,而英雄內嵌於後方 = 深度夾層;一條質量規則確保英雄主導其上下文)、頂點/次要英雄分割、依構造的閱讀順序、按 safe-zones 的前景備用方案。然後閘門照常執行。(直接手寫 plan.json 仍然可行,用於區塊無法表達的設計 — 然後自行執行 fill-timings.cjs + fit-fonts.cjs + make-composition.cjs。)

步驟 3 — 主題模式(主題構成)

先閱讀 themes/README.md — 範例/設定片頭註冊表、連結、嚴格規則,以及確切的 theme.json 模式。

  1. 根據內容語調選取主題 DNA(每個 themes/<名稱>.json 都有 voice + when)。陳述你的選擇 + 原因;由使用者決定。
  2. 撰寫 <project>/theme.json — dna、lines(逐字,按轉錄稿順序;每個 1–5 個單詞 — 對於 takeover 模式,每行是一個卡片)、minors(強調詞)、hero:{match}(高潮詞/短語;對於內嵌設定片頭,將其排除在 lines 之外;對於行內設定片頭和面板+編輯,將其保留在內)。
  3. 渲染:bash scripts/render-theme.sh <project> — 編譯(在編譯時進行逐字完整性檢查),渲染兩個圖層,合成,套用底版反應 → final_fx.mp4。在編譯和渲染之間使用 preview-frames.cjs 進行視覺 QA。

視覺 QA — 在渲染前預覽

node scripts/preview-frames.cjs <project> [時間點…] 以約 2 秒/幀合成高傳真預覽幀 (在查找時間點截圖的字幕圖層 + 真實影片幀 + 遮罩遮蔽 + 軌道覆蓋層 = 最終合成在該時刻的樣子)。預設取樣 = 每個群組/高潮視窗。完整渲染需要數分鐘 — 絕不使用它來 發現 佈局問題。

檢查預覽(<project>/preview/sheet.png)的內容是否與轉錄稿一致,以及合成是否按預期運作。

Individual skills in this repo

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

1345AbhishekKumar/starter-nextjs

The fallback workflow for authoring custom HyperFrames video compositions at any length or format — longer or multi-scene pieces, brand / sizzle reels, montages, title cards, static loops, and freeform compositions. Input- and length-agnostic. If a specialized workflow clearly fits the input — a marketed product, a website, a topic explainer, a GitHub PR, existing footage, a short motion graphic, or a Remotion port — prefer it (see /hyperframes); use this only as the general fallback when none fit.

1345AbhishekKumar/starter-nextjs

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). HyperFrames-native: single paused timeline, seek-safe, deterministic.

1345AbhishekKumar/starter-nextjs

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

1345AbhishekKumar/starter-nextjs

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

1345AbhishekKumar/starter-nextjs

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

1345AbhishekKumar/starter-nextjs

Audio and media assets for HyperFrames compositions, produced by one shared audio engine (`scripts/audio.mjs`) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound effects (HeyGen audio-library retrieval by default, with local Lyria / MusicGen BGM generation and a bundled SFX library as the no-credential fallback), Whisper transcription, background removal, and caption authoring. Use for voiceover / TTS, BGM, SFX / sound effects, transcription, captions / subtitles / lyrics / karaoke / per-word styling, voice + provider selection, and music-mood prompting.

1345AbhishekKumar/starter-nextjs

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

1345AbhishekKumar/starter-nextjs

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s and up to ~30s, with no narration arc, voice-over, or live-action subject. Can render to MP4 or transparent overlay. Not for longer, multi-scene, narrated, or brand-reel pieces (use general-video), narrated website videos (website-to-video), topic explainers (faceless-explainer), product promos (product-launch-video), PR videos (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a quick motion-first piece or a longer / narrated treatment, see /hyperframes.

1345AbhishekKumar/starter-nextjs

Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it.

1345AbhishekKumar/starter-nextjs

turn a product or marketing URL, pasted script, or brief into a product launch video, including SaaS promos, feature reveals, app launches, company promos, and product marketing videos. Use this skill when the user wants to market, launch, promote, or reveal a product. Do not use it for general non-launch website tours, non-product topic explainers, GitHub pull requests, captioning existing footage, or short unnarrated motion graphics. If the intent is unclear, route through /hyperframes first. This is the new shot-sequence architecture: every visual frame is authored as a time-coded shot sequence picked from a menu of golden blueprints, so frames develop over their full duration instead of freezing after entrance.

1345AbhishekKumar/starter-nextjs

turn a GitHub pull request (a PR URL like github.com/<owner>/<repo>/pull/<N>, an <owner>/<repo>#<N> ref, or 'this PR' in a checked-out repo) into a code-change explainer video, up to ~3 min (sweet spot 30-90s) — changelog, feature reveal, fix, or refactor walkthrough, rendered from the diff / commits / files. The input is a CODE CHANGE read via the gh CLI; there is no website capture. Use this skill for a GitHub PR. Do not use it for a product launch/promo (use /product-launch-video), a tour of a real website (use /website-to-video), a topic explainer with no PR (use /faceless-explainer), captions on existing footage (use /embedded-captions), or a short unnarrated motion graphic (use /motion-graphics). If the intent is unclear, route through /hyperframes first.

1345AbhishekKumar/starter-nextjs

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

1345AbhishekKumar/starter-nextjs

Capture a general website/URL and turn it into a HyperFrames video (site tour, showcase, or social clip from the site's own visuals). Uses headless Chrome screenshots + brand assets. Use when intent is general — portfolio/blog/landing-page showcase or social clip from the site. NOT for: product/SaaS launch or promo (→ /product-launch-video, even from a URL); topic explainer with no site (→ /faceless-explainer); GitHub PR (→ /pr-to-video); adding captions to existing video (→ /embedded-captions); short unnarrated page-highlight motion graphic (→ /motion-graphics). Unclear launch-vs-general-site? Ask one question or start at /hyperframes.

相關技能