feat: Unified subtitle style system, CLI improvements, core bug fixes (#1057)
Subtitle style system
- Unified JSON format for all styles with metadata (name, description, mode)
- style_manager.py: SubtitleStyle dataclass, shared by CLI and UI
- 5 presets: default, anime, vertical (ASS) + rounded (rounded background)
- –style, –style-override (inline JSON), –render-mode, –font-file
- Auto-detect render mode from style content
videocaptioner stylecommand to list all presets with parametersCLI improvements
- Default ASR engine: bijian (free, zero config)
- Environment variables: OPENAI_API_KEY / OPENAI_BASE_URL (standard names)
- batch-size default: 10 → 20
- Subtitle –help: 3-step pipeline description
- Hidden advanced params (fw-vad-*, fw-prompt, whisper-prompt)
- process: added –no-split, –whisper-api-key
- Consistent defaults and descriptions across all commands
- Font: Noto Sans SC as default (cross-platform)
- Non-TTY: no spinner frames (isatty check)
- Logger: WARNING level in default mode, no core log leakage
Core bug fixes
- Translation: _translate_chunk now raises on error (no silent None caching)
- Translation: _parallel_translate fails if ≥50% segments fail
- VTT: support MM:SS.mmm timestamps, proper header/cue parsing, HTML tag cleanup
- SRT: preserve multi-line subtitles with \n (not space-joined)
- ASS: \n → \N conversion for multi-line dialogue
- ASS: from_ass Default=text, Secondary=translated (consistent roundtrip)
- Core logs: 64 logger.info → debug, all Chinese → English
- Input validation: media/subtitle/video/output format checks in validators.py
Docs
- docs/cli.md: rewritten with style examples
- skills/SKILL.md: rewritten with 10 real-world scenarios
- Style section highlighting ASS and rounded background modes
Co-authored-by: liangweifeng liangweifeng@bytedance.com Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
VideoCaptioner
基于大语言模型的视频字幕处理工具 — 语音识别、字幕优化、翻译、视频合成一站式处理
在线文档 · CLI 使用 · GUI 桌面版 · Claude Code Skill
安装
免费功能(必剪语音识别、必应/谷歌翻译)无需任何配置,安装即用。
CLI 命令行
需要 LLM 功能(字幕优化、大模型翻译)时,配置 API Key:
配置优先级:
命令行参数 > 环境变量 (VIDEOCAPTIONER_*) > 配置文件 > 默认值。运行videocaptioner config show查看当前配置。所有 CLI 命令一览
transcribefaster-whisper、whisper-api、bijian(免费)、jianying(免费)、whisper-cppsubtitlellm、bing(免费)、google(免费)synthesizeprocessdownloadconfigshow、set、get、path、init)运行
videocaptioner <命令> --help查看完整参数。完整 CLI 文档见 docs/cli.md。GUI 桌面版
其他安装方式:Windows 安装包 / macOS 一键脚本
Windows:从 Release 下载安装包
macOS:
LLM API 配置
LLM 仅用于字幕优化和大模型翻译,免费功能(必剪识别、必应翻译)无需配置。
支持所有 OpenAI 兼容接口的服务商:
在软件设置或 CLI 中填入 API Base URL 和 API Key 即可。详细配置教程
Claude Code Skill
本项目提供了 Claude Code Skill,让 AI 编程助手可以直接调用 VideoCaptioner 处理视频。
安装到 Claude Code:
然后在 Claude Code 中输入
/videocaptioner transcribe video.mp4 --asr bijian即可使用。工作原理
开发
许可证
GPL-3.0