feat(video-pipeline): 将 narration 字段统一重命名为 script
字段重命名涉及所有文档、示例代码、提示词模板以及 slug 生成逻辑,确保管线各阶段(分镜、图生提示词、TTS、成片)一致使用 script 字段承载口播文案。 同时增强 `capcut_assemble.js` 的配音与字幕模块: - 配音支持本地路径模式(不上传 OSS),新增 `--split-captions` 参数启用分句字幕 - 分句字幕按标点切分长文本为短句,基于字数权重动态分配显示时长 - 新增 `update-captions-standalone.js` 独立工具,可在草稿已生成后单独更新字幕
This commit is contained in:
@@ -162,7 +162,7 @@ async function generateMJ(item, idx, dir, imagesDir, ratio, refs, manifestPath)
|
||||
? result.files.map((f, ci) =>
|
||||
renameGeneratedFile(
|
||||
path.relative(dir, f).replace(/\\/g, '/'),
|
||||
dir, idx, item.narration || item.shotDesc, `cand${ci + 1}`
|
||||
dir, idx, item.script || item.shotDesc, `cand${ci + 1}`
|
||||
)
|
||||
)
|
||||
: null
|
||||
@@ -217,7 +217,7 @@ async function generateLastFrame(item, idx, manifest, dir, imagesDir, model, rat
|
||||
if (files.length > 0) {
|
||||
item.lastFrame = renameGeneratedFile(
|
||||
path.relative(dir, files[0]).replace(/\\/g, '/'),
|
||||
dir, idx, item.narration || item.shotDesc, 'last'
|
||||
dir, idx, item.script || item.shotDesc, 'last'
|
||||
)
|
||||
item.status = 'done'
|
||||
log('images', `[${idx}] lastFrame 完成: ${item.lastFrame}`)
|
||||
|
||||
Reference in New Issue
Block a user