Native Subtitle Quote Image logo

Native Subtitle Quote Image

CommunityPopular
chengyi-ai
native-subtitle-quote-image

将本地视频或用户有权处理的在线视频,经过来源获取、文字稿定位、选题选句、精确取帧、紧凑裁切、拼图和逐张质检,制作成 3:4 或保留画面原比例的视频字幕长图。支持两种明确分开的输出:保留画面内已烧录字幕的原生字幕模式,以及把已审核的时间点与台词绘制到真实视频帧上的脚本字幕模式。用户要求原生字幕截图、字幕帧拼图、YouTube 金句长图、台词截图、不重绘字幕、自定义中文台词,或调整主图比例、字幕区域、台词间隔和美感时使用。

Overview

Publisherchengyi-ai
Repositorynative-subtitle-quote-image
Skill namenative-subtitle-quote-image
Stars
1.1K
Forks
131
Bundled files
9
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 9 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by chengyi-ai on GitHub. Read the source before you install it.

Installation

Install the Native Subtitle Quote Image AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/chengyi-ai/native-subtitle-quote-image/tree/main/skills/native-subtitle-quote-image
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/chengyi-ai/native-subtitle-quote-image.git /tmp/native-subtitle-quote-image
mkdir -p .claude/skills
cp -r /tmp/native-subtitle-quote-image/skills/native-subtitle-quote-image .claude/skills/native-subtitle-quote-image
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Native Subtitle Quote Image in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Native Subtitle Quote Image on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Native Subtitle Quote Image is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

视频字幕拼图

先确认用户想要的字幕模式,再判断素材是否支持。不要把两种模式混为一种,也不要默默从原生字幕切到绘制字幕。

开始时确认模式

如果用户没有明确指定模式,先用用户当前使用的语言询问,并简短说明两种选择。中文提问可直接使用:

您当前是选择原生字幕还是脚本字幕?原生字幕会保留视频画面里已有的字幕,不重绘文字;脚本字幕会把您确认过的台词或翻译后期绘制到真实视频帧上,并标明是后期字幕。

用户已明确说“原生字幕”“保留画面原字幕”“不重绘字幕”,或“脚本字幕”“把指定台词/翻译绘制到画面上”时,按其选择继续,不重复询问。用户尚未选择时,可以只读检查素材以说明哪种模式可行,但不要执行模式专属的渲染;等用户选择后再继续。若所选模式与素材不匹配,说明具体原因并征求用户是否改选,不能自行切换。

非阻塞版本检查

每个新任务开始、处理素材之前运行一次:

bash
python3 "<SKILL_DIR>/scripts/check_update.py" --json
  • 脚本从 Skill 内的 VERSION 读取本地版本,只访问本项目的 GitHub Latest Release;默认 24 小时内复用一次缓存。
  • 结果为 update_available 时,用一句话告诉用户当前版本、最新版本和 Release 链接,然后继续当前任务。只提醒,不自动更新、不覆盖本地 Skill。
  • 结果为 up_to_date 时无需打扰用户。结果为 unavailable 时也不要阻塞当前任务;若只是运行环境禁止联网,可申请对 GitHub API 的只读访问并用 --force 重试一次,未获授权就继续任务。
  • 缓存只包含检查时间、最新版本号和 Release 链接,不写入仓库,也不记录账号、素材或使用行为。

模式路由

条件模式成品文字来源命令
关闭播放器 CC 后,截图里仍有字幕;用户要求保留原字幕原生字幕模式视频画面像素render
视频没有需要的烧录字幕,但用户要求把经确认的台词、翻译或观点排成案例风格脚本字幕模式已审核 JSON 中的 textrender-script
  • 原生模式不得 OCR 后重绘、翻译、改写或覆盖字幕。
  • 脚本模式必须明确称为“脚本字幕”或“后期绘制字幕”,不得宣称文字是画面原字幕。
  • 脚本台词必须能回到原视频、用户稿件或其他明确来源复核;不编造人名、数据、引语或翻译含义。
  • 用户只说“保留原字幕”时,不能因为原字幕难处理就转脚本模式。

按任务读参考文件

  • YouTube 等 URL:先读 references/yt-dlp-and-transcripts.md,获取用户有权处理的视频、元数据和辅助时间轴。URL 任务不能在一次公开请求失败后直接退回“只支持本地视频”:若 YouTube 返回机器人登录验证、年龄验证或用户自己的非公开视频限制,先说明原因并取得授权,再按参考文件用 yt-dlp --cookies-from-browser chrome 继续。
  • 读长视频 → 选题 → 写文章/帖子 → 配图:读 references/end-to-end-workflow.md。
  • 台词条太高、间隔太宽、缺少美感:读 references/visual-style.md。
  • 本地短视频且时间点已确定:直接执行下面的核心流程。

环境与路径

将 <SKILL_DIR> 解析为当前 SKILL.md 所在目录的绝对路径;不要假设 Agent 的工作目录就是 Skill 目录。

bash
# 本地原生字幕
python3 "<SKILL_DIR>/scripts/check_environment.py"

# 中日韩脚本字幕
python3 "<SKILL_DIR>/scripts/check_environment.py" --script-mode

# URL + 脚本字幕
python3 "<SKILL_DIR>/scripts/check_environment.py" --url-mode --script-mode

核心依赖为 Python 3.10+、Pillow,以及 FFmpeg 或 imageio-ffmpeg。URL 模式另需 yt-dlp 和 YouTube 完整解析所需的 JavaScript runtime。环境检查只报告状态;缺失时先说明用途并取得授权,再运行:

bash
python3 -m pip install -r "<SKILL_DIR>/requirements.txt"

不擅自修改系统 Python、shell 配置、浏览器 Cookies 或包管理器。Chrome Cookie 只是在无 Cookie 请求被 YouTube 登录验证拦截后的受控恢复路径;首次读取前必须说明用途并取得用户授权。

共同的默认版式

  • 原生字幕默认使用内容自适应布局:保留源宽度,高度为主图和字幕条之和,整图统一等比缩放。用户未指定比例时,不主动添加 --aspect 3:4。
  • 脚本字幕默认输出 3:4、1440×1920。
  • 默认使用 5 个严格递增的时间点:第一帧是主画面,其余四帧是字幕条。
  • 两种模式每张图最多 7 个时间点(1 个主画面 + 6 个字幕条);台词更多时拆成多张图,不压缩字幕条。
  • 脚本固定布局的 4 个字幕条时,主画面约占 70%,每条约占 7.5%。原生模式不强制这个比例,第一句和后续字幕必须保持同一缩放倍数;原视频字号不同则保留差异,不重绘文字。两种模式条间距都为 0。
  • 原生模式显式 --aspect 3:4 或 --layout fixed 时,默认 --fit crop:自动识别每句字幕左右边界,对整张拼图统一裁去两侧,最多裁到字幕安全边界,剩余差额留黑边;任一句识别不到字幕边界时不裁切、整图留边。人物偏离中心时用 --crop-center(0–1)移动裁切窗口;用户要求不裁画面时用 --fit pad。不得单独放大主图来填满。--hero-fraction 只调整源主图裁切高度,受真实帧高度限制,不保证占最终含边画布的该比例。脚本模式只有自动布局确实不适用时才传它。
  • 不覆盖已有成品。只有用户明确要替换时才添加 --overwrite。
  • 源视频低清时可输出 1440×1920 版面,但必须说明这不等于真实清晰度提升。

保留画面原比例

“人物原比例 / 不裁横屏 / 原生尺寸”是画面几何要求,不等于选择原生字幕模式。字幕来源仍按用户的选择处理。

  • 用户要求保留完整横屏构图时使用 --layout natural:保留源宽度,高度按主画面与字幕条相加;不再强制 3:4。
  • 不传 --width 时保留源宽度;传入宽度时仅等比缩放。裁切后禁止把画面 resize 回原来的宽高,也禁止把成品直接拉成 1440×1920。
  • 原生字幕模式保留从画面顶部到 --band-bottom 的主图和完整字幕条;不重绘文字。
  • 脚本字幕模式可用 --frame-top / --frame-bottom 仅裁去不需要的源画面区域,默认保留全帧。先预览边界,不能裁掉人物关键部位;--band-center 相对裁切后的画面。
  • natural 不与 --aspect / --hero-fraction 合用;70% 主图验收只适用于脚本固定布局。两种布局都不得非等比拉伸。
bash
python3 "<SKILL_DIR>/scripts/native_subtitle_stitch.py" render-script VIDEO \
  --script script.json --out natural.jpg --layout natural \
  --frame-bottom 0.72

上例 0.72 只是裁切示例,不是所有视频的默认值。

共同前半流程

1. 检查来源与字幕类型

确认本地视频或 URL,素材使用权,视频时长、语言和目标图片数。用真实截图判断字幕是烧录字幕还是独立字幕轨,不能只看是否下载到 VTT/SRT。

时间点不明时,先生成候选帧总览:

bash
python3 "<SKILL_DIR>/scripts/native_subtitle_stitch.py" sample VIDEO \
  --out candidate-contact-sheet.jpg

已有文字稿候选时间点时,围绕每个点生成前、中、后三帧:

bash
python3 "<SKILL_DIR>/scripts/native_subtitle_stitch.py" sample VIDEO \
  -t 61.2 -t 68.9 -t 74.5 -t 82.0 -t 88.4 \
  --around 0.8 --out focused-candidates.jpg

2. 选主题与稳定帧

一张图只表达一个连贯观点。候选句需要语义递进,并且每个时间点都能回到视频验证。避免空字幕、同句重复、字幕切换残影、转场、黑帧、广告贴片、播放器 UI 和人物闭眼。

原生字幕模式

3A. 预览字幕区域

单行字幕从 0.78–0.96 开始;两行字幕或位置偏高时,先预览再扩大到例如 0.62–0.96。

bash
python3 "<SKILL_DIR>/scripts/native_subtitle_stitch.py" band VIDEO -t 61.2 \
  --band-top 0.78 --band-bottom 0.96 --out band-preview.jpg

4A. 建立 manifest 并渲染

json
{
  "images": [
    {
      "title": "模型独立工作时长正在快速增长",
      "times": [61.6, 69.3, 75.0, 82.4, 88.8]
    }
  ]
}
bash
python3 "<SKILL_DIR>/scripts/native_subtitle_stitch.py" render VIDEO \
  --manifest manifest.json --out-dir OUTPUT_DIR \
  --band-top 0.78 --band-bottom 0.96

title 只用于文件名,不画进图片。times 必须来自已回看的稳定帧。输出包含逐张 JPG、原生字幕时间点.json 和 final_contact_sheet.jpg。

脚本字幕模式

3B. 建立已审核的时间点 + 台词 JSON

json
{
  "lines": [
    {"t": 61.6, "text": "第一句已核对台词"},
    {"t": 69.3, "text": "第二句已核对台词"},
    {"t": 75.0, "text": "第三句已核对台词"},
    {"t": 82.4, "text": "第四句已核对台词"},
    {"t": 88.8, "text": "第五句已核对台词"}
  ]
}
  • t 必须严格递增且小于视频时长。
  • text 必须是已核对的单行台词;过长时拆句,不靠极小字号硬塞。
  • 翻译台词要先核对含义、人名、数字和专有名词。
  • 第一帧优先表情、手势和构图,其余帧优先台词连贯与背景可读性。

4B. 渲染脚本字幕

bash
python3 "<SKILL_DIR>/scripts/native_subtitle_stitch.py" render-script VIDEO \
  --script script.json --out OUTPUT.jpg \
  --aspect 3:4 --width 1440

脚本会尝试 macOS、Windows 和 Linux 常见 CJK 字体。无法自动找到时,用 --font /path/to/font.ttc 指定已获授权的字体。需要调整字幕条在原帧中的垂直采样位置时,使用 --band-center;不要把它当作行距参数。

逐张质检与有界返工

先看缩略总览,再打开每张原尺寸 JPG。

  • 字幕完整、稳定、无重复,时间顺序与原视频一致。
  • 原生模式没有改字;脚本模式的文字与已审核 JSON 一致。
  • 主体完整,没有异常切脸、巨大空白、无关 UI 或变形。
  • 原生模式检查第一句与后续字幕是否使用同一缩放倍数、没有横向裁字;固定画布允许外侧留边。--fit crop 的成品要逐张确认每句字幕两端完整、人物没有被两侧裁切切脸,并在交付中说明渲染输出的裁切或留边结果。脚本固定布局默认四条时主图约占 68–72%;内容块之间没有额外间距。
  • 脚本模式的字号、描边、对比度在原尺寸与手机缩略图中都可读。
  • 文件数量、尺寸、比例、JSON 和总览一致。

发现问题时只调整对应变量:时间点通常移动 0.3–1.5 秒;原生字幕被裁时调整 band 边界;台词条太高时先恢复自动布局;文字过长时先拆句。连续三轮仍找不到稳定画面时,换片段或报告限制,不无限微调。

与其他工具或 Skill 协作

  • yt-dlp:获取用户有权处理的在线视频、元数据和字幕轨;不负责最终渲染。
  • 字幕轨或 Whisper:生成带时间戳的内容索引。原生模式只用它定位;脚本模式可把已复核文字写入 JSON。
  • 视频理解、选题或内容分析 Skill:提名主题、时间范围和句子顺序。
  • 写作 Skill:产生配套文章或帖子;它不能在原生模式中改变画面字幕。
  • 本 Skill:管理最终时间点、真实视频帧、字幕来源标识、拼图和视觉 QA。

复用上游已经下载的视频、文字稿和缓存,不重复消耗网络或转写成本。不假设用户一定安装了某个命名 Skill;缺少上游 Skill 时,自行完成最低限度的文字稿阅读和主题选择。

停止条件

  • 用户没有下载、处理或发布来源素材的权限。
  • 链接需要绕过 DRM、付费墙、地区限制或其他访问控制。
  • 用户要求原生字幕,但画面没有烧录字幕;此时先说明,只有用户同意才转脚本模式。
  • 原生模式找不到字幕完整稳定的帧。
  • 脚本模式的台词或翻译尚未核对,或没有可用 CJK 字体。
  • 源画质、遮挡或 UI 严重到无法达到可读交付。

登录、年龄验证、机器人验证或用户自己的非公开视频需要 Cookies 时,必须先取得授权;授权后优先让 yt-dlp 通过 --cookies-from-browser chrome 临时读取用户自己的已登录会话,而不是让用户粘贴密码或导出 Cookie 文件。不得把浏览器数据写入仓库。

交付

提供输出路径、逐张成品、时间点/lines JSON、总览图与已完成的视觉和技术检查。明确标记使用的字幕模式。只有用户需要分享包时再生成 ZIP;不得把未逐张打开检查的图片报告为完成。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Native Subtitle Quote Image AI skill do?

将本地视频或用户有权处理的在线视频,经过来源获取、文字稿定位、选题选句、精确取帧、紧凑裁切、拼图和逐张质检,制作成 3:4 或保留画面原比例的视频字幕长图。支持两种明确分开的输出:保留画面内已烧录字幕的原生字幕模式,以及把已审核的时间点与台词绘制到真实视频帧上的脚本字幕模式。用户要求原生字幕截图、字幕帧拼图、YouTube 金句长图、台词截图、不重绘字幕、自定义中文台词,或调整主图比例、字幕区域、台词间隔和美感时使用。

Why use Native Subtitle Quote Image on TypingMind?

Because you install it once and use it with any model. Native Subtitle Quote Image is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Native Subtitle Quote Image in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/chengyi-ai/native-subtitle-quote-image/tree/main/skills/native-subtitle-quote-image. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Native Subtitle Quote Image?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Native Subtitle Quote Image?

As many as you like. As long as a model supports skills, you can use Native Subtitle Quote Image with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Native Subtitle Quote Image AI skill free?

Yes. It is published on GitHub by chengyi-ai under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇