Cli Anything Videocaptioner

作者 hkuds34f519533bc1無授權條款51K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 週前更新

AI-powered video captioning — transcribe speech, optimize/translate subtitles, and burn them into video via the stable VideoCaptioner backend. Free ASR and translation included.

僅含說明Design & Creative
AI 產生的概覽

命令列工具,可將影片語音轉寫為字幕、最佳化並翻譯字幕,再把字幕壓製進影片。

功能
此技能把 VideoCaptioner 後端包裝成命令列介面,提供 transcribe、subtitle、synthesize、process、review、styles、config 與 download 等指令。它能把語音轉成 SRT/ASS/TXT/JSON 字幕,對字幕檔案進行切分、最佳化與翻譯,支援 38 種目標語言,並以軟字幕或硬字幕方式渲染進影片。review 指令可檢查字幕與腳本的偏差,也可只渲染單一預覽畫格;所有指令都支援 JSON 輸出,方便代理程式讀取。
適用情境
適合需要端到端為影片上字幕的情境:從音訊產生字幕、翻譯或整理現有字幕檔案,或把字幕壓製進影片。也適用於在最終硬字幕匯出前,需要核對已核准腳本與字幕一致性的流程。
執行需求
需要 Python 3.10-3.12(建議 3.12)、videocaptioner 套件,以及用於影片合成的 FFmpeg,透過 pip 安裝。部分語音辨識方式(whisper-api)需要 API 金鑰;Bing、Google 翻譯與 bijian 語音辨識被描述為免費。線上影片下載與線上翻譯需要網路存取。不附帶指令碼,僅為說明文件。

cli-anything-videocaptioner

AI-powered video captioning tool. Transcribe speech → optimize subtitles → translate → burn into video.

Installation

bash
pip install cli-anything-videocaptioner

Prerequisites:

  • Python 3.10-3.12 (videocaptioner 1.4.1 requires >=3.10,<3.13)
  • videocaptioner must be installed (pip install videocaptioner)
  • FFmpeg required for video synthesis

Usage

Basic Commands

bash
# Show helpcli-anything-videocaptioner --help
# Start interactive REPL modecli-anything-videocaptioner
# Transcribe a video (free, no setup)cli-anything-videocaptioner transcribe video.mp4 --asr bijian
# Translate subtitles (free Bing translator)cli-anything-videocaptioner subtitle input.srt --translator bing --target-language en
# Full pipeline: transcribe → translate → burn subtitlescli-anything-videocaptioner process video.mp4 --asr bijian --translator bing --target-language en --subtitle-mode hard
# Review subtitle/script consistency before a final hard-burncli-anything-videocaptioner synthesize video.mp4 -s subtitles.srt \  --subtitle-mode hard \  --review-script approved_script.txt
# Render a one-frame subtitle preview for reviewcli-anything-videocaptioner review subtitles.srt \  --script approved_script.txt \  --preview-video video.mp4 \  --preview-output review_5s.png
# JSON output (for agent consumption)cli-anything-videocaptioner --json transcribe video.mp4 --asr bijian

REPL Mode

When invoked without a subcommand, the CLI enters an interactive REPL session:

bash
cli-anything-videocaptioner# Enter commands interactively with tab-completion and history

Command Groups

transcribe — Speech to subtitles

transcribe <input> [--asr bijian|jianying|whisper-api|whisper-cpp] [--language CODE] [--format srt|ass|txt|json] [-o PATH]
  • bijian (default): Free, Chinese & English, no setup
  • whisper-api: All languages, requires --whisper-api-key

subtitle — Optimize and translate

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]
  • Three steps: Split → Optimize → Translate
  • Bing/Google translators are free
  • 38 target languages supported (BCP 47 codes)

synthesize — Burn subtitles into video

synthesize <video> -s <subtitle> [--subtitle-mode soft|hard] [--quality ultra|high|medium|low] [-o PATH] [--review-script PATH] [--max-script-diff-ratio FLOAT]
  • Mirrors the stable backend synthesize surface
  • Subtitle look is controlled by the subtitle asset/backend version, not extra harness flags
  • --review-script checks subtitle/script drift before the final export
  • Lower --max-script-diff-ratio when copy accuracy matters more than resilience

process — Full pipeline

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

review — Consistency check and preview

review <input.srt|input.ass> [--script PATH] [--max-diff-ratio FLOAT] [--preview-video PATH] [--preview-at TC] [--preview-output PATH]
  • Detects subtitle/script drift before a hard-burn
  • Can render a single review frame instead of producing a full final video

styles — List style presets

styles
  • Reports whether the installed backend exposes preset styling support

config — Manage settings

config showconfig set <key> <value>

download — Download online video

download <URL> [-o DIR]

JSON Output

All commands support --json for machine-readable output:

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

Backend Notes

  • The upstream backend currently requires Python >=3.10,<3.13; prefer Python 3.12 for matrix runs.
  • Advanced synthesize-time style flags are backend-version dependent. Use styles to check whether the installed backend exposes them.
  • Compatibility flags such as layout, render_mode, style, style_override, and font_file should be treated as non-stable unless styles and the installed backend confirm they are supported.

Target Languages

BCP 47 codes: zh-Hans zh-Hant en ja ko fr de es ru pt it ar th vi id and 23 more.

來源與署名

來源:hkuds/cli-anything位於skills/cli-anything-videocaptioner提交34f5195

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架