Submits a live editing job to merge one or more live stream clips into one video. After a live editing job is submitted, the job is queued in the background for asynchronous processing. You can call the GeLiveEditingJob operation to query the state of the job based on the job ID. You can also call the GetMediaInfo operation to query the information about the generated media asset based on the media asset ID.
Operation description
Live editing is supported for live streams that are recorded and stored in Object Storage Service (OSS) and ApsaraVideo VOD. If multiple live streams are involved in a single job, only those recorded within the same application are supported for mixed editing. The streams must all be recorded either in OSS or ApsaraVideo VOD.
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 |
---|---|---|---|---|
ice:SubmitLiveEditingJob | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Clips | string | Yes | The clips in the JSON array format. The output video is created by merging these clips sequentially. Each clip has a start time and an end time. If no live stream parameters are specified, the outer live stream configurations apply. The start and end timestamps are in UTC. For more information about the parameters, see the "Clip" section of this topic. | [{\"StartTime\": \" 2021-06-21T08:01:00Z\", \"EndTime\": \" 2021-06-21T08:03:00Z\" , "AppName": "app", "DomainName": "domain.com", "StreamName": "stream"}, {\"StartTime\": \" 2021-06-21T08:05:00Z\", \"EndTime\": \" 2021-06-21T08:09:00Z\" }] |
ProjectId | string | No | The ID of the live editing project. If this parameter is specified, the system reads the storage configurations of the project. If this parameter is not specified, the specified storage configurations take precedence. | ****fddd7748b58bf1d47e95**** |
LiveStreamConfig | string | No | The live stream configurations, in the JSON format. The configurations must include the following parameters:
| { "AppName": "app", "DomainName": "domain.com", "StreamName": "stream" } |
OutputMediaConfig | string | No | The configurations of the output file, in the JSON format. You can specify an OSS URL or a storage location in a storage bucket of ApsaraVideo VOD.
| |
MediaProduceConfig | string | No | The production configurations, in the JSON format. Mode specifies the editing mode. Valid values:
| { "Mode": "AccurateFast"} |
UserData | string | No | The user-defined data in the JSON format, which can be up to 512 bytes in length. | {"key": "value"} |
OutputMediaTarget | string | No | The type of the output file. Valid values:
| oss-object |
Clip
Parameter | Type | Example | Description | Required |
---|---|---|---|---|
StartTime | String | 2021-06-21T08:01:00Z | The start time of the captured clip. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. | Yes |
EndTime | String | 2021-06-21T08:05:00Z | The end time of the captured clip. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. | Yes |
AppName | String | app | The name of the application to which the live stream belongs. If you do not specify this parameter, the outer live stream configurations apply. | No |
DomainName | String | domain.com | The domain name. If you do not specify this parameter, the outer live stream configurations apply. | No |
StreamName | String | stream | The name of the live stream. If you do not specify this parameter, the outer live stream configurations apply. | No |
CoverTime | String | 2021-06-21T08:03:00Z | The timestamp in the clip. The image at this timestamp is used as the thumbnail of the output file. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. If you specify CoverTime for multiple clips, only the first one takes effect. CoverTime must be later than or equal to StartTime and earlier than or equal to EndTime. | No |
CoverUrl | String | The output URL of the thumbnail. The OSS bucket must be in the same region in which IMS is activated. Only self-managed OSS buckets are supported. Buckets managed by ApsaraVideo VOD are not supported. | No |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "****36-3C1E-4417-BDB2-1E034F****",
"ProjectId": "****fddd7748b58bf1d47e95****",
"JobId": "****d80e4e4044975745c14b****",
"MediaId": "****c469e944b5a856828dc2****",
"MediaURL": "http://test-bucket.cn-shanghai.aliyuncs.com/test.mp4",
"VodMediaId": "****d7578s4h75ci945c14b****"
}
Error codes
For a list of error codes, visit the Service error codes.