1实现原理 · 为什么它能做到
定位是「图形包装」而不是字幕:原片完整播放不加剪辑,agent 在对话里逐张写卡片的 HTML(时间 + 内容),再组装成一个合成 HTML 交给 hyperframes 渲成 MP4;没有固定卡型清单,卡片由转录内容决定。
Talking Head Recut takes a local video that **plays in full** and layers a sequence of timed, designed **graphic cards** onto it — titles, lower-thirds, data callouts, quotes, side panels, picture-in-picture — synced to what's being said. The agent designs the cards (timing + content) and **writes each card's HTML directly in the conversation**, then assembles a single composition HTML and renders it to MP4 via `hyperframes`. There is no fixed archetype list and no prescribed card structure — the overlays emerge from what the transcript actually says.
执行面只有本仓 CLI 与系统 ffmpeg/ffprobe:转录走本地 Whisper,无第三方服务、无 API key、无代理、无速率限制。
This skill runs entirely on the **hyperframes** CLI plus system `ffmpeg` / `ffprobe`. Transcription is local **Whisper** via `hyperframes transcribe` — no third-party service, API key, or rate-limited proxy.
步骤 3-5 是纯本地媒体处理:ffprobe 取宽高/帧率/时长、ffmpeg 抽 mp3、hyperframes transcribe 出**扁平词数组** transcript.json,然后 agent 自己改错词并自行按标点/停顿切句。
`transcript.json` is a **flat array of word objects** — `[{ "text": "...", "start": s, "end": s }, …]` (no `segments` array, no `words` wrapper; the per-word key is **`text`**). Read it and fix obvious ASR errors:
渲染策略是显式的一次性 4 问门禁(画幅 / 布局 / 风格 / 卡片密度),并预计算推荐值(按源片宽高比推 recommendedRatio、按视频时长推 autoCount),且给出跨宿主的三级问询通道降级。
**Environment compatibility — pick the best available question channel.** Not every runtime exposes the same structured-question tool. Apply this order: 1. **Native clarification tool** — use the structured 4-question call below. 2. **Other native clarification tool** (e.g. `ask_question`, `request_user_input`, IDE-specific prompt) — use that tool with the same 4 question texts and option lists. Preserve the recommendation markers and the precomputed values. 3. **No native tool** (Codex CLI, plain text-only runtimes) — **ask directly in normal conversation**.
设计维度被拆成正交三维:10 种风格 × 4 种布局 × 3 种画面框 = 120 种组合,每种是一个自包含 HTML 片段(作用域内 <style>、无 <script>、无外链、动画只走 data-anim-*)。
Style × Layout × VideoFrame (10) (4) (3) = 120 possible combinations
装配期两个硬规则:① 输入视频必须重编码成密集关键帧(否则稀疏 GOP 会让渲染器 seek 时卡帧);② 画面用 muted <video>,同一源另挂根级 #source-audio 音轨,从而保住原声且音量/闪避可独立控制。
ffmpeg -y -i "$VIDEO_PATH" -c:v libx264 -crf 18 -g 30 -keyint_min 30 \ -pix_fmt yuv420p -movflags +faststart -c:a aac "$WORK_DIR/public/input-video.mp4"
带一个针对 SKILL.md 自身内容的结构断言测试:校验「权威合成」确实把源视频以 muted video + 同源 audio 的形式保住,且两条轨道的 src/data-start/data-duration 一致、track 不同。
assert.equal(readAttribute(audio, "src"), readAttribute(video, "src")); assert.equal(readAttribute(audio, "data-start"), readAttribute(video, "data-start")); assert.equal(readAttribute(audio, "data-duration"), readAttribute(video, "data-duration")); assert.notEqual( readAttribute(audio, "data-track-index"), readAttribute(video, "data-track-index"), );
2核心能力
3外部依赖
| 类型 | 依赖 |
|---|---|
| cli | hyperframes CLI(doctor / transcribe / render / snapshot / preview / skills update) |
| cli | ffmpeg / ffprobe(系统依赖:取元数据、抽音频、重编码输入视频) |
| cli | 本地 Whisper(经 hyperframes transcribe,无 key/无代理) |
| package | GSAP 3.15.0(随包 vendored,复制进工作目录的 public/vendor/) |
| package | 随包字体(Inter / Caveat / Virgil / LXGWWenKaiTC,woff2) |
| network | hyperframes skills update(自刷新,需网络;本 skill 唯一需要联网的环节) |
| package | 上游开源项目(本 skill 卡片设计系统的来源,仅署名引用,非运行时依赖) |
4风险提醒 风险提醒:蓝色 · 知晓即可
- 转录默认 small.en,对非英语/重口音素材有已知误译风险 — 同仓 embedded-captions 的 transcribe.cjs 明确反对默认 small.en(会给非英语与重口音说话人产出错误转录),并记录了真实的误译事故;本 skill 的 Step 4 仍写死 `--model small.en`,且未给出换模型提示。中文/多语种播客使用者应主动改模型(见 second_pass 的 discrepancy 条)。
- 转录文本与视频内容整体进入模型上下文 — 卡片内容由转录「说了什么」决定,agent 会通读 transcript.json;素材中的指令式语句属内容层注入面,本 skill 无隔离机制。
- 产出物是含 GSAP 脚本的本地 HTML,且工作目录默认保留 — agent 手写每张卡片的 HTML 并组装 public/index.html(含 <script> 时间线);SKILL.md 明令不删工作目录('Do not delete the work directory unless the user asks.'),会把原始视频的副本(重编码后)与转录长期留在 videos/<project>/ 下,涉密素材需自行清理。
- vendored GSAP 的许可约束随产出物传递 — assets/vendor/gsap.min.js 是 GSAP 3.15.0,文件头声明受 GreenSock 标准许可约束;随包分发意味着产出成片/模板的使用也落在该许可范围内(商用前需自行核对该许可是否覆盖自己的场景)。
- 质量门禁偏轻 — 流程只有 npx hyperframes lint/check 与单帧 snapshot 之类的自检,没有同批其它 skill 那样的 preview 帧或接触表强制检查;卡片设计质量主要靠模型审美与参考库,'Do not open it during the run' 也意味着运行中不做可视复核。
- 依赖宿主提供交互问询能力 — Step 7 依赖原生 AskUserQuestion 或等价工具;纯文本运行时虽可降级为直接对话提问,但用户不答就会阻塞(除非命中预授权/自主信号分支)。
5第二遍独立确认
- [ok] 是否真的无凭证、无第三方 API(蓝档判定的关键) — 整目录 grep:(API_KEY|TOKEN|SECRET|\.env|keychain|Bearer|Authorization) 命中 15 处全为 'tokens' 子串误配(设计 token 语境);heygen/OPENAI/ANTHROPIC 0 命中;process.env 0 命中;fetch 0 命中。SKILL.md 与 NOTICE.md 双重声明转录为本地 Whisper。结论成立。
- [ok] 『无脚本』是否属实(有没有隐藏的执行体) — 全量清单中 .mjs 仅 1 个且为测试;无 .sh/.py/.cjs。流程里的命令是文档中给宿主执行的 ffmpeg/CLI 调用,不是随包脚本。『runs entirely on the hyperframes CLI plus system ffmpeg/ffprobe』表述与文件构成一致。
- [ok] 『外部资源』逐条回查调用点 — npx hyperframes doctor/transcribe/render/snapshot/preview 均在 SKILL.md 原文;ffprobe/ffmpeg 两条命令在 Step 3 原文、重编码命令在 Step 9 原文;随包字体与 gsap 的复制命令在 Step 9 原文;上游仓库链接在 NOTICE.md 原文。无推测项。
- [discrepancy] 转录模型选择与同批 skill 的口径差异 — 本 skill 硬编码 `--model small.en`(Step 4 原文),而同仓 embedded-captions 的 transcribe.cjs 明确**禁止**默认 small.en(注释:'Default = multilingual `small`, NOT `small.en`. Per media-use: ".en models mistranslate non-English and mis-handle accented speech"',并记录了曾被 small.en 在重口音说话人上产出错误转录的实例)。本 skill 在 description 中虽未宣称多语种,但也没有对非英语素材给出提示。这是**同一仓库内两个 skill 对同一问题给出相反默认**的真实出入,对非英语/重口音素材的使用者有实际影响(本 skill 使用者也可能会中同样的坑)。
- [ok] vendored GSAP 的许可约束是否被标注 — assets/vendor/gsap.min.js 文件头写明 'GSAP 3.15.0 … @license Copyright 2026, GreenSock. All rights reserved. Subject to the terms at https://gsap.com/standard-license.';随包分发即意味着产出物沿用该许可约束(同批其它 skill 走 CDN 引用、许可披露方式不同)。已在 meta.license 与 risks 中记录。
- [unlocatable] 验证:渲染/预览类声明是否可在源码内证实其行为 — SKILL.md 描述的行为(稀疏 GOP 导致渲染器 seek 卡帧、单帧 snapshot 的位置与命名、`--at` 单值会忽略 --out)需要实际运行 hyperframes render/snapshot 才能证实;本次为只读侦查且不得运行构建/渲染,故记为无法在源码内定位,不作为已验证事实。
6结论
ff96f4df7b933a0f…b8328f9573