lov-video-chapter

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

视频章节师 · Video Chapters

视频章节师 · Video Chapters

Build a complete chapter-bar workflow from semantic planning to final video. Keep every stage connected through one
chapter-project.json
.
构建从语义规划到最终视频的完整章节条工作流。 通过一个
chapter-project.json
串联每个阶段。

Route the request

处理请求

  • Read
    skills/chapter-plan/SKILL.md
    for subtitle analysis and editorial cuts.
  • Read
    skills/chapter-design/SKILL.md
    for React Studio editing and styling.
  • Read
    skills/chapter-render/SKILL.md
    for transparent overlay or burned video.
  • Read
    skills/chapter-export/SKILL.md
    for 剪映/CapCut and other editor packages.
  • Run only the stages the user requests. Run all four for an end-to-end request.
  • 读取
    skills/chapter-plan/SKILL.md
    ,了解字幕分析与编辑剪辑。
  • 读取
    skills/chapter-design/SKILL.md
    ,了解 React Studio 中的编辑与样式设置。
  • 读取
    skills/chapter-render/SKILL.md
    ,了解透明叠加层或烧录视频的制作方式。
  • 读取
    skills/chapter-export/SKILL.md
    ,了解剪映/CapCut 及其他编辑器素材包的导出方式。
  • 仅运行用户请求的阶段。对于端到端请求,运行全部四个阶段。

End-to-end workflow

端到端工作流

1. Analyze the subtitles

1. 分析字幕

bash
python3 scripts/subtitle_chapters.py \
  --input "/path/to/subtitles.srt" \
  --segments 5 \
  --output "/tmp/video-chapter-analysis.md"
Read the analysis pack completely. Select semantic transitions rather than equal-duration cuts. Start at
00:00
, align later cuts to subtitle cues, and avoid cutting a sentence.
bash
python3 scripts/subtitle_chapters.py \
  --input "/path/to/subtitles.srt" \
  --segments 5 \
  --output "/tmp/video-chapter-analysis.md"
完整读取分析包。应根据语义转场选择章节,而不是按时长均分切割。起点设为
00:00
,后续切点与字幕提示对齐,并避免在一句话中间切断。

2. Create the project

2. 创建项目

Write a UTF-8 chapter list:
text
00:00 开场与目标 | 展示成片并说明这次要完成什么
04:16 挑选并改造 Skill | 判断现有工具并完成适配
Create the canonical project:
bash
python3 scripts/chapter_project.py create \
  --chapters "/path/to/chapters.txt" \
  --video "/path/to/video.mp4" \
  --output "/path/to/chapter-project.json"
Read
references/project-format.md
when editing project JSON directly.
编写 UTF-8 章节列表:
text
00:00 开场与目标 | 展示成片并说明这次要完成什么
04:16 挑选并改造 Skill | 判断现有工具并完成适配
创建规范项目文件:
bash
python3 scripts/chapter_project.py create \
  --chapters "/path/to/chapters.txt" \
  --video "/path/to/video.mp4" \
  --output "/path/to/chapter-project.json"
直接编辑项目 JSON 时,读取
references/project-format.md
。

3. Refine in React Studio

3. 在 React Studio 中细化

bash
cd studio
npm install
npm run dev
Import
chapter-project.json
, select the local source video, edit chapter boundaries and titles, adjust styling, then export the updated JSON. Treat the Studio preview as the visual approval surface.
bash
cd studio
npm install
npm run dev
导入
chapter-project.json
,选择本地源视频,编辑章节边界和标题,调整样式,然后导出更新后的 JSON。将 Studio 预览作为视觉验收界面。

4. Render

4. 渲染

Install Pillow once when needed:
bash
python3 -m pip install -r requirements.txt
Create a transparent overlay:
bash
python3 scripts/render_chapter_bar.py overlay \
  --project "/path/to/chapter-project.json" \
  --output "/path/to/chapter-overlay.mov"
Burn the overlay into the source video:
bash
python3 scripts/render_chapter_bar.py burn \
  --project "/path/to/chapter-project.json" \
  --output "/path/to/video-with-chapters.mp4"
Create a 剪映-ready package:
bash
python3 scripts/render_chapter_bar.py package \
  --project "/path/to/chapter-project.json" \
  --output "/path/to/chapter-package"
需要时安装一次 Pillow:
bash
python3 -m pip install -r requirements.txt
创建透明叠加层:
bash
python3 scripts/render_chapter_bar.py overlay \
  --project "/path/to/chapter-project.json" \
  --output "/path/to/chapter-overlay.mov"
将叠加层烧录到源视频中:
bash
python3 scripts/render_chapter_bar.py burn \
  --project "/path/to/chapter-project.json" \
  --output "/path/to/video-with-chapters.mp4"
创建可用于剪映的素材包:
bash
python3 scripts/render_chapter_bar.py package \
  --project "/path/to/chapter-project.json" \
  --output "/path/to/chapter-package"

Validation

验证

Run before delivery:
bash
python3 scripts/chapter_project.py validate \
  --project "/path/to/chapter-project.json"
Confirm:
  • chapters are chronological and contiguous;
  • the final chapter ends at the project duration;
  • titles match the following content;
  • the Studio preview matches the requested visual direction;
  • the overlay contains an alpha channel;
  • the burned MP4 preserves source audio;
  • the editor package contains JSON, timestamps, CSV, overlay, and instructions.
交付前运行:
bash
python3 scripts/chapter_project.py validate \
  --project "/path/to/chapter-project.json"
确认:
  • 章节按时间顺序排列且相互衔接;
  • 最后一个章节结束于项目时长;
  • 标题与后续内容相符;
  • Studio 预览符合所要求的视觉方向;
  • 叠加层包含 alpha 通道;
  • 烧录后的 MP4 保留源音频;
  • 编辑器素材包包含 JSON、时间戳、CSV、叠加层和说明文档。

Output policy

输出策略

  • Prefer a transparent ProRes 4444 MOV for 剪映/CapCut.
  • Use burned MP4 when the user wants a final publishable file.
  • Describe transparent-video import as asset integration.
  • Keep editor-specific draft writers in an experimental adapter layer.
  • Preserve explicit paths; never assume a private workspace.
  • 为剪映/CapCut 优先使用透明 ProRes 4444 MOV。
  • 用户需要最终可发布文件时,使用烧录后的 MP4。
  • 将透明视频导入描述为素材集成。
  • 将编辑器专用的草稿写入器保留在实验性适配器层。
  • 保留显式路径;绝不假定存在私有工作区。

Runtime context (shared)

运行时上下文(共享)

运行前读取本 Skill 包的
skill.yaml
,由宿主提供
skill-runtime/v1
上下文。字段解析顺序为:当前请求、项目上下文、个人 Preferences、品牌 Profile、通用默认值。
  • 只使用 Manifest 声明的字段;Profile 保存公开品牌事实,Preferences 保存个人工作偏好。
  • required: true
    字段缺失时,按 Manifest 的问题配置向用户提出一个聚焦问题;用户明确同意后再保存回答。
  • 报错提供可复制的
    context_id
    、字段路径与来源,诊断内容避开秘密、完整私人路径和原始配置。
运行前读取本 Skill 包的
skill.yaml
,由宿主提供
skill-runtime/v1
上下文。字段解析顺序为:当前请求、项目上下文、个人 Preferences、品牌 Profile、通用默认值。
  • 只使用 Manifest 声明的字段;Profile 保存公开品牌事实,Preferences 保存个人工作偏好。
  • required: true
    字段缺失时,按 Manifest 的问题配置向用户提出一个聚焦问题;用户明确同意后再保存回答。
  • 报错提供可复制的
    context_id
    、字段路径与来源,诊断内容避开秘密、完整私人路径和原始配置。

通用反馈闭环

通用反馈闭环

用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
  1. 先判断意见是
    task-specific
    (仅本次)还是
    reusable
    (可跨任务复用)。
  2. task-specific
    只修改当前任务,不改 Skill。
  3. reusable
    先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。
  4. 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。
  5. reusable
    修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。
用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
  1. 先判断意见是
    task-specific
    (仅本次)还是
    reusable
    (可跨任务复用)。
  2. task-specific
    只修改当前任务,不改 Skill。
  3. reusable
    先确定作用域:领域规则先更新对应的 canonical Skill;适用于所有 Skill 的规则先更新共享规范。
  4. 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。
  5. reusable
    修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。