卡拉 OK 字幕
Caption Karaoke
真实渲染预览
这个动效用来做什么
卡拉 OK 字幕的确定性双引擎实现。
Deterministic dual-engine implementation of Caption Karaoke.
- 范围
- 效果
- 复杂度
- 进阶
- 建议时长
- 3s
- 画幅
- 16:9 · 9:16 · 1:1
可替换参数
text必填 · stringCaption text. Whitespace-separated words or Han characters advance at evenly spaced intervals; not audio-aligned timestamps.
- 默认值
Recipes keep every motion decision portable
highlight_index可选 · integerZero-based word receiving final hold emphasis after the sequential sweep.
- 默认值
3
highlight_style可选 · enumActive 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
}归一化动作时间线
当前预览为可换素材增强版:截图与产品镜头为 6 秒,字幕按末词时间加停留时间计算。下方为旧版基础时间线;增强版以所复制入口与 remotion_settings 为准。切换其他引擎仍使用旧参数与旧时间线。
所有事件都使用 0 到 1 的归一化进度:0 是镜头开始,1 是镜头结束;事件可以重叠,适配器再把相同比例映射到秒或帧。
0.06–0.120.16–0.740.74–1.00复制执行上下文
预览与引用使用同一个引擎选择。上下文保留共享机器标记与对应 Adapter 路由。
正在加载当前 Recipe 的上下文…
引擎实现
HyperFrames
- Composition
caption-karaoke- 入口文件
index.html- 确定性
- 是
- lint通过
- validate通过
- inspect通过
- render通过
Remotion
- Composition
MediaTimedCaption- 入口文件
MediaTimedCaption.tsx- 确定性
- 是
- typecheck通过
- build通过
- render通过
来源与使用边界
- 再分发状态
- original
- 来源说明
- Self-authored Milestone E Recipe and adapters.
- Recipe 文件
recipes/text/caption-karaoke/recipe.yaml
参考
- Original Milestone E transition and caption composition original
验收标准
intent-legibleThe named transition or caption intent remains visually legible.
no-obstructionActive copy remains inside the safe area without accidental mutual obstruction.
stable-holdThe final state remains still and readable during the hold.
sequential-highlightHighlight advances through each word or Han character, then holds highlight_index; this legacy adapter does not claim audio timestamp alignment.
p2-media-variantOnly 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.