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.
  • 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 may 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


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


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 stop forcibly stops recording. By default, a recording is generated after 180 seconds. cancel_delay resets the latency for stream interruption from 180 seconds to 0 seconds. This means that a recording is generated immediately.

The main streaming domain.


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


The name of the live stream.

Response parameters


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 of the corresponding domain name is used for streaming, ApsaraVideo Live is automatically triggered to pull the live stream. If no one is watching the live stream, ApsaraVideo Live does not pull the live stream from the origin. In this case, the recording feature in automatic, on-demand, and manual modes is also disabled.