调用指南
专业合成
proVideoMix 的场景、组合方式和输出参数。
基于分镜模板的专业视频合成,支持快速生成(随机组合)和手动/智能组合模式。
{
"taskType": "proVideoMix",
"callbackUrl": "https://your-server.com/callback",
"params": {
"scenes": [
{
"sceneKey": "scene_1",
"sceneName": "分镜1",
"duration": 15.0,
"resources": [
{
"key": "res_1",
"url": "https://cdn.example.com/video1.mp4",
"duration": 15.0
},
{
"key": "res_2",
"url": "https://cdn.example.com/video2.mp4",
"duration": 15.0
}
],
"audioResources": [
{
"url": "https://cdn.example.com/audio1.mp3",
"duration": 15.0,
"startTime": 0
}
]
}
],
"audioMode": "merge",
"generateCount": 3,
"exportDir": "proMix/1713763200000",
"options": {
"resolution": "1920:1080",
"resolutionMode": "auto",
"fps": 30,
"isShortest": false,
"backgroundMusic": {
"url": "https://cdn.example.com/bgm.mp3",
"fileName": "bgm.mp3",
"duration": 60.0
},
"audio": {
"url": "https://cdn.example.com/audio.mp3",
"fileName": "audio.mp3",
"duration": 30.0
},
"subtitle": {
"url": "https://cdn.example.com/subtitle.srt",
"fileName": "subtitle.srt",
"duration": 35.0,
"style": {}
}
}
}
}手动组合模式额外传 combinations 字段:
{
"taskType": "proVideoMix",
"params": {
"scenes": [ ... ],
"audioMode": "merge",
"generateCount": 2,
"combinations": [
[0, 1, 0],
[1, 0, 1]
],
"exportDir": "proMix/1713763200000",
"options": { ... }
}
}专业合成 params 字段说明
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
scenes | array | 是 | 分镜定义列表 |
scenes[].sceneKey | string | 是 | 分镜唯一标识 |
scenes[].sceneName | string | 是 | 分镜名称 |
scenes[].duration | number | 是 | 分镜时长(秒) |
scenes[].resources | array | 是 | 该分镜的视频资源列表,每项含 key、url、duration |
scenes[].audioResources | array | 否 | 该分镜的音频资源列表,每项含 url、duration、startTime |
audioMode | string | 是 | 音频模式:"merge"(合并)或 "split"(按分镜拆分) |
generateCount | number | 是 | 生成数量 |
combinations | array | 否 | 手动组合模式:二维数组,每个子数组表示一个组合,值为对应分镜 resources 的索引 |
exportDir | string | 是 | 导出目录路径 |
options.resolution | string | 否 | 分辨率,如 "1920:1080" |
options.resolutionMode | string | 否 | 分辨率模式 |
options.fps | number | 否 | 帧率 |
options.isShortest | boolean | 否 | 是否按最短视频时长截断 |
options.backgroundMusic | object | 否 | 背景音乐 |
options.audio | object | 否 | 独立音频轨道 |
options.subtitle | object | 否 | 字幕设置 |