Live editing creates an output file by combining one or more segments from live streams. After you submit a live editing job, it is processed asynchronously. You can then call the GetLiveEditingJob operation with the returned JobId to query the job status, or call the GetMediaInfo operation with the MediaId to get details of the generated media asset.
Operation description
This is an asynchronous API. When you submit a job, the system returns a JobId before the job is complete. The job is then queued for asynchronous processing. You will receive a callback notification when the job completes. Alternatively, you can query the job status by calling the GetLiveEditingJob operation.
You can edit live streams that are recorded to either OSS or VOD. When editing multiple live streams together, all streams must be recorded to the same service, either all to OSS or all 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 |
A JSON array that specifies the clips to edit. The job creates the output file by concatenating these clips in the specified order. Each clip includes a start and end time. If live stream parameters are not specified for a clip, the system uses the global |
[{\"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 you specify this parameter, the system uses the storage settings from the project. If left empty, the system uses the storage settings provided in the request instead. |
****fddd7748b58bf1d47e95**** |
| LiveStreamConfig |
string |
No |
The configuration of the source live stream, specified as a JSON object. It includes the following parameters:
|
{ "AppName": "app", "DomainName": "domain.com", "StreamName": "stream" } |
| OutputMediaConfig |
string |
No |
The destination configuration for the output file, specified as a JSON object. You can specify either a URL on OSS or a storage location in a VOD bucket.
|
{ "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 configuration for the output file, specified as a JSON object. The
|
{ "Mode": "AccurateFast"} |
| UserData |
string |
No |
Custom user data, provided as a JSON object. The maximum length is 512 bytes. |
{"key": "value"} |
| OutputMediaTarget |
string |
No |
The destination type for the output file. Valid values:
|
oss-object |
Clip data structure
| Parameter | Type | Example | Description | Required |
| StartTime | String | 2021-06-21T08:01:00Z | The start time of the clip, in UTC format. | Yes |
| EndTime | String | 2021-06-21T08:05:00Z | The end time of the clip, in UTC format. | Yes |
| AppName | String | app | The name of the application to which the stream belongs. If not specified, the system uses the global LiveStreamConfig settings. | No |
| DomainName | String | domain.com | The domain name of the stream. If not specified, the system uses the global LiveStreamConfig settings. | No |
| StreamName | String | stream | The name of the live stream. If not specified, the system uses the global LiveStreamConfig settings. | No |
| CoverTime | String | 2021-06-21T08:03:00Z | Specifies a timestamp within the clip to use for generating a cover image for the output file. The time must be in UTC format. If multiple clips have CoverTime set, the system uses only the first one. The CoverTime must be greater than or equal to StartTime and less than or equal to EndTime. | No |
| CoverUrl | String | https://test.oss-cn-shanghai.aliyuncs.com/cover.jpg | The custom URL for the output screenshot. The OSS bucket must be in the same region as the service. Only self-managed OSS buckets are supported; VOD-managed buckets are not. | No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| RequestId |
string |
The ID of the request. |
****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 ID of the output media asset. |
****c469e944b5a856828dc2**** |
| MediaURL |
string |
The URL of the output file. |
http://test-bucket.cn-shanghai.aliyuncs.com/test.mp4 |
| VodMediaId |
string |
The ID of the VOD media asset. This parameter is returned only if the 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.