All Products
Search
Document Center

ApsaraVideo Live:UpdateLiveAppRecordConfig

Last Updated:Nov 14, 2024

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
live:UpdateLiveAppRecordConfig
*Domain
acs:cdn:*:{#accountId}:domain/{#DomainName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringYes

The main streaming domain.

example.com
AppNamestringYes

The name of the application to which the live stream belongs.

liveApp****
OssEndpointstringYes

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
StreamNamestringNo

The name of the live stream.

teststream
StartTimestringNo

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
EndTimestringNo

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
OnDemandintegerNo

Configures on-demand recording. Valid values:

  • 0: disables on-demand recording.
  • 1: enables on-demand recording by using the HTTP callback method.
  • 2: enables on-demand recording by parsing the stream ingest parameters.
  • 7: By default, ApsaraVideo Live does not automatically record live streams. You can call the RealTimeRecordCommand operation to manually start or stop recording.
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
DelayTimeintegerNo

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
RecordFormatarray<object>No

The recording details.

objectNo
CycleDurationintegerNo

The recording cycle. Unit: seconds If you do not specify this parameter, the default value 6 hours is used.

Note
  • If a live stream is interrupted during a recording cycle but is resumed within the interruption duration threshold, the stream is recorded in the same recording before and after the interruption.

  • If a live stream is interrupted for longer than the interruption duration threshold, a new recording is generated.

1
FormatstringNo

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
  • flv
  • mp4
  • cmaf
m3u8
SliceDurationintegerNo

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
TranscodeRecordFormatarray<object>No

The transcoded stream recording details.

objectNo
CycleDurationintegerNo

The transcoded stream recording cycle. Unit: seconds If you do not specify this parameter, the default value 6 hours is used.

21600
FormatstringNo

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
  • flv
  • mp4
  • cmaf
m3u8
SliceDurationintegerNo

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
TranscodeTemplatesarrayNo

The transcoding template group details.

stringNo
  • The transcoding template of the transcoded stream. You can configure up to 10 transcoding templates at a time.
  • If you specify the TranscodeRecordFormat.N.xxx parameters, configure at least one transcoding template.
  • If you want to record multiple or all transcoded streams, set TranscodeTemplates.1 to *****.
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

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

Examples

Sample success responses

JSONformat

{
  "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidOssEndpoint.Malformed%s-
400InvalidOssBucket.MalformedSpecified parameter OssBucket is not valid.-
400InvalidOssBucket.NotFoundThe parameter OssBucket does not exist.-
400InvalidFormat.MalformedSpecified parameter Format is not valid.Invalid value of Format. Check whether the Format parameter that you specified is correct.
400InvalidCycleDuration.MalformedSpecified CycleDuration Format is not valid.Invalid format of CycleDuration. Check whether the format of the CycleDuration parameter is correct.
400InvalidSliceDuration.MalformedSpecified SliceDuration Format is not valid.-
400InvalidTemplateLength.MalformedSpecified record template length is not valid.-
400InvalidTemplate.ForbidRawTemplate named raw is Forbidden.-
400MissingTemplateTemplate is mandatory for this action.-
400MissingOssObjectPrefixOssObjectPrefix is mandatory for this action.-
400MissingSliceOssObjectPrefixSliceOssObjectPrefix is mandatory for this action.-
400InvalidOssObjectPrefix.MalformedSpecified parameter OssObjectPrefix is not valid.-
400InvalidSliceOssObjectPrefix.MalformedSpecified parameter SliceOssObjectPrefix is not valid.-
400ConfigAlreadyExistsConfig has already exist.-
400InvalidFormat.IllegalOperationSpecified parameter Format can not be multiple.-
400InvalidDelayTimeSpecified Delaytime is invalid.-
400Live2Vod.ConfigAlreadyExistsHad live2vod record config already.-
400InvalidStartTime.MalformedSpecified StartTime is malformed.-
400InvalidEndTime.MalformedSpecified EndTime is malformed.-
400InvalidEndTime.MismatchSpecified EndTime does not math the specified StartTime or current time.-
400InvalidStartTime.MismatchSpecified StartTime does not math the current time.-
400ForbiddenRam Permission is forbidden.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history