调用指南
基础合成
baseVideoMix 的分镜组合、转场、音频和字幕参数。
将多组视频按分镜组合,支持转场、背景音乐、音频、字幕。
{
"taskType": "baseVideoMix",
"callbackUrl": "https://your-server.com/callback",
"params": {
"videoList": [
{
"videos": [
{
"url": "https://cdn.example.com/scene1.mp4",
"duration": 15.0,
"sceneName": "分镜1"
},
{
"url": "https://cdn.example.com/scene2.mp4",
"duration": 20.0,
"sceneName": "分镜2"
}
],
"totalDuration": 35.0
}
],
"isShortest": false,
"exportDir": "baseMix/1713763200000",
"options": {
"resolution": "1920:1080",
"resolutionMode": "auto",
"transition": {
"type": "fade",
"duration": 0.5
},
"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": {}
}
}
}
}基础合成 params 字段说明
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
videoList | array | 是 | 视频组合列表,每项包含 videos 数组和 totalDuration |
videoList[].videos | array | 是 | 分镜视频列表,每项含 url、duration、sceneName |
videoList[].totalDuration | number | 是 | 该组合总时长(秒) |
isShortest | boolean | 否 | 是否按最短视频时长截断 |
exportDir | string | 是 | 导出目录路径 |
options.resolution | string | 否 | 分辨率,如 "1920:1080"、"1080p"、"720p",或 "custom" 配合自定义宽高 |
options.resolutionMode | string | 否 | 分辨率模式,如 "auto" |
options.transition | object | 否 | 转场设置,type(转场类型) 和 duration(转场时长秒) |
options.backgroundMusic | object | 否 | 背景音乐,含 url、fileName、duration |
options.audio | object | 否 | 独立音频轨道,含 url、fileName、duration |
options.subtitle | object | 否 | 字幕,含 url、fileName、duration、style |