Communitygithub.com

broomva/skills

OpenCaptions拡張機能 for Content Engine — ポストプロダクションパイプラインにインテント駆動型CWI(Caption With Intent)キャプションを追加します。グレーディング → キャプション → 最終出力の段階にフックします。ピッチ、音量、感情、強調などのビデオの意図を理解し、可変フォントウェイト、サイズ、色でそれに応じてスタイルを設定するキャプションを生成します。OpenCaptions CLIまたはMCPサーバーを使用します。「add captions」、「opencaptions」、「CWI captions」、「intent captions」でトリガーされます。

skills とは?

OpenCaptions拡張機能は、Content Engineのポストプロダクションパイプライン(ステージ3)にインテント駆動型CWI(Caption With Intent)キャプションをフックするツールです。アップスケールとカラーグレーディング後の最終エクスポート前に配置され、単なる文字起こしではなく、音声のピッチ、音量、感情、強調などのインテントを解析し、フォントウェイト、サイズ、アニメーション、スピーカー色にマッピングして、視覚的に「どのように話されたか」を伝えるキャプションを生成します。このスキルは、CLI(`npx opencaptions generate`など)またはMCPサーバー(`@opencaptions/mcp`)を介してエージェントと統合でき、Claude Codeの設定に追加して「Generate CWI captions for video.mp4」のように呼び出すことができます。対応プラットフォームはContent Engineスタック(Remotion、ffmpeg)で、自動的にバリデーション、グレースフルデグラデーション、複数のキャプションスタイル(単語ごと、ナラティブ、最小限)を備えており、12のルールに基づくスコアリングにより品質を保証します。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/broomva/skills/tree/main/skills/video/content-engine/extensions/opencaptions

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

OpenCaptions拡張機能

CWI(Caption With Intent)キャプションをContent Engineのポストプロダクションパイプラインにフックします。フラットで静的な字幕とは異なり、CWIは音声の体感をエンコードします。ピッチはフォントウェイト、音量はフォントサイズ、強調はグローアニメーション、スピーカー識別情報はWCAG AAに準拠した色にマッピングされます。結果として、何が言われたかだけでなく、どのように言われたかを伝えるキャプションが生成されます。

CWIは、2025年にFCBシカゴとシカゴ聴覚協会によってアカデミー賞を受賞したキャプション標準です。OpenCaptionsは、そのための最初のオープンソースプログラムツールチェーンです。

パイプラインフックポイント

ステージ: ポストプロダクション(ステージ3) 位置: アップスケールとカラーグレードの後、最終エクスポートの前。

ポストプロダクションチェーン:
  1. アップスケール(Real-ESRGAN / Topaz)   --> 高解像度化
  2. カラーグレード(ブランドLUT / ffmpeg) --> ブランドカラー適用
  3. OpenCaptions(CWI)                    --> インテント駆動型キャプション
  4. 最終エクスポート(ffmpeg)             --> プロダクション対応ファイル

この拡張機能は、グレーディング済みの動画ファイルを受け取り、以下を生成します:

  1. 単語レベルのインテントアノテーションが付いたCWIドキュメント(.cwi.json)
  2. 標準的な字幕が必要なプラットフォーム向けのWebVTTフォールバック(.vtt)
  3. ピラースコアを含むバリデーションレポート(JSON)
  4. Remotionまたはffmpegでレンダリングされたキャプション付き動画(.mp4)

動作の仕組み

グレーディング済み動画 + シーン概要
  |
  ├── [1] 文字起こし(faster-whisper) --> 単語レベルのタイムスタンプ
  ├── [2] 話者ダイアライゼーション(pyannote-audio)    --> 話者属性
  ├── [3] インテント抽出              --> 発話ごとのピッチ、音量、感情、強調
  |       V1: parselmouth + FER(音声+映像)
  |       V2: V-JEPA2ワールドモデル
  |       V3: TRIBE v2ニューラル予測
  ├── [4] インテント → CWIへマッピング --> 単語ごとのウェイト、サイズ、強調、アニメーション
  |       V1: RulesMapper(ピッチ→ウェイト、音量→サイズ)
  |       V2: LearnedMapper(修正データで学習)
  |       V3: NeuralMapper(脳領域の活性化がスタイルを決定)
  ├── [5] バリデーション(12ルール)   --> 属性 + 同期 + 抑揚スコア
  └── [6] レンダリング                  --> Remotionオーバーレイ OR ffmpeg焼き込み

ステップ1-2:文字起こし + 話者ダイアライゼーション

パイプラインはOpenCaptions CLIまたはMCPサーバーを呼び出し、faster-whisperで単語レベルのタイムスタンプを、pyannote-audioで話者検出を実行します。これらのステージは、各単語が話者にタグ付けされたDiarizedTranscriptを生成します。

ステップ3:インテント抽出

インテント抽出器は音声と動画を分析し、各発話の体感されるレジスターを決定します:

  • 音声シグナル: ピッチ(Hz)、音量(dB)、発話速度(WPM)、ポーズのタイミング
  • 感情シグナル: 価数(-1~1)、覚醒度(0~1)、支配的な感情
  • 意味シグナル: 皮肉の確率、強調語、修辞的デバイス

これらのシグナルは、各発話に対してIntentFrameを形成します。発話のベースラインから逸脱する個々の単語には、WordIntentオーバーライドが適用されます。

ステップ4:インテントマッピング

マッパーはインテントシグナルをCWIのビジュアルパラメータに変換します:

インテントシグナルCWIプロパティマッピング(V1 RulesMapper)
ピッチ(正規化 0-1)weight(100-900)線形補間:100 + pitch_norm * 800
音量(正規化 0-1)size(0.7-1.5)線形補間:0.8 + volume_norm * 0.55
意味的強調 + 高音量emphasis(ブール値)emphasis_wordsに含まれる単語 OR 音量 > p90
話者識別情報話者 color12色のWCAG AAパレットから割り当て
ささやき(低音量)weight < 300オーバーライド:ウェイトを100-250に制限
叫び(高音量)size > 1.3 + emphasisオーバーライド:サイズ1.35-1.5、強調 true

ステップ5:バリデーション

@opencaptions/specバリデーターは、CWIドキュメントを3つのピラーにわたる12のルールに対してチェックします:

属性(3ルール):

  • ATT_001:すべてのキャプションにキャスト内の話者がいる
  • ATT_002:話者には一意の色が割り当てられている
  • ATT_003:色がWCAG AAコントラスト(#1a1a1aに対して4.5:1)を満たしている

同期(5ルール):

  • SYN_001:すべての単語にタイムスタンプがある
  • SYN_002:タイムスタンプが単調増加している
  • SYN_003:キャプションイベントが重複しない
  • SYN_004:アニメーション期間は仕様通り600ms
  • FCC_001:発話中に3秒以上のギャップがない
  • FCC_002:1行あたり最大42文字(FCC準拠)

抑揚(3ルール):

  • INT_001:ウェイトが有効範囲(100-900)内にある
  • INT_002:サイズが有効範囲(0.7-1.5)内にある
  • INT_003:20%以上の単語がデフォルト以外のウェイトを持つ(キャプションが実際に変化している)

各ピラーは0-100でスコアリングされます。CWIドキュメントは、3つのピラーすべてが80以上の場合に合格となります。

ステップ6:レンダリング

2つのレンダリングパス:

Remotionパス(Content Engine推奨):CWIの単語が<CaptionOverlay>コンポジション内のReactコンポーネントになります。各単語は、タイムスタンプに合わせてspring()エントランスアニメーション、話者色、可変フォントウェイト、強調グローとともに表示されます。完全なマッピングについてはreferences/cwi-remotion-bridge.mdを参照してください。

ffmpeg焼き込み(フォールバック):CWIドキュメントからASS字幕ファイルを生成し、ffmpeg -vf ass=captions.assで動画に焼き込みます。単語ごとのアニメーションは失われますが、話者色とフォントウェイトの変化は保持されます。

CLIの使用方法

# 動画からCWIキャプションを生成
npx opencaptions generate video.mp4 --output captions.cwi.json

# TRIBE v2ニューラルバックエンドで生成
npx opencaptions generate video.mp4 --backend tribe --output captions.cwi.json

# CWIドキュメントをバリデーション
npx opencaptions validate captions.cwi.json

# ターミナルでキャプションをプレビュー(ANSIカラー)
npx opencaptions preview captions.cwi.json

# WebVTTにエクスポート
npx opencaptions export captions.cwi.json --format webvtt

# After Effects ExtendScriptにエクスポート
npx opencaptions export captions.cwi.json --format ae-json

# Premiere Pro XMLにエクスポート
npx opencaptions export captions.cwi.json --format premiere-xml

# システム依存関係をチェック
npx opencaptions doctor

# Python依存関係をインストール
npx opencaptions setup

MCPサーバーの使用方法

OpenCaptions MCPサーバーは、エージェント統合用に4つのツールを公開しています:

ツール説明
generate_captions動画ファイルに対してフルパイプラインを実行
validate_captionsCWIドキュメントを12ルールで検証
preview_captions指定時刻のターミナルフォーマットプレビュー
export_captionsWebVTT形式にエクスポート

Claude Codeで使用するには、設定にMCPサーバーを追加します:

{
  "mcpServers": {
    "opencaptions": {
      "command": "npx",
      "args": ["@opencaptions/mcp"]
    }
  }
}

その後、会話内で「Generate CWI captions for video.mp4」と入力すると、generate_captionsがトリガーされます。

compose-video.pyの統合

Content Engineのcompose-video.pyは、--captionsフラグを受け付けます:

python3 scripts/compose-video.py storyboard.md --brand arcan-studio --captions

--captionsが渡されると、すべてのクリップが生成され結合された後、パイプラインは次の処理を行います:

  1. npx opencaptions generate {final-video}.mp4 --output {output-dir}/captions.cwi.jsonを実行
  2. CWIドキュメントを検証(スコアが80未満の場合は警告を出すがブロックはしない)
  3. --remotionも渡された場合、CWI JSONをRemotionコンポジションに<CaptionOverlay>プロップとして注入
  4. それ以外の場合、最終動画と一緒にWebVTTをサイドカーファイルとして生成

OpenCaptionsがインストールされていない場合(npx opencaptions doctorが失敗する場合)、パイプラインはグレースフルにフォールバックします:

  • シーン概要のテキストオーバーレイ(ストーリーボードの## Shot説明からの静的テキスト)にフォールバック
  • 警告をログに記録:「OpenCaptions not available, using scene brief text overlay」
  • クリップ境界から導出されたタイミングを持つ.vttファイルを引き続き生成

キャプションスタイル

3つの組み込みキャプションスタイルプリセットがあり、設定で選択できます:

1. 単語ごと(脳を掴む)

高いリテンションスタイル:各単語が個別に中央に表示され、サイズ変化が最大。ソーシャル/TikTok/Reels向けのドーパミンフック最適化コンテンツに使用。

  • 一度に表示される単語は1つ
  • ベースサイズ大(1080pで64px)
  • 極端なウェイト変化(100-900の全範囲)
  • 強調語は1.5倍に拡大しグローを伴う
  • 背景:なし(単語が動画の上に浮かぶ)
  • フォント:Roboto Flex可変

2. ナラティブ(編集用)

全文表示で単語ごとにスタイリング。長尺コンテンツ、ドキュメンタリー、ブログの動画埋め込みに使用。

  • キャプションイベント全体が表示され、単語がインラインでスタイリング
  • ベースサイズ中(1080pで48px)
  • 適度なウェイト変化(300-700)
  • 強調語は控えめなサイズアップ(1.15倍)
  • 背景:半透明のピル(rgba(0,0,0,0.6))
  • フォント:Roboto Flex可変

3. ミニマル(ローワーサード)

クリーンなローワーサード表示。話者名 + テキスト。視覚的な気散じを最小限に。インタビュー、トーキングヘッド、会議録画に使用。

  • 話者名ラベルを話者色で表示、キャプションテキストは白
  • ベースサイズ小(1080pで36px)
  • 強調のみウェイト変化(デフォルト400、強調700)
  • サイズ変化なし
  • 背景:グラデーションバー(フレーム下部15%)
  • フォント:システムサンセリフ

データ契約

読み取り(不変)

  • 先行するポストプロダクションステップからのグレーディング済み動画アセット
  • knowledge/compiled/brands/{brand_slug}.md -- キャプションのカラーパレットとタイポグラフィ設定用
  • シーン概要(実行時パラメータ) -- 意図された感情のトーンに関するコンテキスト用

書き込み(自身の名前空間のみ)

  • extensions/opencaptions/output/{asset_id}.cwi.json -- CWIドキュメント
  • extensions/opencaptions/output/{asset_id}.vtt -- WebVTTフォールバック
  • extensions/opencaptions/output/{asset_id}-report.json -- バリデーションレポート
  • extensions/opencaptions/output/{asset_id}-captioned.mp4 -- レンダリング動画(Remotionパスのみ)

設定

opencaptions:
  # キャプションスタイルプリセット
  style: "narrative"              # word-by-word | narrative | minimal

  # ビジュアルパラメータ
  font_family: "Roboto Flex"      # ウェイト軸の可変フォント
  base_font_size: 48              # 1080pでのピクセル数
  position: "bottom"              # top | center | bottom
  max_chars_per_line: 42          # FCC準拠
  background: "pill"              # pill | shadow | gradient | none
  background_opacity: 0.6         # 0.0 - 1.0

  # パイプラインバックエンド
  backend: "av"                   # av (V1) | jepa (V2) | tribe (V3)
  language: "en"                  # 文字起こし用のISO 639-1ヒント

  # 話者オーバーライド(オプション、デフォルトでは自動検出)
  speakers:
    - name: "Narrator"
      color: "#6B8AFF"
    - name: "Guest"
      color: "#FF6B6B"

  # レンダリング
  render_mode: "remotion"         # remotion | ffmpeg | sidecar-only
  output_format: "mp4"            # mp4 | webm
  fps: 30                         # ソース動画に合わせる

  # バリデーション
  min_score: 80                   # 続行するための最低スコア
  fail_on_low_score: false        # trueの場合、低スコアでパイプラインをブロック

  # TRIBE v2ニューラルマッピング(V3バックエンドのみ)
  neural_mapping: false           # 予測ニューラル応答スタイリングを有効化

グレースフルデグラデーション

この拡張機能は、Content Engineパイプラインをブロックしません。デグラデーションの段階:

条件動作
OpenCaptions CLIがインストール済み + 全Python依存関係完全なCWIパイプライン(文字起こし、話者ダイアライゼーション、インテント抽出、マッピング)
OpenCaptions CLIがインストール済み、Python依存関係なしモックバックエンドでプレースホルダーキャプション + バリデーション
OpenCaptions CLIがインストールされていないシーン概要のテキストオーバーレイを静的キャプションとしてクリップ境界に表示
動画に音声トラックがないキャプション生成をスキップし、情報メッセージをログに記録
バリデーションスコア < 80警告を出すが続行(fail_on_low_score: trueの場合を除く)
Remotionが利用不可ffmpeg ASS焼き込みにフォールバック
ffmpegが利用不可CWI JSON + WebVTTをサイドカーのみ出力(レンダリング動画なし)

関連情報

  • OpenCaptionsプロジェクト: ~/broomva/apps/opencaptions/
  • CWI-Remotionブリッジ: references/cwi-remotion-bridge.md
  • 統合ガイド: references/integration-guide.md
  • Content Engine SKILL.md: ../../SKILL.md
  • 拡張機能フレームワーク: ../README.md

Individual skills in this repo

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

broomva/skills

Local TTS, voice cloning, voice design, and video dubbing via the OmniVoice Studio MCP server (open-source ElevenLabs alternative; nothing leaves the machine, runs on MPS/CUDA/CPU). Use when: (1) generating speech from text in any of 646 languages, (2) cloning a voice from a 3-second reference clip, (3) designing a voice by gender/age/accent/pitch/style, (4) dubbing a video into another language, (5) listing voice profiles or personality presets, (6) producing narration where privacy, cost, or absent API keys matter, (7) non-English narration where Edge TTS/kokoro fall short, (8) batch audio for blog posts or content pipelines. Triggers: 'omnivoice', 'voice clone', 'clone this voice', 'tts', 'narrate', 'generate speech', 'voice synthesis', 'dub video', 'voice design', 'local tts', 'multilingual voice', 'narrate this post', 'elevenlabs alternative'.

broomva/skills

>- Speak an explanation out loud while working in any project — tiered text-to-speech with a pluggable backend (ElevenLabs by default and quota-guarded, macOS `say` via `--fast` for free instant local speech, local OmniVoice as an unlimited private tier). Markdown-aware, so code fences, URLs and deep paths collapse to short spoken placeholders instead of being dictated character by character, while snake_case identifiers survive intact so the listener can still search for them. Every utterance is saved to disk for later replay. Also carries a **talk mode** toggle: turn it on and the agent speaks a full readback of every turn, for as long as that session lasts — the whole response, not a summary of it, with `brief` and `marker` levels for when you want less. Talk mode is off by default and scoped to the single session that enabled it, so parallel agents in other worktrees stay silent. Use when the user asks to hear something rather than read it — an explanation of a change, a walkthrough of what just happen...

broomva/skills

Shop Tiendas D1 (Colombia, d1.com.co) from the command line — search the catalogue, resolve your nearest physical store, price a basket against that store's real stock, and quote delivery. D1 runs VTEX IO (account `d1tiendas`), so this drives its public storefront API with no admin key at all — catalogue and cart work fully anonymously, and a one-time emailed code unlocks order history. Handles the two traps that make naive D1 automation wrong — availability is regionalized (an unregioned query reports a national catalogue nobody can actually buy from) and prices arrive in two different units (search reports whole pesos, checkout reports hundredths, a silent 100x). Builds and prices baskets; it deliberately cannot pay, handing a checkout URL to a human instead. USE WHEN the user wants to find D1 products or prices, check whether D1 delivers somewhere, build or cost a D1 grocery basket, compare D1 items, or review their D1 orders. NOT FOR other Colombian retailers (Éxito, Jumbo, Ara, Alkosto), and not for c...

broomva/skills

Stateful, local-first household toxics inventory + swap engine. Identify the items in a home that carry endocrine disruptors and persistent chemicals (BPA/BPS, phthalates, PFAS/PTFE, parabens, flame retardants, VOCs, microplastics), score each by *real* exposure (severity x presence x how it's used x condition), and track the swap to a safer alternative from "flagged" -> "sourced" -> "swapped". Ships a grounded, cited knowledge graph of ~20 hazards, ~40 item-classes, and ~40 alternatives. Hands sourcing off to the `procurer` skill. The skill's state is the source of truth — the agent is the app.

broomva/skills

Tekton — the shared architecture-intent substrate for co-designing systems with the agent. One typed graph across six tiers (system / journey / data / infra / decisions / qualities); views are queries, not separate diagrams. The canonical artifact is a diff-friendly YAML model both human and agent read and write; it renders to Mermaid (agent-legible, GitHub-native) and a self-contained tabbed HTML viewer (human-visual). Cross-tier traceability (`tekton query <from> <to>`) answers "which infra does this user-journey step touch?" as a path query. USE WHEN: designing or thinking deeply about architecture, a system, a data model, user journeys/flows, or a technical plan WITH the agent; when a Category-C HTML doc isn't enough because you need to see AND edit AND traverse the design across tiers; "let's design X", "architect this", "model the system", "draw the flow", "how does this fit together", "diagram this", "/tekton". NOT FOR: a one-off throwaway diagram (use Mermaid inline); prose-only ADRs (write the ADR...

broomva/skills

Generate a polished Remotion video and X thread showcasing the full agent skills inventory. Use when creating social media content about skills, rendering category-based skill visualizations, or producing animated showcases of agent capabilities. Triggers on "skills video", "showcase skills", "skills thread", "render skills", "social content for skills", or requests to visualize the skills inventory.

broomva/skills

Produce polished product launch videos using the Liquid Glass aesthetic — dark void backgrounds, 3D perspective floating UI panels, particle effects, spring animations, and cinematic pacing. Built on Remotion with Imagen 4.0 for frames and Veo 3.1 for B-roll. Use when: (1) creating a product demo or launch video, (2) showcasing a UI/app/tool with cinematic polish, (3) building a social-ready video from screenshots and renders, (4) applying the liquid glass floating panel style, (5) composing Remotion videos with 3D transforms and spring animations. Triggers on: 'launch video', 'product video', 'liquid glass video', 'demo video', 'showcase video', 'remotion video', 'floating panel', 'glass aesthetic'.

関連スキル