API安装
- 作者仓库星标 14,857
- 作者更新于 实时读取
- 作者仓库 VideoCaptioner
- 领域
- 工程开发
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @WEIFENG2333 · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 需要 · OpenAI
- 兼容的系统
- macOS
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 读取环境变量
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: videocaptioner
description: Process video subtitles — transcribe speech, optimize/translate text, burn styled subtitles into…
category: 工程开发
runtime: 无特殊运行时
---
# videocaptioner 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“When to use / Before you start / Common scenarios”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“When to use / Before you start / Common scenarios”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、读取环境变量、会按任务需要访问外部网络、需要准备 OpenAI API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;会按任务需要访问外部网络;需要准备 OpenAI API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令、读取环境变量。
先用一个小任务确认它会围绕“When to use / Before you start / Common scenarios”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: videocaptioner
description: Process video subtitles — transcribe speech, optimize/translate text, burn styled subtitles into…
category: 工程开发
source: WEIFENG2333/VideoCaptioner
---
# videocaptioner
## 什么时候使用
- 把工程方向的常用动作沉淀成 Agent 可调用的技能 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「When to use / Before you start / Common scenarios」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;会按任务需要访问外部网络;需要准备 OpenAI API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "videocaptioner" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> When to use / Before you start / Common scenarios
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令、读取环境变量 | 会按任务需要访问外部网络
安全层 -> 需要准备 OpenAI API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} VideoCaptioner CLI
AI-powered video captioning: transcribe speech → optimize subtitles → translate → burn into video with beautiful styles.
When to use
- User wants to add subtitles to a video
- User wants to transcribe audio/video to text
- User wants to translate subtitles to another language
- User wants to customize subtitle appearance (colors, fonts, rounded backgrounds)
- User wants to download and subtitle online videos
Before you start
Always run videocaptioner <command> --help first to check the latest options and defaults before executing a command. The examples below are common patterns, but --help is the source of truth.
- Install:
pip install videocaptioner - FFmpeg required for video synthesis (
brew install ffmpegon macOS) - Free (no API key): transcription (bijian/jianying), translation (Bing/Google)
- Requires LLM API key: subtitle optimization, subtitle re-segmentation, LLM translation. Set via
OPENAI_API_KEYenv var or--api-keyflag
Common scenarios
1. Give a Chinese video English subtitles (one command, all free)
videocaptioner process video.mp4 --asr bijian --translator bing --target-language en \
--subtitle-mode hard --quality high -o output.mp4
2. Transcribe a video to SRT (free)
videocaptioner transcribe video.mp4 --asr bijian -o output.srt
# Output as JSON format to a directory
videocaptioner transcribe video.mp4 --asr bijian --format json -o ./subtitles/
3. Translate existing subtitles
# Free Bing → English, bilingual output with translation above original
videocaptioner subtitle input.srt --translator bing --target-language en --layout target-above -o translated.srt
# Free Google → Japanese, translation only (discard original text)
videocaptioner subtitle input.srt --translator google --target-language ja --no-optimize --layout target-only -o output_ja.srt
# High quality LLM translation with reflective mode
videocaptioner subtitle input.srt --translator llm --target-language en --reflect \
--api-key $OPENAI_API_KEY -o output_en.srt
4. Full pipeline with beautiful styled subtitles
# Anime-style subtitles (warm color + orange outline), high quality video
videocaptioner process video.mp4 --asr bijian --translator bing --target-language ja \
--subtitle-mode hard --style anime --quality high -o output_ja.mp4
# Modern rounded background subtitles
videocaptioner process video.mp4 --asr bijian --translator google --target-language ko \
--subtitle-mode hard --render-mode rounded -o output_ko.mp4
# Custom colors: white text with red outline, ultra quality
videocaptioner process video.mp4 --asr bijian --translator bing --target-language en \
--subtitle-mode hard --quality ultra \
--style-override '{"outline_color": "#ff0000", "primary_color": "#ffffff"}' -o output_en.mp4
5. Subtitle only, output as ASS format (no video synthesis)
videocaptioner process video.mp4 --asr bijian --translator bing --target-language en \
--format ass --no-synthesize -o ./output/
6. Step-by-step control (transcribe → translate → synthesize separately)
# Step 1: Transcribe
videocaptioner transcribe video.mp4 --asr bijian -o video.srt
# Step 2: Translate (bilingual, original text above translation)
videocaptioner subtitle video.srt --translator bing --target-language en --layout source-above -o video_en.srt
# Step 3: Burn into video with rounded background, high quality
videocaptioner synthesize video.mp4 -s video_en.srt --subtitle-mode hard \
--render-mode rounded --quality high -o video_with_subs.mp4
7. Process audio file (auto-skips video synthesis)
videocaptioner process podcast.mp3 --asr bijian --translator bing --target-language en -o ./output/
8. Transcribe other languages (whisper-api)
videocaptioner transcribe french_video.mp4 --asr whisper-api \
--whisper-api-key $OPENAI_API_KEY --language fr -o french.srt
9. Only optimize subtitles with LLM (fix ASR errors, no translation)
videocaptioner subtitle raw_subtitle.srt --no-translate --api-key $OPENAI_API_KEY -o optimized.srt
10. Custom rounded background style with custom font
videocaptioner synthesize video.mp4 -s subtitle.srt --subtitle-mode hard \
--style-override '{"text_color": "#ffffff", "bg_color": "#000000cc", "corner_radius": 10, "font_size": 36}' \
--font-file ./NotoSansSC.ttf --quality high -o styled_video.mp4
Command reference
| Command | Purpose |
|---|---|
transcribe |
Speech → subtitles. Engines: bijian(free) jianying(free) whisper-api whisper-cpp |
subtitle |
Optimize (LLM) and/or translate (LLM/Bing/Google) subtitle files |
synthesize |
Burn subtitles into video with customizable styles |
process |
Full pipeline: transcribe → optimize → translate → synthesize |
download |
Download video from YouTube, Bilibili, etc. |
config |
Manage settings (show set get path init) |
style |
List all subtitle style presets with parameters |
Run videocaptioner <command> --help for full options.
Subtitle styles
Two rendering modes for beautiful subtitles:
ASS mode (default) — outline/shadow style:
- Presets:
default(white+black outline),anime(warm+orange outline),vertical(portrait videos) - Customizable fields:
font_name,font_size,primary_color,outline_color,outline_width,bold,spacing,margin_bottom
Rounded mode — modern rounded background boxes:
- Preset:
rounded(dark text on semi-transparent background) - Customizable fields:
font_name,font_size,text_color,bg_color(#rrggbbaa),corner_radius,padding_h,padding_v,margin_bottom
Style options only work with --subtitle-mode hard.
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.
Environment variables
| Variable | Purpose |
|---|---|
OPENAI_API_KEY |
LLM API key |
OPENAI_BASE_URL |
LLM API base URL |
Exit codes
0 success · 2 bad arguments · 3 file not found · 4 missing dependency · 5 runtime error
Tips
- Use
-qfor scripting (stdout = result path only) - Bing/Google translation is free, no API key needed
bijian/jianyingASR is free but only supports Chinese & English- Run
videocaptioner styleto see all style presets
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核