Communitygithub.com

CLI-Anything 動画キャプション機能

AIによる動画キャプション作成ツール — 音声認識、字幕の最適化・翻訳、動画への焼き付けを実現。無料ASR・翻訳エンジン搭載。

CLI-Anything 動画キャプション機能 とは?

このスキルは、動画に字幕を付けるためのAI駆動CLIツール「cli-anything-videocaptioner」を提供します。音声認識(ASR)による文字起こし、字幕の最適化、翻訳、そして動画への焼き付け(ハードサブ/ソフトサブ)を一貫して実行できます。無料のASRエンジン(bijian)や翻訳エンジン(Bing、Google)を標準で利用できるため、追加のAPIキー不要で始められます。対応言語はBCP 47形式で38言語以上、中国語・英語をはじめ日本語や韓国語、欧州言語などをカバーしています。主にClaude CodeやCursor、CodexなどのAIエージェント環境で利用され、--jsonオプションによる機械可読な出力に対応しているため、エージェントが自動的に字幕生成・翻訳・動画合成のパイプラインを制御できます。また、スクリプトと字幕の一致度を確認するレビュー機能や、1フレームプレビューによる事前確認も可能で、品質管理を重視したワークフローを実現します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/HEAD/skills/cli-anything-videocaptioner

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

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

ドキュメント

cli-anything-videocaptioner

AI駆動の動画キャプション作成ツール。音声認識 → 字幕最適化 → 翻訳 → 動画への焼き付け。

インストール

pip install cli-anything-videocaptioner

前提条件:

  • Python 3.10-3.12(videocaptioner 1.4.1 は >=3.10,<3.13 が必要)
  • videocaptioner がインストールされていること(pip install videocaptioner)
  • 動画合成には FFmpeg が必要

使用方法

基本コマンド

# ヘルプ表示
cli-anything-videocaptioner --help

# インタラクティブREPLモード開始
cli-anything-videocaptioner

# 動画を文字起こし(無料、設定不要)
cli-anything-videocaptioner transcribe video.mp4 --asr bijian

# 字幕を翻訳(無料Bing翻訳)
cli-anything-videocaptioner subtitle input.srt --translator bing --target-language en

# 完全パイプライン:文字起こし → 翻訳 → 字幕焼き付け
cli-anything-videocaptioner process video.mp4 --asr bijian --translator bing --target-language en --subtitle-mode hard

# 最終焼き付け前に字幕/スクリプトの一致を確認
cli-anything-videocaptioner synthesize video.mp4 -s subtitles.srt \
  --subtitle-mode hard \
  --review-script approved_script.txt

# レビュー用の1フレーム字幕プレビューをレンダリング
cli-anything-videocaptioner review subtitles.srt \
  --script approved_script.txt \
  --preview-video video.mp4 \
  --preview-output review_5s.png

# JSON出力(エージェント利用向け)
cli-anything-videocaptioner --json transcribe video.mp4 --asr bijian

REPLモード

サブコマンドなしで起動すると、インタラクティブなREPLセッションが開始されます:

cli-anything-videocaptioner
# タブ補完と履歴付きで対話的にコマンドを入力

コマンドグループ

transcribe — 音声から字幕へ

transcribe <input> [--asr bijian|jianying|whisper-api|whisper-cpp] [--language CODE] [--format srt|ass|txt|json] [-o PATH]
  • bijian(デフォルト): 無料、中国語・英語対応、設定不要
  • whisper-api: 全言語対応、--whisper-api-key が必要

subtitle — 最適化と翻訳

subtitle <input.srt> [--translator llm|bing|google] [--target-language CODE] [--layout target-above|source-above|target-only|source-only] [--no-optimize] [--no-translate] [-o PATH]
  • 3ステップ: 分割 → 最適化 → 翻訳
  • Bing/Google翻訳は無料
  • 38の対象言語に対応(BCP 47コード)

synthesize — 字幕を動画に焼き付け

synthesize <video> -s <subtitle> [--subtitle-mode soft|hard] [--quality ultra|high|medium|low] [-o PATH] [--review-script PATH] [--max-script-diff-ratio FLOAT]
  • 安定したバックエンドのsynthesize機能をそのまま利用
  • 字幕の外観は、追加のフラグではなく字幕アセット/バックエンドバージョンで制御
  • --review-script は最終出力前に字幕/スクリプトのずれをチェック
  • コピー精度が重要でロバスト性が不要な場合は --max-script-diff-ratio を低く設定

process — 完全パイプライン

process <input> [--asr ...] [--translator ...] [--target-language ...] [--subtitle-mode ...] [--layout ...] [--no-optimize] [--no-translate] [--no-synthesize] [-o PATH]

review — 一貫性チェックとプレビュー

review <input.srt|input.ass> [--script PATH] [--max-diff-ratio FLOAT] [--preview-video PATH] [--preview-at TC] [--preview-output PATH]
  • ハードバーン前に字幕/スクリプトのずれを検出
  • 完全な最終動画の代わりに1フレームのレビューフレームをレンダリング可能

styles — スタイルプリセット一覧

styles
  • インストールされているバックエンドがプリセットスタイルをサポートしているか報告

config — 設定管理

config show
config set <key> <value>

download — オンライン動画のダウンロード

download <URL> [-o DIR]

JSON出力

すべてのコマンドで --json オプションに対応し、機械可読な出力が可能:

cli-anything-videocaptioner --json transcribe video.mp4 --asr bijian
# {"output_path": "/path/to/output.srt"}

バックエンドに関する注意

  • アップストリームのバックエンドは現在 Python >=3.10,<3.13 が必要です。マトリックス実行には Python 3.12 を推奨します。
  • 高度なsynthesize時のスタイルフラグはバックエンドのバージョンに依存します。styles コマンドでインストール済みバックエンドがそれらを公開しているか確認してください。
  • layout、render_mode、style、style_override、font_file などの互換性フラグは、styles とインストール済みバックエンドがサポートを確認しない限り、不安定なものとして扱ってください。

対象言語

BCP 47コード: zh-Hans zh-Hant en ja ko fr de es ru pt it ar th vi id および他23言語。

Individual skills in this repo

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

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

関連スキル