krillinai-subtitle
它能做什么
这项技能为视频创建翻译成另一种语言的字幕文件,并可以包含合并的双语版本。适合为其他语言的视频添加字幕的创作者。
适用场景
- ✓当你有 YouTube 或其他在线视频,并想要另一种语言的字幕的时候。
- ✓当你有需要添加字幕的本地视频文件的时候。
- ✓当你除了完整字幕之外,还需要一份简短的竖屏字幕版本的时候。
技能链接
https://github.com/krillinai/OpenCreator/blob/master/skills/krillinai-subtitle/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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.mp4or 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.srttarget_language_srt.srtbilingual_srt.srtshort_origin_mixed_srt.srtorigin_video.mp4when media preparation produced or required videoorigin_audio.mp3when 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.jsonexists under--workdir. - Spot-check
bilingual_srt.srtordering andshort_origin_mixed_srt.srtreadability. - When
--prepare-videowas requested, require a non-emptyorigin_videooutput. - 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
评论
- …
同一仓库的更多技能
krillinai-cli
14k帮你的智能体使用 KrillinAI 命令行工具,从一段视频中生成字幕、配音、渲染视频和封面图。
krillinai-cover
14k帮你的智能体根据文字提示为视频生成封面图,然后检查图片和保存的提示词。
krillinai-pipeline
14k帮你的智能体在执行每个步骤之前,检查包含字幕、配音和渲染等多个 KrillinAI 视频阶段的计划。
krillinai-render-horizontal
14k让你的智能体使用 KrillinAI 渲染带双语字幕的横屏视频,或带目标语言字幕的配音版本。