Subtitles And Text Effects logo

Subtitles And Text Effects

Community
xianyu110
subtitles-and-text-effects

字幕与花字:为带货短视频生成 ASS/SRT 字幕与花字(大标题弹出、关键词高亮、贴纸标签、行动号召按钮),自动避开平台底部/右侧 UI 安全区,并用 ffmpeg/libass 烧录。Use when the user wants subtitles, captions, 字幕, 花字, 大字报, keyword highlight, burned-in captions, SRT/ASS files, or text overlays that don't get covered by TikTok/抖音 UI.

Overview

Publisherxianyu110
Repositoryecommerce-video-skills
Skill namesubtitles-and-text-effects
Stars
110
Forks
16
Bundled files
1
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.

  • 1 bundled files

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

  • Open source

    Published by xianyu110 on GitHub. Read the source before you install it.

Installation

Install the Subtitles And Text Effects 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/xianyu110/ecommerce-video-skills/tree/main/skills/subtitles-and-text-effects
  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/xianyu110/ecommerce-video-skills.git /tmp/ecommerce-video-skills
mkdir -p .claude/skills
cp -r /tmp/ecommerce-video-skills/skills/subtitles-and-text-effects .claude/skills/subtitles-and-text-effects
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Subtitles And Text Effects 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 Subtitles And Text Effects 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 Subtitles And Text Effects 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.

字幕与花字 · Subtitles & Text Effects

一份 ASS 同时放四种样式:Sub(底部字幕)· Hook(弹出式大花字)· Tag(左上角贴纸)· CTA(行动号召按钮)。脚本:scripts/make_subs.py。

Part of ecommerce-video-skills

输入 Inputs

  • 时间轴 JSON(ffmpeg-auto-assemble 自动生成 build/timing.json),或自己写:
json
{"size": [1080, 1920], "cues": [
  {"start": 0.10, "end": 2.70, "text": "冰水撑不到中午?", "style": "Hook"},
  {"start": 0.15, "end": 2.60, "text": "冰水不到中午就**变温**了?", "style": "Sub"},
  {"start": 0.00, "end": 17.0, "text": "AURA 保温杯", "style": "Tag"},
  {"start": 14.2, "end": 17.0, "text": "点击下方链接 ›", "style": "CTA"}]}

标记语法 Markup

写法效果
**关键词**关键词换成高亮色(默认暖黄)
`早上装满冰块到晚上冰块还在`

步骤 Steps

  1. 每条字幕 ≤ 14 个汉字(1080 宽 ≈ 一行),超过用 | 拆。
  2. 每条只高亮 1 个关键词;花字 ≤ 10 字,只在钩子和关键卖点用。
  3. 生成:python scripts/make_subs.py build/timing.json -o build/subs.ass --srt build/subs.srt
  4. 烧录:ffmpeg -i in.mp4 -vf "ass=build/subs.ass" -c:a copy out.mp4
  5. 平台若支持上传字幕文件(如 YouTube / 部分广告平台),同时交付 .srt。

安全区 Safe zones(经验值,以真机为准)

  • 底部约 20%:标题文案、商品卡、购物车 → 字幕 MarginV 默认 26% 高度
  • 右侧约 15%:点赞/评论/分享按钮 → 左右边距 70px,重要信息别贴右边
  • 顶部约 8%:状态栏/搜索 → Hook 放在 13% 高度处
  • 用 python skills/platform-spec-export/scripts/export_platform.py video.mp4 --safe-preview safe.png(在仓库根目录运行) 叠加检查

样式定制

编辑 make_subs.py 里的 header():字号按画面高度比例计算(9:16 / 1:1 / 16:9 都适用),颜色为 ASS &HAABBGGRR。字体自动探测(Noto Sans CJK SC / 思源黑体 / 苹方 / 微软雅黑),也可 --font "思源黑体 CN"。

提示词模板 Prompt template

text
把这段口播稿拆成短视频字幕:每条 ≤14 字,超过用 | 分段;每条最多 1 个关键词用 **加粗**;
另外为钩子镜头和最强卖点各写 1 条 ≤10 字的花字。输出 JSON cues(start/end 先留空)。口播稿:{…}

检查清单 Checklist

  • 字幕不压商品主体、不进底部 20% / 右侧按钮区
  • 每屏最多 2 行;关键词高亮 ≤ 1 个
  • 错别字/品牌拼写检查;数字与配音一致
  • 中文字体已安装(否则会出现方框)

常见问题与修复 Failure fixes

问题修复
中文显示成方框安装 CJK 字体(apt install fonts-noto-cjk)或 --font 指定已安装字体
No such filter: 'ass'ffmpeg 未编译 libass,换官方/发行版完整版 ffmpeg
路径含冒号报错(Windows)用相对路径或把 C: 写成 C\:;脚本已自动转义
字幕和声音不同步用真实配音时长生成 timing(assemble.py 已自动处理)
字幕太小调 header() 中 sub = round(h * 0.037) 的系数

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 Subtitles And Text Effects AI skill do?

字幕与花字:为带货短视频生成 ASS/SRT 字幕与花字(大标题弹出、关键词高亮、贴纸标签、行动号召按钮),自动避开平台底部/右侧 UI 安全区,并用 ffmpeg/libass 烧录。Use when the user wants subtitles, captions, 字幕, 花字, 大字报, keyword highlight, burned-in captions, SRT/ASS files, or text overlays that don't get covered by TikTok/抖音 UI.

Why use Subtitles And Text Effects on TypingMind?

Because you install it once and use it with any model. Subtitles And Text Effects 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 Subtitles And Text Effects in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/xianyu110/ecommerce-video-skills/tree/main/skills/subtitles-and-text-effects. 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 Subtitles And Text Effects?

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 Subtitles And Text Effects?

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

Is the Subtitles And Text Effects AI skill free?

Yes. It is published on GitHub by xianyu110 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 👇