Live editing combines one or more live stream segments into a finished product. After you submit a live editing task, the task enters a background queue and is executed asynchronously. After submission, you can call the GetLiveEditingJob operation to query the job status by jobId. You can also call the GetMediaInfo operation to query information about the generated media asset by MediaId.
Operation description
This is an asynchronous operation. After you submit a task, a task ID is returned (the task is not yet complete and enters a background queue for asynchronous execution). The final result is delivered through a callback notification. You can also proactively query the task status by calling GetLiveEditingJob.
Live editing is supported for live streams recorded to OSS and VOD. When mixing multiple live streams, all streams must be recorded to OSS or all streams must be recorded to 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 list of clip segments. The output is produced by concatenating the segments in the list in order. JSON Array. Each segment contains a start time and an end time. If no live stream parameters are specified, the outer-level live stream configuration is used. Both start and end timestamps are in UTC. For parameter details, see the Clip data structure below. |
[{\"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 not empty, the storage configuration associated with the project is used. If this parameter is empty, the storage configuration specified in the request parameters is used. |
****fddd7748b58bf1d47e95**** |
| LiveStreamConfig |
string |
No |
The live stream configuration. JSON Object. The following configuration items are required:
|
{ "AppName": "app", "DomainName": "domain.com", "StreamName": "stream" } |
| OutputMediaConfig |
string |
No |
The destination configuration for the output. JSON Object. You can specify the URL of the output on OSS or the storage location in a VOD bucket.
|
{ "MediaURL": "https://ice-auto-test.oss-cn-shanghai.aliyuncs.com/testfile.mp4" }, or { "StorageLocation": "bucket.oss-cn-shanghai.aliyuncs.com", "FileName": "output.mp4" } |
| MediaProduceConfig |
string |
No |
The composition configuration for generating segments, in JSON format. Mode specifies the editing mode. Valid values:
|
{ "Mode": "AccurateFast"} |
| UserData |
string |
No |
The custom settings. JSON Object. Maximum length: 512 bytes. |
{"key": "value"} |
| OutputMediaTarget |
string |
No |
The target type of the output. Valid values:
|
oss-object |
Clip data structure
| Property | Type | Example | Description | Required |
| StartTime | String | 2021-06-21T08:01:00Z | The start time of the clip segment, in UTC timestamp format. | Yes |
| EndTime | String | 2021-06-21T08:05:00Z | The end time of the clip segment, in UTC timestamp format. | Yes |
| AppName | String | app | The name of the application to which the stream belongs. If this parameter is empty, the outer-level live stream configuration is used. | No |
| DomainName | String | domain.com | The domain name. If this parameter is empty, the outer-level live stream configuration is used. | No |
| StreamName | String | stream | The name of the live stream. If this parameter is empty, the outer-level live stream configuration is used. | No |
| CoverTime | String | 2021-06-21T08:03:00Z | Specifies a timestamp within the segment to use as the cover image of the output, in UTC timestamp format. When multiple clips have the CoverTime parameter set, only the first one takes effect. CoverTime must be greater than or equal to StartTime and less than or equal to EndTime. | No |
| CoverUrl | String | https://test.oss-ap-southeast-1.aliyuncs.com | The custom screenshot output URL. The OSS bucket must be in the same region as the service access region. Only self-owned OSS buckets are supported. VOD-managed buckets are not supported. | No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| 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 task. |
****d80e4e4044975745c14b**** |
| MediaId |
string |
The media asset ID of the output. |
****c469e944b5a856828dc2**** |
| MediaURL |
string |
The URL of the output. |
http://test-bucket.cn-shanghai.aliyuncs.com/test.mp4 |
| VodMediaId |
string |
The VOD media asset ID. This parameter is returned when the video output destination is 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.