Functional Description
After modifying the timeline json, start the synthesis task
Update Notes
Update Time | Update Notes |
---|---|
2024.04.23 | To facilitate the addition of fields unrelated to the timeline file and to make them easier to distinguish, the timeline parameters are extracted as a single file, with the data structure unchanged. Original { } -> New {"timeline":{ } } |
Request
plain
POST /task/create/timeline
Content-Type: application/json
The JSON data structure of the timeline in the request body is shown in the "Timeline JSON Data Structure Description". It should be noted that only one timeline in the timelines array is needed for synthesis, and the entire timelines array does not need to be passed in. The detailed parameters in the track are omitted below.
json
{
"extraConfig":{
"genCoverPoint":0
},
"timeline":{
"duration": 59720000,
"enableRenderOrderByZValue": true,
"encoderMode": "cbr",
"encoderType": "H.264",
"fps": 30,
"nvenc": true,
"outputEnd": -1,
"outputStart": 0,
"outputType": "mp4",
"resHeight": 540,
"resWidth": 960,
"sizeLevel": 1080,
"volume": 0.5226850115488941,
"videoBitrate": 16000000,
"videoSize": "16:9",
"templateId": "",
"videoTracks": [],
"audioTracks": [],
"timelineVideoFxTracks": [],
"captionTracks": [],
"compoundCaptionTracks": [],
"stickerTracks": [],
"musicLyricsTracks": []
}
}
Field | Type | Description | Required |
---|---|---|---|
extraConfig | object | Additional configuration information | No |
genCoverPoint | long | The time to generate the cover, in microseconds | No |
timeline | object | Timeline related information | Yes |
Response
Response body
json
{
"code": 0,
"msg": "success",
"data": {
"taskId": "ea496f25ee544f7aba9e9edc089424ad"
}
}
Field | Type | Description | Required |
---|---|---|---|
code | int | Status code, 0 is success, all others are failure | Yes |
msg | string | Status information | Yes |
data | object | Returned data body | Yes |
taskId | string | Task id | Yes |