All Products
Search
Document Center

ApsaraVideo Live:Manual recording

Last Updated:Apr 16, 2024

This topic describes the scenarios, limits, procedure, example practices, and usage notes of manual recording.

Scenarios

In addition to automatic recording, you can call an API operation to manually record a live stream. To do so, you can add a recording configuration in advance and set the OnDemand parameter to 7. A value of 7 specifies that ApsaraVideo Live does not automatically record a live stream by default.

If a live stream is being automatically or manually recorded, you can call an API operation to manually stop recording the live stream.

Procedure

  1. Call the AddLiveAppRecordConfig operation to configure the recording rules. Set the OnDemand parameter to 7, which specifies that ApsaraVideo Live does not automatically record an ingested live stream.

  2. Perform stream ingest.

  3. Call the RealTimeRecordCommand operation to start recording.

  4. Call the RealTimeRecordCommand operation to stop recording if necessary.

The following table lists the API operations used for manual recording.

API operation

Description

AddLiveAppRecordConfig

Configures recording rules.

DeleteLiveAppRecordConfig

Deletes a rule that is no longer needed.

DescribeLiveRecordConfig

Queries all configured rules.

RealTimeRecordCommand

Manually starts or stops recording.

Example practices

  • Manually start recording

    If the live stream example.com/liveApp****/liveStream**** is being ingested, call the RealTimeRecordCommand operation to start recording.

    /?AppName=liveApp****
    &DomainName=example.com
    &StreamName=liveStream****
    &Command=start
    &<Common request parameters>
  • Manually stop recording

    If the live stream example.com/liveApp****/liveStream**** is being recorded, call the RealTimeRecordCommand operation to stop recording.

    /?AppName=liveApp****
    &DomainName=example.com
    &StreamName=liveStream****
    &Command=stop
    &<Common request parameters>

Usage notes

  • If the specified live stream is not being ingested, an error is returned when you call the RealTimeRecordCommand operation to manually start recording.

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

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