Captionsのロゴ

Captions

コミュニティ
edotheDev
captions

Burn clean, readable captions into recorded video (talking head, vlogs, interviews, demos) in any language, including speech that switches languages mid sentence. Measured pauses, local Whisper word timings, phrase aware line breaks, per script fonts, libass shaping. Use for "add subtitles", "caption this", "burn captions", "transcribe and caption", or fixing broken caption text.

概要

公開者edotheDev
リポジトリclaude-video-kit
スキル名captions
スター
31
フォーク
6
同梱ファイル
7
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 7個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    edotheDevがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルCaptionsをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/edotheDev/claude-video-kit/tree/main/.claude/skills/captions
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/edotheDev/claude-video-kit.git /tmp/claude-video-kit
mkdir -p .claude/skills
cp -r /tmp/claude-video-kit/.claude/skills/captions .claude/skills/captions
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでCaptionsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にCaptionsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Captionsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Captions

Scripts are in scripts/ (Node 20+). Install once: cd .claude/skills/captions/scripts && npm install. Every step writes JSON into a work folder, so any stage can be redone alone.

node prep.mjs <video> work                         -> work/meta.json, audio.wav, pauses.json, runs.json
node words.mjs <video> work/words.json             -> word timings from local Whisper (English: .en models)
node cues.mjs work/words.json work                 -> work/chunks.json (caption cues)
node ass.mjs work/chunks.json work/meta.json work/captions.ass [--font "Name"]
cd work && ffmpeg -i <video> -vf "ass=captions.ass:shaping=complex" -c:v libx264 -crf 18 -preset medium \
           -pix_fmt yuv420p -c:a copy -movflags +faststart <out>-captioned.mp4
  • prep.mjs measures the noise floor and sets the silence gate from it. Quiet recordings sit near -40 dB on average, so a fixed -30 dB gate finds no pauses at all. Never hard code the gate.
  • words.mjs downloads the model once into scripts/models/ (--model small is the default and the one to trust for on screen words; base is faster). It runs on the CPU and uploads nothing.
  • cues.mjs scores every possible break and picks the cheapest set for the whole video: sentence ends are free, a break after "the" or "to" is expensive, a phrasal verb ("lock in") is never split, a real pause always ends a cue, and a cue is charged for reading faster than about 21 characters a second. --max-chars 42 suits vertical video; use 60 for 16:9. --drop-fillers removes standalone um and uh.
  • ass.mjs wraps to the safe width, centres the block at 64.5 percent of the height, and prints OVERFLOWING_LINES, which must be 0.

When Whisper is the wrong tool

Whisper models are single language by design. Speech that switches language inside a sentence comes back as phonetic mush in one of the two scripts, and some languages (Burmese among them) were barely in its training data. For those:

  1. Get an anchored transcript from a model that handles the mix (Gemini does this well), in this shape, with an anchor every 10 to 20 seconds:
    [00:00] first sentence as spoken ...
    [00:15] next sentence ...
  2. node parse-anchored.mjs transcript.md work lays the lines out inside each anchor window by how long they take to say and snaps every boundary to a measured pause. It prints an integrity block: lossless must be true, or something ate text.
  3. node ass.mjs ... --font "Latin Face" --font2 "Script Face" --script2 myanmar (or cjk) gives each script its own font, run by run.

ElevenLabs Scribe (through its connector) also returns word timings for many languages and is a good second opinion on timing; keep the text from whichever source you can vouch for.

The caption law

  • Position: the block's centre at about 64.5 percent of the height. Higher sits on the chin; lower runs into the platform's own UI.
  • Size: about 4.2 percent of the frame height (54 px on 1280, 81 on 1920). 3.6 percent was too small to read on a phone.
  • Two lines at most, broken on meaning. A break like "I'm / feeling stuck in one" is a failure even when it fits.
  • White, thin dark outline (about 0.28 percent of the height, at least 3 px), no box. A box reads as an amateur burn in; an outline holds over a patterned shirt where a shadow alone does not.
  • One font per script, never one font for both. Set the size explicitly on every run, because an ASS override persists for the rest of the line. Latin often needs to be set a touch smaller (about 0.9) to look the same size as another script.
  • No karaoke word highlighting, no coloured keywords. Both are platform defaults and read as generated.
  • Fix names in work/corrections.json, never by hand editing later. Every edit carries a reason.
  • Skip what you cannot vouch for. A missing word is better than a wrong one.

Traps that have already cost time

  • Use the ass filter with shaping=complex, never the subtitles filter or drawtext. subtitles= silently uses simple shaping, which does not reorder complex scripts: in Burmese a vowel sign stored after its consonant must render before it, and without reordering it comes out wrong while still looking plausible. drawtext does no complex shaping at all.
  • Run ffmpeg from inside the work folder with a relative .ass name. A Windows absolute path puts a colon into the filter graph and it will not parse.
  • Check shaping zoomed. Crop the caption band and scale it 2x before judging; misordered marks are invisible at full frame size.
  • Write scripts with a file editor, never through a shell heredoc. Backslashes get eaten: /\s+/ silently became /s+/, which split on the letter s and deleted it from every word.
  • Keep the source resolution and frame rate. Never upscale.
  • Transcripts stay in files. Do not print a whole transcript into the chat; quote only the line you need.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Captions」では何ができますか?

Burn clean, readable captions into recorded video (talking head, vlogs, interviews, demos) in any language, including speech that switches languages mid sentence. Measured pauses, local Whisper word timings, phrase aware line breaks, per script fonts, libass shaping. Use for "add subtitles", "caption this", "burn captions", "transcribe and caption", or fixing broken caption text.

TypingMindでCaptionsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Captionsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにCaptionsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/edotheDev/claude-video-kit/tree/main/.claude/skills/captionsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Captionsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Captionsは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもCaptionsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Captions」は無料ですか?

はい。edotheDevがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇