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.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:SubmitLiveEditingJob |
*All Resource
|
None | 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.
|
{ "MediaURL": "https://ice-auto-test.oss-cn-shanghai.aliyuncs.com/testfile.mp4" }, 或 { "StorageLocation": "bucket.oss-cn-shanghai.aliyuncs.com", "FileName": "output.mp4" } |
| 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 | https://test.oss-cn-shanghai.aliyuncs.com | 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 elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
****36-3C1E-4417-BDB2-1E034F**** |
| ProjectId |
string |
The ID of the live editing project. |
****fddd7748b58bf1d47e95**** |
| JobId |
string |
The ID of the live editing job. |
****d80e4e4044975745c14b**** |
| MediaId |
string |
The media asset ID of the output file. |
****c469e944b5a856828dc2**** |
| MediaURL |
string |
The URL of the output file. |
http://test-bucket.cn-shanghai.aliyuncs.com/test.mp4 |
| VodMediaId |
string |
The media asset ID of the output file in ApsaraVideo VOD if the output file is stored in ApsaraVideo VOD. |
****d7578s4h75ci945c14b**** |
Examples
Success response
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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.