跳到正文
Skillpedia
视频剪辑14k · #11257

krillinai-subtitle

它能做什么

这项技能为视频创建翻译成另一种语言的字幕文件,并可以包含合并的双语版本。适合为其他语言的视频添加字幕的创作者。

适用场景

  • ✓当你有 YouTube 或其他在线视频,并想要另一种语言的字幕的时候。
  • ✓当你有需要添加字幕的本地视频文件的时候。
  • ✓当你除了完整字幕之外,还需要一份简短的竖屏字幕版本的时候。

技能链接

https://github.com/krillinai/OpenCreator/blob/master/skills/krillinai-subtitle/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/krillinai/OpenCreator/blob/master/skills/krillinai-subtitle/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为这个 YouTube 链接制作英文字幕并附上中文翻译,并保留原视频以供后续步骤使用?”

每周 5 个新技能,1 分钟读完。

工作原理

如果平台已有字幕,智能体会使用平台字幕;如果没有,则转录语音,然后翻译文本并生成字幕文件。它会保留原视频,以便后续步骤使用。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

KrillinAI Subtitle

Use this skill for the subtitle stage. Read skills/krillinai-cli/references/cli-contract.md first for binary location, execution working directory, configuration, and JSON behavior.

Command

(cd "$KRILLINAI_CWD" && "$KRILLINAI_CLI" subtitle "<input>" \
  --origin-lang en \
  --target-lang zh_cn \
  --workdir "$WORKDIR" \
  --caption-source any \
  --prepare-video)

Inputs

  • YouTube URL: prefer --caption-source any; platform captions are used first, then Whisper fallback.
  • Local file: use local:/abs/path/video.mp4 or a path accepted by the CLI.
  • Bilibili or other yt-dlp supported links: use when media download works; platform caption behavior may differ, so expect transcription fallback.

Important Flags

Flag Use
--origin-lang Source language, such as en, zh, ja
--target-lang Target language, such as zh_cn
--workdir Dedicated task directory
--caption-source any Prefer platform captions, fallback to transcription
--caption-source whisper Force transcription
--prepare-video Require the original video for later render stages
--bilingual-top=true Put target language on top in bilingual SRT
--subtitle-style-file Merge a JSON subtitle-style override
--dry-run Validate without downloads or AI calls

Outputs

After a real run, read paths from krillinai_manifest.json. Main files:

  • origin_language_srt.srt
  • target_language_srt.srt
  • bilingual_srt.srt
  • short_origin_mixed_srt.srt
  • origin_video.mp4 when media preparation produced or required video
  • origin_audio.mp3 when transcription preparation produced audio

subtitle --dry-run validates command shape but does not write a manifest or output files.

Verification

  • Require terminal JSON with "ok": true.
  • Confirm krillinai_manifest.json exists under --workdir.
  • Spot-check bilingual_srt.srt ordering and short_origin_mixed_srt.srt readability.
  • When --prepare-video was requested, require a non-empty origin_video output.
  • For Agent integration details, read skills/krillinai-cli/references/cli-contract.md.
常见问题

如果视频没有字幕怎么办?

这项技能会自动转录语音,作为备用方案。

它能处理 Bilibili 或本地视频吗?

能。可以使用本地文件和其他受支持的网站,不过字幕结果可能有所不同。

我可以把译文放在上面吗?

可以。双语文件可以把目标语言放在上方。

详情

作者的原始描述

Use when generating subtitles with KrillinAI CLI from a YouTube link, Bilibili/local video, or existing media, including platform caption download, Whisper fallback, translation, bilingual SRT, and short vertical subtitle output.

repo: krillinai/OpenCreator

热度

GitHub 星标
14k
排名
#11257
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能