Produce a video from one or more source videos. You can submit the source videos directly using the timeline parameter, or create an online editing project and then submit it for production.
Operation description
-
Before you use this operation, ensure that you understand the billing methods and pricing of ApsaraVideo VOD. Online editing is a paid feature. For more information about billing, see Billing for video editing and production.
-
This operation returns the result of the task submission. The response does not guarantee that the video is produced. The production task is queued and executed asynchronously in the background.
-
The video resources in an online editing timeline can be materials from Material Management or videos from the Media Library. If you use videos from the Media Library, ensure that their status is Normal.
-
Videos are produced based on ProjectId and Timeline. The logic is as follows:
ProjectId and Timeline cannot both be empty. Otherwise, the video cannot be produced.
If ProjectId is empty and Timeline is not empty, an online editing project is automatically created based on the specified Timeline parameter. The materials referenced in the timeline are fetched and set as the materials for the project. Then, the video is produced.
If ProjectId is not empty and Timeline is empty, the latest saved timeline is retrieved based on the ProjectId to produce the video.
If neither ProjectId nor Timeline is empty, the video is produced based on the specified Timeline. The corresponding online editing project, including its timeline and materials, is updated. If you specify other fields, the corresponding fields of the online editing project are also updated.
-
The number of video tracks, image tracks, and caption tracks cannot exceed 100 for each.
-
The total number of materials cannot exceed 200. The total size of material files cannot exceed 1 TB.
-
The region of the input or output bucket must be the same as the region where you use the VOD service.
-
When the output is a video, the resolution of the final video is subject to the following limits:
The width and height cannot be less than 128 pixels.
The width and height cannot exceed 4096 pixels.
The shorter side cannot exceed 2160 pixels.
-
After a video is produced, it is automatically uploaded to ApsaraVideo VOD. The VOD service then sends event notifications to indicate that media production is complete and video upload is complete. After the produced video is transcoded, additional event notifications are sent to indicate that transcoding for a single definition is complete and transcoding for all definitions is complete.
-
You can also add effects to the produced video. For more information, see Effects.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vod:ProduceEditingProjectVideo |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
string |
No |
The ID of the online editing project. You can obtain the ID in one of the following ways:
|
fb2101bf24b4cb318787dc**** |
| Timeline |
string |
No |
The timeline of the online editing project. The value must be a JSON string. For more information about the structure, see Timeline. Note
Make sure that each VideoTrackClip object contains a valid MediaId. Otherwise, the request fails. |
{"VideoTracks":[{"VideoTrackClips":[{"MediaId":"cc3308ac59615a54328bc3443****"},{"MediaId":"da87a9cff645cd88bc6d8326e4****"}]}]} |
| Title |
string |
No |
The title of the online editing project. |
剪辑合成测试 |
| Description |
string |
No |
The description of the online editing project. |
描述 |
| CoverURL |
string |
No |
The thumbnail of the online editing project. |
https://example.aliyundoc.com/6AB4D0E1E1C7446888351****.png |
| MediaMetadata |
string |
No |
The metadata of the produced video. The value must be a JSON string. For more information about the structure, see MediaMetadata. |
{"Description":"合成视频描述","Title":"合成userData测试"} |
| ProduceConfig |
string |
No |
The production configuration. The value must be a JSON string. For more information about the structure, see ProduceConfig. Important
You can leave the StorageLocation field empty if the storage region is China (Shanghai). If the storage region is another region, this field is required.
|
{"TemplateGroupId":"6d11e25ea30a4c465435c74****"} |
| UserData |
string |
No |
The custom settings. The value must be a JSON string of up to 256 characters. The settings can include message callbacks. For more information about the structure, see UserData. Note
To use the message callback feature, you must configure a webhook address and select the corresponding event types in the ApsaraVideo VOD console. Otherwise, the callback settings do not take effect. |
{"Extend":{"width":1280,"id":"028a8e56b1ebf6bb7afc74****","height":720},"MessageCallback":{"CallbackURL":"https://example.aliyundoc.com/2016-08-15/proxy/httpcallback/testcallback/","CallbackType":"http"}} |
| AppId |
string |
No |
The ID of the application. Default value: app-1000000. For more information, see Multi-application service. |
app-**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The ID of the request. |
25818875-5F78-4AF6-D7393642CA58**** |
| MediaId |
string |
The ID of the produced video. Note
|
006204a11bb386bb25491f95f**** |
| ProjectId |
string |
The ID of the online editing project. |
fb2101bf24b4cb318787dc**** |
Examples
Success response
JSON format
{
"RequestId": "25818875-5F78-4AF6-D7393642CA58****",
"MediaId": "006204a11bb386bb25491f95f****",
"ProjectId": "fb2101bf24b4cb318787dc****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.