使用方法
- 复制安装命令,在自己的智能体环境安装前先检查源码包。
- 从原始文档核对所需工具、凭据和支持的宿主。
- 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/hahadu4520/vlog-cut --skill narration-cut开始前需了解
- 安装不包含模型订阅、API 额度或访问文件的权限。
- 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。
narration-cut
Three CLIs, used in sequence. Each is also fine to call alone.
| step | CLI | what it does |
|---|---|---|
| plan | vlog-cut-plan | timing + assets → draft timeline.json (algorithmic) |
| validate | vlog-cut-validate | structural + temporal sanity check on timeline.json |
| render | vlog-cut-render | timeline + narration → rough_cut.mp4 |
When to use
Trigger on:
- "对齐镜头 / 排时间线 / 出粗剪"
- "cut to narration / build timeline / render the rough cut"
- the user has both
timing.jsonandassets_index.jsonand wants a video
Skip when:
- either timing or assets index is missing — go back to
tts-from-scriptorvideo-asset-index - the user wants subtitles only — that's
burn-subtitles-cn(v0.2)
Step 1 — plan (draft a timeline)
vlog-cut-plan \
--timing <out>/timing.json \
--assets <out>/assets_index.json \
--out <out>/timeline.json \
--size 1920x1080 \
--fps 30The algorithm scores clips by chapters match, tag overlap with the section, highlight bonus, and a "already used" penalty for variety. It's a starting point, not a final answer.
The expected workflow is: Claude reads timeline.json, opens the relevant sheets/<stem>.jpg for any shot it's unsure about, then rewrites timeline.json by hand to swap in better picks. This is a checkpoint — don't render until the user has signed off.
Step 2 — validate (before you render)
vlog-cut-validate \
--timeline <out>/timeline.json \
--src <clips_folder> \
--timing <out>/timing.json # optional but recommendedCatches:
- missing source clips
in + durexceeding source duration- shots not covering line audio (video would end first)
- duplicate / mismatched line ids
Exit code: 0 = clean, 1 = warnings only, 2 = errors. Don't render on exit 2.
Step 3 — render (make the mp4)
vlog-cut-render \
--timeline <out>/timeline.json \
--timing <out>/timing.json \
--src <clips_folder> \
--narration <out>/narration.wav \
--out <out> \
--name rough_cut.mp4Optional:
--size 1920x1080— override timeline.size--fps 30— override timeline.fps--name xxx.mp4— output filename
Outputs:
<out>/
├── segs/ ← per-shot mp4 (cached on rerun)
├── video_silent.mp4
└── rough_cut.mp4The render absorbs gap silences into the last shot of each line: if the source has room, dur is extended; otherwise the last frame is held (tpad). Result: the video stays populated through every silence.
Idempotency
segs/<idx>_<lid>_<stem>.mp4 is reused if it exists. To force a re-render of a single shot, delete that file. To force the whole video, delete segs/.
Checkpoint (when called from vlog-cut-pipeline)
Two checkpoints land in this skill:
- after plan —
timeline_drafted→ ask the user to approve the picks (or let Claude refine first, then approve) - after render —
rough_cut_rendered→ ask the user to watchrough_cut.mp4
Don't proceed until both are approved.
Dependencies
ffmpeg/ffprobeon PATH- no Python deps beyond stdlib