text.caption-karaoke

卡拉 OK 字幕

Caption Karaoke

仅本次打开有效
01
Live preview

真实渲染预览

查看引用 ↓
实机渲染 · Remotion
02
Purpose

这个动效用来做什么

卡拉 OK 字幕的确定性双引擎实现。

Deterministic dual-engine implementation of Caption Karaoke.

范围
效果
复杂度
进阶
建议时长
3s
画幅
16:9 · 9:16 · 1:1
文字
强调揭示
社交短视频演示文稿故事叙述
03
Inputs

可替换参数

text必填 · string

Caption text. Whitespace-separated words or Han characters advance at evenly spaced intervals; not audio-aligned timestamps.

默认值
Recipes keep every motion decision portable
highlight_index可选 · integer

Zero-based word receiving final hold emphasis after the sequential sweep.

默认值
3
highlight_style可选 · enum

Active word treatment.

默认值
marker
remotion_settings可选 · object

仅 Remotion 的可换素材增强版。提供此对象时替代旧视觉参数;省略则保留旧行为。高级版只验收横屏/竖屏。截图/产品固定6秒;字幕用输出时间戳,片长为末词结束+停留,媒体偏移独立计算;使用随附精确音频导出脚本。

适用引擎:Remotion;其他引擎仍使用原有参数。

展开完整输入示例(JSON)
{
  "eyebrow": "LOCAL VIDEO / TIMED CAPTIONS",
  "accent": "#d3ef95",
  "words": [
    {
      "text": "不必",
      "start": 0.25,
      "end": 0.75
    },
    {
      "text": "急着",
      "start": 0.75,
      "end": 1.3
    },
    {
      "text": "赶路,",
      "start": 1.3,
      "end": 2.1
    },
    {
      "text": "偶尔",
      "start": 2.1,
      "end": 2.7
    },
    {
      "text": "停下来,",
      "start": 2.7,
      "end": 3.5
    },
    {
      "text": "也能",
      "start": 3.5,
      "end": 4.1
    },
    {
      "text": "看见",
      "start": 4.1,
      "end": 4.7
    },
    {
      "text": "远方。",
      "start": 4.7,
      "end": 5.7
    }
  ],
  "video": "p2/landscape.mp4",
  "audio": "p2/timing-pulses.wav",
  "videoOffset": 0,
  "audioOffset": 0,
  "sourceAudio": false,
  "wordsPerPage": 4,
  "holdSeconds": 0.8
}
04
Motion timeline

归一化动作时间线

当前预览为可换素材增强版:截图与产品镜头为 6 秒,字幕按末词时间加停留时间计算。下方为旧版基础时间线;增强版以所复制入口与 remotion_settings 为准。切换其他引擎仍使用旧参数与旧时间线。

所有事件都使用 0 到 1 的归一化进度:0 是镜头开始,1 是镜头结束;事件可以重叠,适配器再把相同比例映射到秒或帧。

subject.revealtext.reveal-range
0.06–0.12
subject.highlighttext.highlight-word
0.16–0.74
subject.holdstate.hold
0.74–1.00
05
Copy to Agent

复制执行上下文

预览与引用使用同一个引擎选择。上下文保留共享机器标记与对应 Adapter 路由。

正在加载当前 Recipe 的上下文…
06
Engine implementations

引擎实现

gsap-timeline

HyperFrames

已验证
Composition
caption-karaoke
入口文件
index.html
确定性
是
  • lint通过
  • validate通过
  • inspect通过
  • render通过
frame-based

Remotion

已验证
Composition
MediaTimedCaption
入口文件
MediaTimedCaption.tsx
确定性
是
  • typecheck通过
  • build通过
  • render通过
07
Source, reference & rights

来源与使用边界

再分发状态
original
来源说明
Self-authored Milestone E Recipe and adapters.
Recipe 文件
recipes/text/caption-karaoke/recipe.yaml

参考

  • Original Milestone E transition and caption composition original
08
Verification

验收标准

01
intent-legible

The named transition or caption intent remains visually legible.

02
no-obstruction

Active copy remains inside the safe area without accidental mutual obstruction.

03
stable-hold

The final state remains still and readable during the hold.

04
sequential-highlight

Highlight advances through each word or Han character, then holds highlight_index; this legacy adapter does not claim audio timestamp alignment.

05
p2-media-variant

Only the Remotion advanced settings variant uses P2 timing and local media. Legacy parameters, entry IDs, HyperFrames and Three.js remain unchanged; the core timeline describes the legacy variant. Verified P2 evidence covers 16:9, 9:16 and two alternate inputs.

2 个实现已通过真实渲染理解验证模型