Controls recordings manually on demand. For example, you can call this operation to start or stop recording at a specific point in time.

Usage notes

  • If a live stream is being automatically or manually recorded, you can call this operation to manually stop recording the live stream.
  • If a live stream is interrupted after you manually record it, the recording stops.
  • In addition, if automatic recording is not configured for the live stream, ApsaraVideo Live does not automatically record the live stream after it is resumed.

QPS limit

You can call this operation up to 50 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes RealTimeRecordCommand

The operation that you want to perform. Set the value to RealTimeRecordCommand.

AppName String Yes liveApp****

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

Command String Yes start

The action to be performed. Valid values:

  • start: forcibly starts recording.
  • stop: forcibly stops recording. If the live stream is interrupted for longer than a specific latency, a recording is generated.
  • cancel_delay: resets the latency for stream interruption and completely stops recording. If the recording task is stopped when you perform this action, a recording is generated.
  • restart: forcibly restarts recording. If the live stream is being recorded when you perform this action, a recording is generated.
DomainName String Yes example.com

The main streaming domain.

StreamName String Yes liveStream****

The name of the live stream.

RegionId String No cn-shanghai

The ID of the region where the streaming domain resides.

Response parameters

Parameter Type Example Description
RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The ID of the request.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=RealTimeRecordCommand
&AppName=liveApp****
&Command=start
&DomainName=example.com
&StreamName=liveStream****
&<Common request parameters>

Sample success responses

XML format

<RealTimeRecordCommandResponse>
	  <RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
</RealTimeRecordCommandResponse>

JSON format

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

Error codes

For a list of error codes, visit the API Error Center.

Note

  • ApsaraVideo Live supports triggered stream pulling. If the streaming URL of the corresponding domain name is used for streaming, ApsaraVideo Live is automatically triggered to pull live streams. If live streams are not played, ApsaraVideo Live does not pull live streams from the origin. In this case, the recording feature in automatic, on-demand, and manual modes is also disabled.