← Browse

@vorojar/bilingual-subtitle-skill

B

从视频提取字幕,翻译成中文,烧录双语字幕。支持卡拉OK逐词高亮模式。

skillclaude

Install

agr install @vorojar/bilingual-subtitle-skill --target claude

Writes 3 files into .claude/skills/, pinned to git-41a4e292.

  • .claude/skills/bilingual-subtitle-skill/.gitignore
  • .claude/skills/bilingual-subtitle-skill/README.md
  • .claude/skills/bilingual-subtitle-skill/skill.md

Document

双语字幕生成

从视频提取字幕,翻译成中文,烧录双语字幕。支持卡拉OK逐词高亮模式。

用法

/bilingual-subtitle <视频文件> [选项]

常用示例

# 中英文双语字幕(默认)
/bilingual-subtitle video.mp4

# 仅英文字幕
/bilingual-subtitle video.mp4 --source-only

# 英文逐词高亮(卡拉OK模式)
/bilingual-subtitle video.mp4 --karaoke --fontsize 24

一键处理

python "C:\Users\voroj\.claude\skills\bilingual-subtitle\scripts\process.py" <视频>

参数

参数说明默认值
-o, --output输出视频文件<视频名>_<模式>.mp4
-l, --language源语言en
-t, --target目标语言zh-CN
-m, --modelWhisper 模型small
--fontsize字体大小14 (卡拉OK建议 24)
--margin底部边距25
--srt-only仅生成字幕文件-
--chinese-only仅输出中文字幕-
--source-only仅输出原文字幕-
--karaoke卡拉OK模式(逐词高亮)-
--highlight-color高亮颜色 (ASS格式)&H00FFFF& (黄色)
--no-speech-threshold非语音过滤阈值 (0-1)0.6

完整示例

# 中英文双语字幕(默认)
python process.py video.mp4

# 仅英文字幕(不翻译)
python process.py video.mp4 --source-only

# 仅中文字幕(适用于已有英文硬字幕的视频)
python process.py video.mp4 --chinese-only

# 英文逐词高亮(卡拉OK模式)
python process.py video.mp4 --karaoke --fontsize 24

# 卡拉OK + 自定义高亮颜色(红色)
python process.py video.mp4 --karaoke --fontsize 24 --highlight-color "&H0000FF&"

# 仅生成字幕文件(不烧录视频)
python process.py video.mp4 --srt-only

输出

模式字幕文件视频文件
默认(双语)*_bilingual.srt*_bilingual.mp4
--chinese-only*_zh.srt*_zh.mp4
--source-only*_source.srt*_source.mp4
--karaoke*_karaoke.ass*_karaoke.mp4

硬件加速

字幕提取 (Whisper)

平台方案速度
macOS M系列mlx-whisper~15x 实时
NVIDIA GPUfaster-whisper CUDA~8x 实时
CPUfaster-whisper int8~1x 实时

视频编码 (FFmpeg)

平台编码器速度
macOSVideoToolbox~5x 实时
NVIDIA GPUNVENC~8x 实时
AMD GPUAMF~5x 实时
IntelQuickSync~5x 实时
CPUlibx264~1x 实时

依赖

# macOS Apple Silicon
pip install mlx-whisper

# NVIDIA GPU / CPU
pip install faster-whisper

# FFmpeg (必需)
# Windows: 下载并添加到 PATH
# macOS: brew install ffmpeg

Trustgrade B

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • warnLicenseno SPDX license detected

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-41a4e29222a42026-07-31