Communitygithub.com

HKUDS/CLI-Anything

AIによる動画キャプション生成ツール — 音声認識、字幕の最適化・翻訳、動画への焼き付けを安定したVideoCaptionerバックエンドで実行。無料のASRと翻訳機能を内蔵。

CLI-Anything とは?

cli-anything-videocaptionerは、動画にAI字幕を追加するためのコマンドラインツールです。音声認識(ASR)による文字起こし、字幕の最適化、翻訳、そして動画への焼き付け(ハード・ソフト両対応)をワンパイプラインで実行します。無料のBing翻訳やbijian ASRを搭載しており、追加設定なしで使い始められます。対応言語は38以上(BCP 47形式)で、JSON出力モードも備えているため、Claude CodeやCursorなどのAIエージェントと連携して自動化が可能です。バックエンドにはVideoCaptionerを使用しており、Python 3.10~3.12環境とFFmpegが必須です。

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

お気に入りの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]
  • 安定バックエンドの合成機能をミラーリング
  • 字幕の外観は字幕アセット/バックエンドバージョンに依存(追加フラグは不要)
  • --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 を推奨。
  • 合成時の高度なスタイルフラグはバックエンドバージョンに依存します。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

>-

関連スキル