feat(video-pipeline): 将 narration 字段统一重命名为 script
字段重命名涉及所有文档、示例代码、提示词模板以及 slug 生成逻辑,确保管线各阶段(分镜、图生提示词、TTS、成片)一致使用 script 字段承载口播文案。 同时增强 `capcut_assemble.js` 的配音与字幕模块: - 配音支持本地路径模式(不上传 OSS),新增 `--split-captions` 参数启用分句字幕 - 分句字幕按标点切分长文本为短句,基于字数权重动态分配显示时长 - 新增 `update-captions-standalone.js` 独立工具,可在草稿已生成后单独更新字幕
This commit is contained in:
@@ -165,7 +165,7 @@ node .claude/skills/video-from-script/scripts/gemini-image-generator.js edit \
|
||||
# 批量带参考图(pipeline init + run)
|
||||
node .claude/skills/video-from-script/scripts/pipeline.js init \
|
||||
--account forbidden-emperor --mode single \
|
||||
--items '[{"shotDesc":"...","narration":"...","duration":5,"imagePrompt":"...","directorRef":"tarantino"}]'
|
||||
--items '[{"shotDesc":"...","script":"...","duration":5,"imagePrompt":"...","directorRef":"tarantino"}]'
|
||||
node .claude/skills/video-from-script/scripts/pipeline.js run \
|
||||
--manifest ./output/forbidden-emperor_XXXXXXXX_001/manifest.json \
|
||||
--phase images
|
||||
@@ -328,7 +328,7 @@ const r = await mjGen('prompt', { outputDir: './out', aspectRatio: '9:16' })
|
||||
|
||||
## 文件命名规则
|
||||
|
||||
Pipeline 生成的文件统一命名,slug 来自 manifest item 的 `narration` 或 `shotDesc` 字段(slugify: 保留中文和字母数字,最多 20 字符,其余变 `_`):
|
||||
Pipeline 生成的文件统一命名,slug 来自 manifest item 的 `script` 或 `shotDesc` 字段(slugify: 保留中文和字母数字,最多 20 字符,其余变 `_`):
|
||||
|
||||
| 模式 | 文件名 | 示例 |
|
||||
|------|--------|------|
|
||||
|
||||
@@ -56,7 +56,7 @@ output/{name}_{YYYYMMDD}_{NNN}/
|
||||
└── audio/ # seg_001.mp3
|
||||
```
|
||||
|
||||
命名:图片 `scene_01_悬浮.jpeg` → 视频 `scene_01_悬浮.mp4`(slug 从 narration/shotDesc 派生,支持中文)
|
||||
命名:图片 `scene_01_悬浮.jpeg` → 视频 `scene_01_悬浮.mp4`(slug 从 script/shotDesc 派生,支持中文)
|
||||
|
||||
## manifest.json
|
||||
|
||||
@@ -71,7 +71,7 @@ node scripts/gemini-image-generator.js edit "prompt" -i ./references/ref1.png -o
|
||||
# Pipeline 批量生图(推荐)
|
||||
node scripts/pipeline.js init \
|
||||
--account {account} --mode single \
|
||||
--items '[{"shotDesc":"...","narration":"...","duration":5,"imagePrompt":"...","directorRef":"tarantino"}]'
|
||||
--items '[{"shotDesc":"...","script":"...","duration":5,"imagePrompt":"...","directorRef":"tarantino"}]'
|
||||
node scripts/pipeline.js run \
|
||||
--manifest ./output/{account}_XXXXXXXX_001/manifest.json \
|
||||
--phase images
|
||||
|
||||
Reference in New Issue
Block a user