feat(video-pipeline): 增强参考图自动上传与视频生成重试机制
- 在 `init-manifest` 阶段添加输入文件清理日志和 WARNING 提示 - `getReferences` 改为异步并自动将本地参考图上传至 OSS,减少手动操作 - `phase-videos` 支持 `pending`/`failed` 状态 item 的自动重试,自动清理旧视频引用 - 优化 `phase-assemble` 中字幕与配音开关的逻辑,根据实际内容动态判断
This commit is contained in:
@@ -23,13 +23,17 @@ async function phaseAssemble(manifest, manifestPath, options) {
|
||||
}
|
||||
}
|
||||
|
||||
// 检测是否有配音和字幕
|
||||
const hasAudio = manifest.items.some(it => it.audio)
|
||||
const hasSubtitles = manifest.items.some(it => it.script && it.script.trim() && it.script !== '[无配音]')
|
||||
|
||||
const assembleArgs = {
|
||||
input: dir,
|
||||
manifest: manifestPath,
|
||||
mode,
|
||||
format: manifest.format || accountConfig.defaultFormat || '9:16',
|
||||
subtitles: 'true',
|
||||
voiceover: manifest.items.some(it => it.audio) ? 'true' : 'false',
|
||||
subtitles: hasSubtitles ? 'true' : 'false',
|
||||
voiceover: hasAudio ? 'true' : 'false',
|
||||
animation: capcutConfig.animation || '渐显+放大',
|
||||
}
|
||||
|
||||
@@ -37,7 +41,7 @@ async function phaseAssemble(manifest, manifestPath, options) {
|
||||
if (capcutConfig.effects) assembleArgs.effects = capcutConfig.effects.join(',')
|
||||
if (capcutConfig.filter) assembleArgs.filter = capcutConfig.filter
|
||||
|
||||
log('assemble', `模式: ${mode}, 字幕: true, 配音: ${assembleArgs.voiceover}, 动画: ${assembleArgs.animation}`)
|
||||
log('assemble', `模式: ${mode}, 字幕: ${assembleArgs.subtitles}, 配音: ${assembleArgs.voiceover}, 动画: ${assembleArgs.animation}`)
|
||||
|
||||
try {
|
||||
const { assemble } = require('../capcut_assemble')
|
||||
|
||||
Reference in New Issue
Block a user