Hours of livestream → a batch of 15–60 second vertical clips. Segment selection can be done manually, by subtitle keywords, or auto-suggested by pauses; export is handled uniformly by scripts/live_clip.py。
Part of ecommerce-video-skills
Only clip your own livestream, or one for which you have the streamer's/brand's authorization.
Inputs
- Livestream recording (mp4/flv/mov, horizontal or vertical both fine)
- Optional: subtitles/transcript SRT (exported from the platform or generated with any ASR tool)
- Target: duration per clip, quantity, products or topics to highlight
Three ways to select segments
# A. 已有时间戳(人工或 agent 读转写后挑选)
# cuts.csv: start,end,title
# 00:12:05,00:12:40,冰块放一晚还在?现场演示
python scripts/live_clip.py live.mp4 --cuts cuts.csv --outdir out/clips
# B. 按字幕关键词找片段(每个命中点向前 30% / 向后 70% 取 --window 秒,重叠自动合并)
python scripts/live_clip.py live.mp4 --srt live.srt --keywords "演示,对比,上链接,库存" --window 30 --burn-subs
# C. 没有字幕:在停顿处切分,输出候选 CSV 再人工/agent 挑选
python scripts/live_clip.py live.mp4 --propose 30 > proposals.csv
Steps
- Read the transcript first(when an SRT is available): have the agent mark highlight points such as "demonstration, comparison, user question answered, perk explanation" and write them into
cuts.csv。 - Each clip must be understandable on its own: the first 3 seconds must have a hook—cut in from "the question/demonstration begins," not from the streamer's small talk.
- Fine-tune start/end points: the start point lands at the beginning of a sentence, the end point lands 0.3 seconds after the sentence ends.
- Export: horizontal is automatically converted to 9:16 (blurred background + centered frame), can burn in titles (
titlecolumn) and subtitles (--burn-subs)。 - Write clip titles: use
hook-3s-script's hook types to write 2 titles for each clip, hand them tocover-title-ab。
Highlight signals What makes a good clip
| Signal | Example |
|---|---|
| Live demonstration | Pouring water, dropping, comparison test |
| Q&A | "Someone asked whether it can go in the dishwasher…" |
| Emotional peak | Surprise, laughing, viewers flooding the chat |
| Rule explanation | Gifts, after-sales, shipping (note: price/discount information is subject to the current actual terms; expired clips must be taken down or trimmed out) |
Prompt template
下面是直播转写(SRT)。请找出 {8} 个适合做 {20–40} 秒竖屏切片的片段:
每段必须能独立看懂、开头 3 秒有钩子(问题/演示/结果),避免寒暄和长时间沉默;
输出 CSV:start,end,title(title ≤ 14 字,不使用绝对化用语,不承诺具体价格)。
转写:{粘贴 SRT}
Checklist
- Each clip has a hook in the first 3 seconds and does not cut off mid-sentence at the end
- Titles and subtitles are not in the bottom UI area; the horizontal frame is fully visible
- Price/discount/stock information appearing in the clip is still valid, otherwise trim it out
- You have authorization to use the livestream content
Common issues and fixes Failure fixes
| Issue | Fix |
|---|---|
--propose only returns one segment |
Background music drowned out the pauses; switch to the SRT keyword method, or lower silencedetect 's noise threshold |
| Subtitles out of sync with the picture | Confirm the SRT timeline corresponds to the original recording; the script uses -copyts to preserve the source timeline |
| Error when the title contains a colon/quote | The script has already replaced them with full-width symbols |
| Cut point in the middle of a sentence | Use the SRT cue's start/end times as the cut points |