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 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. 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 limit on an API operation in ApsaraVideo Live.


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.

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.
    Note If the recording task is paused while the live stream is not interrupted, no recording is generated. If the live stream is interrupted, a recording is generated after 3 minutes by default.
DomainName String Yes

The main streaming domain.

AppName String Yes liveApp****

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

StreamName String Yes liveStream****

The name of the live stream.

Response parameters

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

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8" ?>

JSON format

HTTP/1.1 200 OK

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

Error codes

For a list of error codes, see Service error codes.


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