Updates a live stream recording configuration that saves the output to Object Storage Service (OSS).
Operation description
QPS limit
You can call this operation up to 30 times per second per account. Requests that exceed this limit are dropped and you may experience service interruptions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:UpdateLiveAppRecordConfig |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DomainName |
string |
Yes |
The main streaming domain. |
example.com |
| AppName |
string |
Yes |
The AppName of the live stream. |
liveApp**** |
| OssEndpoint |
string |
Yes |
The endpoint for OSS storage. You must create an OSS bucket before using this feature. See Configure OSS. |
learn.developer.aliyundoc.com |
| StreamName |
string |
No |
The name of the live stream. |
teststream |
| StartTime |
string |
No |
The recording start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC time). Note
This parameter is only effective for stream-level recordings (i.e., when |
2018-04-10T09:57:21Z |
| EndTime |
string |
No |
The recording end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC time). Note
This parameter is only effective for stream-level recordings. The interval between EndTime and StartTime cannot exceed 7 days. |
2018-04-16T09:57:21Z |
| OnDemand |
integer |
No |
Specifies the recording mode. Valid values:
Note
If you set OnDemand to 1, you need to call the AddLiveRecordNotifyConfig API to configure the OnDemandUrl parameter. Otherwise, ApsaraVideo Live does not perform on-demand recording. |
1 |
| DelayTime |
integer |
No |
The window in seconds for merging fragmented recording after an interruption. If a stream disconnects and reconnects within this window, the recording will continue in the same file. Valid values: 15 to 21600. |
180 |
| RecordFormat |
array<object> |
No |
The recording details. |
|
|
object |
No |
|||
| CycleDuration |
integer |
No |
The duration of a single recording cycle in seconds. If not specified, the default value is 6 hours Note
If a live stream is interrupted during a recording cycle but resumes normal streaming within the merge window, recording will continue in the same file. A recording file is generated only when a live stream is interrupted for longer than the merge window. |
1 |
| Format |
string |
No |
The recording format. Valid values: Important
If you choose m3u8 or cmaf, you must also set SliceOssObjectPrefix and SliceDuration. At least one of RecordFormat or TranscodeRecordFormat must be specified.
|
m3u8 |
| SliceDuration |
integer |
No |
The duration of a single segment. Unit: seconds Note
This parameter takes effect only if you set the RecordFormat.N.Format parameter to m3u8 or cmaf. If you do not specify this parameter, the default value 30 seconds is used. Valid values: 5 to 30. |
30 |
| TranscodeRecordFormat |
array<object> |
No |
The transcoded stream recording configuration. |
|
|
object |
No |
|||
| CycleDuration |
integer |
No |
The transcoded stream recording cycle. Unit: seconds. If you do not specify this parameter, the default value 6 hours is used. |
21600 |
| Format |
string |
No |
The format of the transcoded stream recording. Valid values: Note
If you choose m3u8 or cmaf, you must specify the TranscodeRecordFormat.N.SliceOssObjectPrefix and TranscodeRecordFormat.N.SliceDuration parameters.
|
m3u8 |
| SliceDuration |
integer |
No |
The duration of a single segment for transcoded stream recording. Unit: seconds. Note
This parameter takes effect only if you set the TranscodeRecordFormat.N.Format parameter to m3u8 or cmaf. If you do not specify this parameter, the default value 30 seconds is used. Valid values: 5 to 30. |
30 |
| TranscodeTemplates |
array |
No |
The transcoding template group details. |
|
|
string |
No |
Note
TranscodeTemplates is not allowed to pass in |
sd |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
Examples
Success response
JSON format
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidOssBucket.Malformed | Specified parameter OssBucket is not valid. | |
| 400 | InvalidOssBucket.NotFound | The parameter OssBucket does not exist. | |
| 400 | InvalidFormat.Malformed | Specified parameter Format is not valid. | Invalid value of Format. Check whether the Format parameter that you specified is correct. |
| 400 | InvalidCycleDuration.Malformed | Specified CycleDuration Format is not valid. | Invalid format of CycleDuration. Check whether the format of the CycleDuration parameter is correct. |
| 400 | InvalidSliceDuration.Malformed | Specified SliceDuration Format is not valid. | |
| 400 | InvalidTemplateLength.Malformed | Specified record template length is not valid. | |
| 400 | InvalidTemplate.ForbidRaw | Template named raw is Forbidden. | |
| 400 | MissingTemplate | Template is mandatory for this action. | |
| 400 | MissingOssObjectPrefix | OssObjectPrefix is mandatory for this action. | |
| 400 | MissingSliceOssObjectPrefix | SliceOssObjectPrefix is mandatory for this action. | |
| 400 | InvalidOssObjectPrefix.Malformed | Specified parameter OssObjectPrefix is not valid. | |
| 400 | InvalidSliceOssObjectPrefix.Malformed | Specified parameter SliceOssObjectPrefix is not valid. | |
| 400 | ConfigAlreadyExists | Config has already exist. | |
| 400 | InvalidFormat.IllegalOperation | Specified parameter Format can not be multiple. | |
| 400 | InvalidDelayTime | Specified Delaytime is invalid. | |
| 400 | Live2Vod.ConfigAlreadyExists | Had live2vod record config already. | |
| 400 | InvalidStartTime.Malformed | Specified StartTime is malformed. | |
| 400 | InvalidEndTime.Malformed | Specified EndTime is malformed. | |
| 400 | InvalidEndTime.Mismatch | Specified EndTime does not math the specified StartTime or current time. | |
| 400 | InvalidStartTime.Mismatch | Specified StartTime does not math the current time. | |
| 400 | Forbidden | Ram Permission is forbidden. | |
| 400 | InvalidOssEndpoint.Malformed | %s, please check and try again later. | Invalid OssEndpoint, please check and try again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.