Updates a recording configuration for an application. The recordings are stored in Object Storage Service (OSS).
Operation description
Usage notes
Obtain the main streaming domain, and then call this operation to update a recording configuration.
QPS limit
You can call this operation up to 30 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.
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 |
---|---|---|---|---|
live:UpdateLiveAppRecordConfig | *Domain acs:cdn:*:{#accountId}:domain/{#DomainName} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DomainName | string | Yes | The main streaming domain. | example.com |
AppName | string | Yes | The name of the application to which the live stream belongs. | liveApp**** |
OssEndpoint | string | Yes | The endpoint of the Object Storage Service (OSS) bucket. To store live stream recordings in OSS, you need to create an OSS bucket in advance. For more information, see Configure OSS. | learn.developer.aliyundoc.com |
StreamName | string | No | The name of the live stream. | teststream |
StartTime | string | No | The recording start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note
The start time must be within seven days after the stream ingest starts. This parameter takes effect only for the live stream specified by the StreamName parameter. If the StreamName parameter is not specified, this parameter does not take effect.
| 2018-04-10T09:57:21Z |
EndTime | string | No | The recording end time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note
The time range that is specified by the EndTime and StartTime parameters must be less than or equal to seven days. If the value exceeds seven days, ApsaraVideo Live considers seven days as the time range. This parameter takes effect only for the live stream specified by the StreamName parameter. If the StreamName parameter is not specified, this parameter does not take effect.
| 2018-04-16T09:57:21Z |
OnDemand | integer | No | Configures on-demand recording. Valid values:
Note
If you set the OnDemand parameter to 1, you must call the AddLiveRecordNotifyConfig operation to configure the OnDemandUrl parameter. Otherwise, ApsaraVideo Live does not perform on-demand recording.
| 1 |
DelayTime | integer | No | The interruption duration for merge. If the stream interruption duration exceeds the specified duration, a new recording is generated. The value of this parameter ranges from 15 to 21600 seconds. | 180 |
RecordFormat | array<object> | No | The recording details. | |
object | No | |||
CycleDuration | integer | No | The recording cycle. Unit: seconds If you do not specify this parameter, the default value 6 hours is used. Note
| 1 |
Format | string | No | The recording format. Supported formats include M3U8, Flash Video (FLV), MP4, and Common Media Application Format (CMAF). Valid values: Note
You need to specify at lease one of the RecordFormat and TranscodeRecordFormat parameters. If you set this parameter to m3u8 or cmaf, you must also specify the RecordFormat.N.SliceOssObjectPrefix and RecordFormat.N.SliceDuration parameters.
| 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 details. | |
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. Supported formats include M3U8, FLV, MP4, and CMAF. Valid values: Note
If you set this parameter to m3u8 or cmaf, you must also specify the TranscodeRecordFormat.N.SliceOssObjectPrefix and TranscodeRecordFormat.N.SliceDuration parameters.
| m3u8 |
SliceDuration | integer | No | The duration of a single segment in the 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
You cannot set the TranscodeTemplates parameter to raw , which is a reserved identifier.RepeatList is expressed as N in TranscodeTemplates.N, which means multiple templates are configured. Examples: TranscodeTemplates.1=sd and TranscodeTemplates.2=hd. | sd |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidOssEndpoint.Malformed | %s | - |
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. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|