feat(video-pipeline): 添加可配置的转场策略引擎和TTS语速支持

- 引入转场策略系统(`getTransition`),支持 `fixed`、`director`、`rhythm` 三种模式
- 根据账号配置文件动态读取转场配置(`loadTransitions`)
- 图片和视频轨道分别调用转场策略,替代原有的固定“闪白”转场
- 支持 `byPosition`(hook/body/keypoint/closing)和 `byDirector` 两种高级选择策略
- 图片动画支持 `loop_animation` 与 `in_animation` 解析(“缩放”、“弹入”等组合)
- TTS 合成新增 `rate` 字段(源自账号配置 `ttsRate`),默认语速调整为 1.1
- 默认动画类型从 `kenburns-zoom` 改为 `缩放`,适配中文 CapCut
This commit is contained in:
2026-05-01 14:16:08 +08:00
parent 21ff5311c1
commit f5d47ec5db
7 changed files with 118 additions and 15 deletions

View File

@@ -21,6 +21,21 @@
"highlightColor": "#FF6B35",
"bold": true
},
"defaultBGM": ""
"defaultBGM": "",
"transitions": {
"strategy": "rhythm",
"default": { "name": "闪白", "duration": 150000 },
"byPosition": {
"hook": { "name": "闪白", "duration": 100000 },
"keypoint": { "name": "闪白", "duration": 120000 },
"body": { "name": "溶解", "duration": 300000 },
"closing": { "name": "黑场", "duration": 200000 }
},
"byDirector": {
"tarantino": { "name": "闪白", "duration": 100000 },
"kitano": { "name": "溶解", "duration": 400000 },
"fincher": { "name": "黑场", "duration": 200000 }
}
}
}
}

View File

@@ -36,6 +36,21 @@
"inAnimation": "淡入",
"outAnimation": "淡出"
},
"defaultBGM": ""
"defaultBGM": "",
"transitions": {
"strategy": "rhythm",
"default": { "name": "闪白", "duration": 150000 },
"byPosition": {
"hook": { "name": "闪白", "duration": 100000 },
"keypoint": { "name": "闪白", "duration": 120000 },
"body": { "name": "溶解", "duration": 300000 },
"closing": { "name": "黑场", "duration": 200000 }
},
"byDirector": {
"tarantino": { "name": "闪白", "duration": 100000 },
"kitano": { "name": "溶解", "duration": 400000 },
"fincher": { "name": "黑场", "duration": 200000 }
}
}
}
}