subtitle-packager

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Subtitle Packager

字幕打包工具

Follow shared release-shell rules in:
  • postplus-shared
    release-shell rules
Use this skill when the transcript already exists and the next problem is:
  • chunking a normalized transcript into subtitle-sized units
  • ASS generation
  • SRT generation
  • VTT generation
  • readable caption chunking
  • packaging timed transcript data for editors
This skill should not call STT models itself.
遵循以下共享的release-shell规则:
  • postplus-shared
    中的release-shell规则
当转录文件已存在,且需要解决以下问题时,可使用本Skill:
  • 将标准化转录文件分割为适合字幕的单元
  • 生成ASS文件
  • 生成SRT文件
  • 生成VTT文件
  • 分割为易读的字幕块
  • 为编辑人员打包带时间轴的转录数据
本Skill不可自行调用STT模型。

Input Rule

输入规则

Expect:
  • a
    normalized-transcript.json
    file produced by
    video-transcription
If timing is missing, say so plainly.
Do not fake subtitle timing unless the user explicitly asks for heuristic timing.
预期输入:
  • video-transcription
    生成的
    normalized-transcript.json
    文件
若缺少时间轴信息,请直接说明。
除非用户明确要求使用启发式时间轴,否则不得伪造字幕时间轴。

Scripts

脚本文件

  • scripts/chunk_normalized_transcript.mjs
  • scripts/render_ass_from_normalized.mjs
  • scripts/transcript_json_to_srt.mjs
  • scripts/text_to_srt.mjs
  • scripts/chunk_normalized_transcript.mjs
  • scripts/render_ass_from_normalized.mjs
  • scripts/transcript_json_to_srt.mjs
  • scripts/text_to_srt.mjs

Read These References

参考文档

  • references/ass-contract.md
  • references/chunk-modes.md
  • references/output-shape.md
  • references/ass-contract.md
  • references/chunk-modes.md
  • references/output-shape.md

Release-Shell Execution Contract

Release-Shell执行规范

  • keep chunking inputs, intermediate subtitle JSON, and render artifacts under
    <work-folder>/.postplus/subtitle-packager/
  • keep only final user-facing subtitle exports outside
    .postplus/
  • start with a bounded first pass on one normalized transcript before broader batch packaging
  • if normalized timing is missing or invalid, stop immediately instead of inventing subtitle timing or switching to ad hoc shell glue
  • 将分块输入文件、中间字幕JSON文件及渲染产物存储在
    <work-folder>/.postplus/subtitle-packager/
    目录下
  • 仅将面向用户的最终字幕导出文件放在
    .postplus/
    目录外
  • 在进行大规模批量打包前,先对单个标准化转录文件进行有限次数的首轮处理
  • 若标准化时间轴缺失或无效,请立即停止处理,不得自行生成字幕时间轴或切换为临时shell脚本处理