skill-captions
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill-字幕
Skill-字幕
Separate subtitle timing from subtitle appearance:
- Let own ASR, phrase grouping, timestamps, SRT/VTT, and
ra-audio-to-subtitles.caption-qc.json - Let this skill own typography, panel geometry, fixed anchoring, preview, overlay rendering, burn-in, and render QC.
- Never estimate production timing from character count, scene duration, or TTS segment duration.
将字幕时间轴与字幕外观分离:
- 让 负责 ASR、短语分组、时间戳、SRT/VTT 和
ra-audio-to-subtitles。caption-qc.json - 让本 skill 负责字体排版、面板几何、固定锚定、预览、叠加渲染、烧录和渲染 QC。
- 绝不根据字符数、场景时长或 TTS 分段时长估算生产级时间轴。
Required workflow
必需工作流
- Lock the final narration audio or final merged video.
- Run unless the project already has the canonical caption artifacts described in
ra-audio-to-subtitles.references/timing-contract.md - Require to report
caption-qc.json.status: pass - Select a style from . Use
references/style-registry.jsonwhen the contract does not specify another style.anchor-dark - Generate a representative still preview before rendering a full video.
- Inspect the preview against .
references/layout-qc.md - Render the captioned derivative. Preserve the clean video and portable SRT/VTT.
- Run and archive its JSON report.
scripts/validate_caption_render.py
- 锁定最终旁白音频或最终合并视频。
- 除非项目已经包含 所描述的规范字幕产物,否则运行
references/timing-contract.md。ra-audio-to-subtitles - 要求 报告
caption-qc.json。status: pass - 从 中选择样式。如果契约未指定其他样式,则使用
references/style-registry.json。anchor-dark - 在渲染完整视频之前,先生成一张有代表性的静帧预览。
- 根据 检查预览效果。
references/layout-qc.md - 渲染带字幕的衍生版本。保留无字幕视频和可移植的 SRT/VTT。
- 运行 并归档其 JSON 报告。
scripts/validate_caption_render.py
Registered styles
已注册样式
anchor-darkreferences/style-anchor-dark.mdanchor-lightanchor-darkreferences/style-anchor-light.mdanchor-darkScale every 1080p metric by . Render 4K captions at 2×
their 1080p measurements; never upscale a rasterized 1080p subtitle layer.
target_height / 1080anchor-darkreferences/style-anchor-dark.mdanchor-lightanchor-darkreferences/style-anchor-light.mdanchor-dark将每个 1080p 度量值按 缩放。以 1080p 度量值的两倍渲染 4K 字幕;绝不放大多栅格化的 1080p 字幕图层。
target_height / 1080Commands
命令
Preview a QC-passed project:
bash
python3 .claude/skills/skill-captions/scripts/render_captions.py \
final.mp4 media/captions/captions.json \
--qc media/captions/caption-qc.json \
--preview qc/caption-preview.png \
--preview-onlyBurn the default style:
bash
python3 .claude/skills/skill-captions/scripts/render_captions.py \
final-clean.mp4 media/captions/captions.json \
--qc media/captions/caption-qc.json \
--out renders/final-captioned.mp4 \
--preview qc/caption-preview.pngBurn the light translucent style:
bash
python3 .claude/skills/skill-captions/scripts/render_captions.py \
final-clean.mp4 media/captions/captions.json \
--qc media/captions/caption-qc.json \
--style anchor-light \
--out renders/final-captioned.mp4 \
--preview qc/caption-preview.pngSkip an interval that already contains burned captions:
bash
python3 .claude/skills/skill-captions/scripts/render_captions.py \
final-clean.mp4 media/captions/captions.json \
--qc media/captions/caption-qc.json \
--exclude 0:23.936 \
--out renders/final-captioned.mp4Create a reusable transparent caption band:
bash
python3 .claude/skills/skill-captions/scripts/render_captions.py \
final-clean.mp4 media/captions/captions.json \
--qc media/captions/caption-qc.json \
--overlay-out renders/caption-band.movValidate the result:
bash
python3 .claude/skills/skill-captions/scripts/validate_caption_render.py \
--source final-clean.mp4 \
--render renders/final-captioned.mp4 \
--captions media/captions/captions.json \
--qc media/captions/caption-qc.json \
--out qc/caption-render-qc.json预览一个已通过 QC 的项目:
bash
python3 .claude/skills/skill-captions/scripts/render_captions.py \
final.mp4 media/captions/captions.json \
--qc media/captions/caption-qc.json \
--preview qc/caption-preview.png \
--preview-only烧录默认样式:
bash
python3 .claude/skills/skill-captions/scripts/render_captions.py \
final-clean.mp4 media/captions/captions.json \
--qc media/captions/caption-qc.json \
--out renders/final-captioned.mp4 \
--preview qc/caption-preview.png烧录浅色半透明样式:
bash
python3 .claude/skills/skill-captions/scripts/render_captions.py \
final-clean.mp4 media/captions/captions.json \
--qc media/captions/caption-qc.json \
--style anchor-light \
--out renders/final-captioned.mp4 \
--preview qc/caption-preview.png跳过已包含烧录字幕的时间区间:
bash
python3 .claude/skills/skill-captions/scripts/render_captions.py \
final-clean.mp4 media/captions/captions.json \
--qc media/captions/caption-qc.json \
--exclude 0:23.936 \
--out renders/final-captioned.mp4创建可复用的透明字幕带:
bash
python3 .claude/skills/skill-captions/scripts/render_captions.py \
final-clean.mp4 media/captions/captions.json \
--qc media/captions/caption-qc.json \
--overlay-out renders/caption-band.mov验证结果:
bash
python3 .claude/skills/skill-captions/scripts/validate_caption_render.py \
--source final-clean.mp4 \
--render renders/final-captioned.mp4 \
--captions media/captions/captions.json \
--qc media/captions/caption-qc.json \
--out qc/caption-render-qc.jsonHard rules
硬性规则
- Use the final audio/video as the only timing source.
- Consume start/end values directly.
captions.json - Refuse final burn-in when caption QC is missing or failed.
- Keep a fixed bottom anchor. Let multiline panels grow upward.
- Keep captions inside the frame and clear of titles, UI, faces, and PiP.
- Keep English model/product tokens intact.
- Preserve one canonical caption timeline across renderers.
- Keep the clean master; a burned-caption MP4 is a derivative.
- For a new or materially changed style, show a short preview before the full render.
- Do not add karaoke, behind-person typography, VFX captions, or animated hero
words unless the user explicitly requests the separate lane.
embedded-captions
- 仅使用最终音频或视频作为时间轴来源。
- 直接使用 中的 start/end 值。
captions.json - 如果字幕 QC 缺失或未通过,则拒绝执行最终烧录。
- 保持固定的底部锚点。允许多行面板向上扩展。
- 确保字幕位于画面内,并避开标题、UI、人脸和 PiP。
- 保持英文模型和产品词元原样。
- 在所有渲染器之间共用一条规范字幕时间轴。
- 保留无字幕母版;烧录字幕的 MP4 是衍生版本。
- 对于新样式或发生实质变化的样式,在完整渲染之前先展示简短预览。
- 除非用户明确要求使用独立的 工作流,否则不要添加 karaoke、人物背后排版、VFX 字幕或动画化重点词。
embedded-captions
Integration contract
集成契约
Video orchestrators should call this skill after .
Handoff contracts may set to or ;
otherwise use .
Renderers may reproduce the registered CSS in Remotion or HyperFrames, but
must preserve the style metrics and fixed-anchor behavior.
ra-audio-to-subtitlescaption_styleanchor-darkanchor-lightanchor-dark视频编排器应在 之后调用本 skill。交接契约可以将 设置为 或 ;否则使用 。
ra-audio-to-subtitlescaption_styleanchor-darkanchor-lightanchor-dark渲染器可以在 Remotion 或 HyperFrames 中复现已注册的 CSS,但必须保留样式度量值和固定锚点行为。