Communitygithub.com

laviedezidane/hyperframes-skill

为现有的人物访谈/播客视频添加定时的、设计好的图形叠加卡片——动态标题、底部三分之一、数据标注、引用、侧边面板、画中画——与转录文本同步,并适配您选择的16:9/9:16/4:5画布;视频原片不受影响地播放。触发词:“图形叠加”、“屏幕图形”、“包装/美化我的视频”。不是纯字幕(/嵌入式字幕)。不确定→请前往/hyperframes。

hyperframes-skill 是什么?

该AI技能“Talking Head Recut”专注于为现有的说话人头部/访谈/播客视频(本地文件)添加专业级图形叠加层。它并非简单添加字幕,而是设计一系列与转录文本时间同步的图形卡片,包括动态标题、底部三分之一(lower-thirds)、数据标注、引用、侧边面板和画中画。关键特点是视频原片完整播放,图形卡片在其上叠加,用户可选择输出画布比例(16:9/9:16/4:5)。技能支持Claude Code、Cursor等平台,完全依赖hyperframes CLI和本地Whisper进行转录,无需第三方API密钥。工作流程包括环境检查、创建项目目录、提取元数据和音频、本地转录、转录文本校正、设计轻量级故事板、编写每个卡片的HTML以及最终合成渲染为MP4文件。它还提供了清晰的卡片设计指南(如区域划分、节奏计算)和可检查的中间文件,使开发者能精细控制输出。

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/laviedezidane/hyperframes-skill/tree/HEAD/.agents/skills/talking-head-recut

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

插件安装: 在执行设置或更新命令之前,当此技能位于HyperFrames插件内部时,请遵循插件执行规则。独立安装则保留下面的更新说明。

首先,保持此技能更新——在运行前向用户确认: npx hyperframes skills update talking-head-recut。如果一切已是最新,则快速无操作;否则,它将更新此技能及其依赖的核心领域技能,确保您依赖它们时处于最新状态。

说话人头部剪辑

Talking Head Recut 接收一个完整播放的本地视频,并在其上叠加一系列定时、设计好的图形卡片——标题、底部三分之一、数据标注、引用、侧边面板、画中画——与说话内容同步。AI代理设计卡片(时间+内容),并直接在对话中编写每个卡片的HTML,然后组装成一个合成的HTML文件,并通过hyperframes渲染为MP4。没有固定的原型列表,也没有预设的卡片结构——叠加内容完全基于转录文本实际内容而定。

入口是 /hyperframes。 此技能为现有的说话人头视频片段打包设计的图形卡片(标题、底部三分之一、数据标注、引用、侧边面板、画中画)——不是纯字幕(口语文字作为文本)。视频原片不受影响。 任何其他意图——纯字幕、独立图形、从头开始创建视频——或任何不确定性→请先阅读 /hyperframes:意图层负责所有路由决策。

embedded-captions 的图形打包兄弟。 字幕添加_口语文字_作为可读字幕;此技能在播放的视频上添加_设计的图形_。纯字幕→ embedded-captions。从头开始构建视频→创建工作流(product-launch-video / faceless-explainer / …)。

通过 /hyperframes 路由,意图层仅确认输入(哪个片段)并宣布渲染策略问题作为延迟提问——宽高比、布局、样式组和卡片数量保留在第7步,其中探测的镜头和转录文本为推荐提供依据;层的运行形状问题不适用。BRIEF.md 文件(如果存在)包含已确认的输入和任何用户备注——请先阅读它。

工作目录中的可检查中间文件:

  • metadata.json — 时长/宽度/高度/帧率
  • audio.mp3 — 提取的音频
  • transcript.json — 扁平单词数组 [{ text, start, end }, …](Whisper;无 segments,无 words 包装器)
  • storyboard.json — 轻量级卡片大纲(代理的计划)
  • public/cards/card-XX.html — 每个卡片的HTML片段
  • public/index.html — 最终组装的合成文件
  • output.mp4 — 渲染后的视频

CLI 解析

# hyperframes — 转录(本地Whisper)+ 将组装的HTML渲染为MP4
npx hyperframes --help

此技能完全依赖 hyperframes CLI 和系统 ffmpeg / ffprobe。转录通过本地 Whisper hyperframes transcribe 进行——无需第三方服务、API密钥或速率受限代理。

工作流程

1. 检查环境

npx hyperframes doctor          # ffmpeg, headless browser, render deps
# 确认捆绑资源:
ls "<SKILL_DIR>/assets/fonts" "<SKILL_DIR>/assets/vendor/gsap.min.js"

必需:

  • ffmpeg / ffprobe(系统)
  • <SKILL_DIR>/assets/fonts/*.woff2,<SKILL_DIR>/assets/vendor/gsap.min.js(捆绑在此技能内,在第9步暂存到工作目录)

转录无需密钥——hyperframes transcribe 本地运行 Whisper(第4步)。

在macOS上强烈建议用于 hyperframes render:

export PRODUCER_BROWSER_GPU_MODE=hardware

2. 创建工作目录

所有工件位于 videos/<project-name>/ 下——与其他视频工作流(product-launch-video / faceless-explainer / pr-to-video)相同的约定。保持工作区根目录为当前工作目录;以下所有内容写入该子目录下。

VIDEO_PATH="/absolute/path/input.mp4"
WORK_DIR="videos/$(basename "$VIDEO_PATH" | sed 's/\.[^.]*$//')"
mkdir -p "$WORK_DIR"

3. 提取音频和元数据

# 元数据 — 时长/宽度/高度/帧率
ffprobe -v error -select_streams v:0 \
  -show_entries stream=width,height,r_frame_rate \
  -show_entries format=duration -of json "$VIDEO_PATH" > "$WORK_DIR/metadata.json"
# 音频
ffmpeg -y -i "$VIDEO_PATH" -vn -acodec libmp3lame -q:a 2 "$WORK_DIR/audio.mp3"

输出:metadata.json(读取 width/height/duration;帧率为 r_frame_rate 分数求值,例如 30000/1001 → 29.97)+ audio.mp3。

4. 转录

npx hyperframes transcribe "$WORK_DIR/audio.mp3" -d "$WORK_DIR" --json --model small.en

本地 Whisper——无需API密钥、代理或速率限制。将单词级 transcript.json 写入工作目录(单词 text + start / end 时间戳)。读取它以获取驱动第6步卡片定时的单词/句子时间;根据标点/暂停自行将单词分组为句子,以获取段落级别的块。

限制为媒体时长。 Whisper可能返回最后一个单词的 end 略超过实际片段时间——将每个卡片的 endSec 和 composition.durationSeconds 限制为 metadata.json 中的时长,否则渲染将在视频结束后显示黑色尾巴。

5. 校正转录文本

transcript.json 是一个单词对象的扁平数组——[{ "text": "...", "start": s, "end": s }, …](无 segments 数组,无 words 包装器;每个单词的键是 text)。读取它并修正明显的ASR错误:

  • 同音词、产品名称、技术术语、标点
  • 就地编辑单词的 text;保留其 start / end 时间戳
  • 没有预分组的 segments 数组——自行将单词分组为句子(在句末标点/停顿处分隔),当您需要段落级别的块用于卡片定时时

6. 起草轻量级故事板(在聊天中)

不涉及CLI。 读取 transcript.json + metadata.json 并直接设计卡片。storyboard.json 是代理内部的计划工件——没有CLI命令消耗它;它的存在是为了让您在编写每个卡片的HTML之前能清晰地思考时间和内容。保持形状与下方示例一致,以便同一大纲可以驱动您在第9步编写的合成:

{
  "schemaVersion": 3,
  "composition": {
    "fps": 30,
    "width": 1080,
    "height": 1920,
    "durationSeconds": 121.2,
    "layout": "portrait",
    "themeId": "noir",
    "seed": 42
  },
  "videoTrack": {
    "sourcePath": "input-video.mp4",
    "startSec": 0,
    "endSec": 121.2,
    "bounds": { "x": 0, "y": 0, "width": 1080, "height": 1920 }
  },
  "subtitles": { "enabled": false },
  "cards": [
    {
      "id": "card-01",
      "intent": "用演讲者焦虑的午夜问题吸引注意力",
      "startSec": 0.5,
      "endSec": 13.0,
      "accentIndex": 0,
      "zone": "fullscreen",
      "contentHints": {
        "kicker": "一个诚实的问题",
        "title": "晚上11点的灵魂拷问",
        "detail": "客户60秒语音留言:'如果人民币升值,是否意味着我的美元保单亏损严重?'"
      }
    }
  ]
}

必填卡片字段:

字段类型用途
idstring卡片HTML和GSAP选择器中使用的稳定id
intentstring自然语言描述;输入给卡片合成
startSec / endSecnumber以秒为单位的时间(endSec > startSec)
accentIndex0 | 1 | 2 | 3 | 4此卡片使用的5个主题强调色中的哪一个
zone枚举(见下方)卡片在画布上的位置
contentHintsobject自由格式包;代理在此放置kicker/title/detail/data/quote
archetype(可选)string可选标签,用于记住卡片的模式;缺失=自由格式,即默认
transition(可选)枚举:cut | fade | slide | wipe声明式卡片间过渡

五个 zone 值:

zone解析后的边界使用时机
fullscreen覆盖整个画布英雄时刻、大数字、口头禅
whiteboard-area内边距40px边距(或竖屏高度的45%)密集数据/带注释的内容
lower-third底部30%区域在可见视频上方添加注释
side-panel右侧42%(横屏)或底部40%(竖屏)数据一侧,视频另一侧
video-overlay整个画布,期望大部分透明的卡片在全屏视频上叠加注释

在第9步组装合成时,根据上表将每个卡片的 zone 解析为卡片宿主包装器上的像素边界。视频边界在合成级别设置一次(videoTrack.bounds);要使视频看起来在卡片之间“移动”,请编写针对合成<script>中#video-wrap的GSAP补间(见第9步)。

无规定的卡片角色,无规定的叙事弧。 卡片根据视频实际内容生成——可能全为引用或全为数据,可能以数字开头或故事开头。让转录文本驱动节奏。

多少个要点?——从时长+密度自动推断。 无固定上限。根据视频时长选择基本节奏,然后根据信息密度调整。只有下限固定:最少5张卡片,这样即使短视频也有节奏。

第1步——按时长确定基本节奏(中等密度下的自然秒/卡片):

视频时长基本节奏(秒/卡片)理由
< 60s(短Reel)6–8s观众期望短格式中快速剪辑
60s – 3分钟8–12s正常社交节奏
3 – 10分钟12–20s给予喘息空间;每张卡片承载更多内容
10 – 30分钟20–35s长篇讲座/访谈节奏
> 30分钟30–60s呈现剧集感,接近章节感觉

第2步——密度乘数(乘以基本节奏):

转录文本中的信号乘数效果
高密度——大量数字、不同主张、断奏节奏、列表式列举、每1-2句话一个新想法× 0.7剪辑更快,卡片更多
中等密度——数据和叙述混合流动× 1.0基本节奏
低密度——一个扩展的故事、重复的重构、缓慢的反思节奏、一个论点展开× 1.5剪辑更慢,卡片更少

第3步——计算:

secPerCard = basePace × densityMultiplier
cardCount  = max(5, round(videoDurationSec / secPerCard))

示例(注意——无上限限制;长视频自然生成更多卡片):

  • 30秒Reel,单个重点(低密度) → 7 × 1.5 = 10.5秒/卡片 → round(30/10.5)=3 → 下限至 5 张卡片
  • 60秒反思独白(低密度) → 10 × 1.5 = 15秒/卡片 → 4 → 下限至 5 张卡片
  • 121秒说话人头+丰富数据(高密度) → 10 × 0.7 = 7秒/卡片 → 17 张卡片
  • 5分钟访谈,混合密度 → 16 × 1.0 = 16秒/卡片 → 19 张卡片
  • 10分钟深度探讨,高密度 → 16 × 0.7 = 11秒/卡片 → 55 张卡片
  • 30分钟讲座,中等密度 → 28 × 1.0 = 28秒/卡片 → 64 张卡片
  • 1小时播客,低密度 → 45 × 1.5 = 67.5秒/卡片 → 53 张卡片

当一张卡片持续超过约15秒时,请规划更丰富的卡片(数据块、多步揭示、多个子点通过交错动画展开)——静态的一句话超过8秒会变得无聊。对于许多卡片超过30秒的长片,考虑将时间线分块为子合成(每章一个.html,使用data-composition-src挂载),使得每文件的GSAP时间线保持可管理——请参见 timeline_track_too_dense HyperFrames lint警告。

contentHints 是一个自由形式对象;其键和嵌套可以采用任何能捕获数据的形状。代理决定每张卡片的形状。

可选的结尾。 此技能没有固定的品牌结尾。如果用户想要一个结束卡片,请自行设计一个中性的(文字商标+一行标语,约1.5-2秒,淡入→短暂保持→淡出),将其附加到 cards[],并将 composition.durationSeconds 延长至其结束时间。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

laviedezidane/hyperframes-skill

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet `anchor` rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

laviedezidane/hyperframes-skill

Turn arbitrary text — an article, notes, a topic, a brief — into a faceless explainer video: there is no site or footage to capture, so the visuals are invented per scene (typography, abstract graphics, diagrams, data-viz). Use for topic explainers, concept breakdowns, how-tos, listicles. Not a video built from a website (/product-launch-video — promo or tour). Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Import Figma content into a HyperFrames composition — rendered assets, brand tokens, components, storyboard sections → reconstructed motion (frames read as states, not slides) (REST/CLI), connector-assisted motion when available, and shaders from a connector or native export. Use when the user pastes a figma.com link or asks to bring a Figma design, frame, logo, brand, or animation into a video/composition.

laviedezidane/hyperframes-skill

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated motion-first unit, including an animated title. Route fresh creation through hyperframes before using this skill.

laviedezidane/hyperframes-skill

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

laviedezidane/hyperframes-skill

Use when audio already placed in a HyperFrames composition needs to be mixed: fade-in/fade-out, crossfade, track gain or volume, volume automation, ducking, a music bed that fights a voiceover (voiceover carve), effects on a track (EQ, compressor, limiter, gate, saturation, delay, reverb, chorus, phaser, bitcrush), automation envelopes drawn on a track's volume or any effect parameter, or one submix bus carrying a chain, a fader and an automation clock for several tracks at once (`<hf-audio-group>`). Don't use for sourcing or generating audio — finding BGM, SFX, or making a voiceover is `/media-use`. Don't use for clip timing or track layout, which is `/hyperframes-core`.

laviedezidane/hyperframes-skill

Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, timeline, history, clean, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local, HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering.

laviedezidane/hyperframes-skill

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

laviedezidane/hyperframes-skill

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

laviedezidane/hyperframes-skill

Use when a HyperFrames composition needs a punch-in, punch-out, zoom, reframe, Ken Burns treatment, camera move, visual match/whip handoff, or other seek-safe 2D/3D keyframes; also for GSAP, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, text trails, 3D depth, or `hyperframes keyframes` diagnostics. Don't use for broad scene strategy, brand design, media sourcing, captions, or general video planning.

laviedezidane/hyperframes-skill

Search, install, and wire registry blocks and components into HyperFrames compositions. Use BEFORE hand-building any named visual — whenever a brief, a user, or a storyboard names a look, effect, treatment, or transition such as CRT scanlines, glitch, chromatic aberration, film grain, a shimmer sweep, a chart, a code or terminal window, a map, or a confetti burst — because roughly 400 hosted items already cover many of them and the search ranks all of them with nothing installed, no project, and no account. Also use when running hyperframes add or hyperframes catalog, installing one item or every block matching a tag, wiring an installed item into index.html, or working with hyperframes.json. Covers discovery, install locations, block sub-composition wiring, component snippet merging, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

laviedezidane/hyperframes-skill

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

laviedezidane/hyperframes-skill

Use when working with a person on a HyperFrames project in Studio: first, whether their message asks for a change at all (questions, loose ideas and "don't change anything" get an answer and a plan, not an edit); for a new film, the plan, storyboard and build order that the HyperFrames launch films follow; and how the timeline should be laid out so it reads well (one caption track, one element kind per track, every scene a sub-composition) and where captions and key content may sit (safe zones). Don't use for how to perform an individual edit (split, trim, retime, volume, copy, swap): that is `creator-editing-recipes.md` in `/hyperframes-core`.

laviedezidane/hyperframes-skill

Agent Media OS for a HyperFrames project. Resolve BGM, SFX, image, icon, brand logo, voice, color grade, or LUT into a frozen local file or paste-ready block + ledger record (one verb, `resolve`); generate via TTS / music / image models when the catalog misses; produce voiceover, transcription, captions, and background removal through one shared audio engine; operate on media (cut / reframe / transform); and reuse assets across projects. Also use for vague feedback that real footage looks dark, flat, boring, should feel retro/camcorder/print/ASCII, needs privacy, or needs a media reveal. When the host app provides its own music or sound-effect tools, use those for music and sound effects; `resolve --type bgm|sfx` needs the heygen CLI. When `HEYGEN_API_BASE` is set, HeyGen calls go through that host with no CLI sign-in.

laviedezidane/hyperframes-skill

A short, design-led motion graphic where motion is the message — kinetic typography, stat count-up, chart/data-viz hit, logo sting / brand lockup, lower-third / callout / social overlay, animated map (highlight regions, connect places, zoom to a location), animated tweet / news-article / headline, webpage / UI animation (scroll, cursor, callouts), or fusing a real image's geometry into a chart. Usually under 10s (up to ~30s), no narration or live-action subject; renders to MP4 or transparent overlay. Longer / narrated / multi-scene → /general-video. Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Turn a music track (an audio file, a video to pull audio from, or a track generated from a mood brief) into a beat-synced video — lyric video, slideshow, or kinetic promo. The music drives all pacing; any user-supplied images/videos are cut onto the same beat grid, and a complete video needs zero assets. Narrated pieces → the input-matched workflow (see /hyperframes). Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Turn a product or marketing URL, pasted script, or brief into a product launch / promo video — SaaS promos, feature reveals, product demos, app and company launches. Use when the user wants to market, launch, promote, or reveal a product; the default for any commercial URL. Site tours / showcases of a website route here too — the brief carries the show-it-as-is intent. Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Turn a GitHub pull request (a PR URL, owner/repo#N, or 'this PR' in a checked-out repo) into a code-change explainer video — changelog, feature reveal, fix, or refactor walkthrough built from the diff, commits, and files: the input is a code change, not a website. Not a product promo (/product-launch-video) or a no-PR topic explainer (/faceless-explainer). Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Port an existing Remotion (React) composition''s source to HyperFrames HTML. Use ONLY on an explicit ask to port/convert/migrate/translate a Remotion source — one-way, Remotion-only. A passing Remotion mention, reference-only code, or "make something like my Remotion video" is a fresh build (/general-video). Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Author a HyperFrames slideshow — a presentation, pitch deck, or interactive deck with discrete slides, fragment reveals, branching, hotspot navigation, and built-in presenter mode with speaker notes; also converts an existing page into a deck. Output is a navigable deck, not a rendered MP4. If the user didn't explicitly ask for a slideshow, confirm before authoring. Unclear → /hyperframes.

相关技能