Produces a video from one or more source files. You can directly specify source files by configuring the Timeline parameter. Alternatively, you can specify source files after you create an online editing project.
Operation description
-
Make sure that you understand the billing method and price of ApsaraVideo VOD before you call this operation. You are charged for using the online editing feature. For more information, see Billing .
-
This operation returns only the submission result of a video production task. When the submission result is returned, video production may still be in progress. After a video production task is submitted, the task is queued in the background for asynchronous processing.
-
The source files that are used in the timeline of an online editing project can be materials directly uploaded to the online project or selected from the media asset library. Only media assets that are in the Normal state can be used in the project.
-
Videos are produced based on ProjectId and Timeline. The following content describes the parameter configurations:
- You must specify ProjectId or Timeline. If you leave both parameters empty, the video cannot be produced.
- If you specify Timeline and leave ProjectId empty, the system automatically creates an online editing project based on Timeline and adds the materials specified in the Timeline to the project to produce videos.
- If you specify ProjectId and leave Timeline empty, the system automatically uses the latest timeline information of the project to produce videos.
- If you specify both ProjectId and Timeline, the system automatically uses the timeline information that you specified to produce videos and updates the project timeline and materials. You can also specify other parameters to update the corresponding information about the online editing project.
-
You can create up to 100 video tracks, 100 image tracks, and 100 subtitle tracks in a project.
-
The total size of material files cannot exceed 1 TB.
-
The buckets in which the materials reside and where the exported videos are stored must be in the same region as the region where ApsaraVideo VOD is activated.
-
The exported videos must meet the following requirements:
- The width and height of the video image cannot be less than 128 pixels.
- The width and height of the video image cannot exceed 4,096 pixels.
- The width cannot exceed 2,160 pixels.
-
After a video is produced, the video is automatically uploaded to ApsaraVideo VOD. Then, the ProduceMediaComplete and FileUploadComplete event notifications are sent to you. After the produced video is transcoded, the StreamTranscodeComplete and TranscodeComplete event notifications are sent to you.
-
You can add special effects to the video. For more information, see Special effects.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vod:ProduceEditingProjectVideo | create | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProjectId | string | No | The ID of the online editing project. You can use one of the following methods to obtain the ID of the online editing project:
| fb2101bf24b4cb318787dc**** |
Timeline | string | No | The timeline of the online editing project. The value must be in JSON format. For more information about the parameter structure, see Timeline . | {"VideoTracks":[{"VideoTrackClips":[{"MediaId":"cc3308ac59615a54328bc3443****"},{"MediaId":"da87a9cff645cd88bc6d8326e4****"}]}]} |
Title | string | No | The title of the online editing project. | editing project test |
Description | string | No | The description of the online editing project. | description test |
CoverURL | string | No | The thumbnail URL of the online editing project. | https://example.aliyundoc.com/6AB4D0E1E1C7446888351****.png |
MediaMetadata | string | No | The video metadata. The value must be in JSON format. For more information about the parameter structure, see MediaMetadata . | {"Description":"video description","Title":"userData test"} |
ProduceConfig | string | No | The configuration of video production. The value must be in the JSON format. For more information about the parameter structure, see ProduceConfig . Note
StorageLocation is required if you produce videos in a region other than China (Shanghai).
| {"TemplateGroupId":"6d11e25ea30a4c465435c74****"} |
UserData | string | No | The custom configurations, such as the callback configuration. The value must be a JSON string. For more information about the parameter structure, see UserData . Note
The callback configurations take effect only after you specify an HTTP URL for receiving callback notifications and select the event types in the ApsaraVideo VOD console.
| {"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 parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "25818875-5F78-4AF6-D7393642CA58****",
"MediaId": "006204a11bb386bb25491f95f****",
"ProjectId": "fb2101bf24b4cb318787dc****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-11-02 | The request parameters of the API has changed | View Change Details |