Configure stream delay

更新时间:
复制 MD 格式

Unlike latency caused by streaming protocols, stream delay is a cloud-side feature that delays the playback of a live stream after processing.

Note

Stream delay is billed based on the delay service duration. For more information, see stream delay fees.

Limits

  • A delayed stream counts toward the source stream quota. If the quota is exceeded, the server disconnects excess streams. You can view current usage on the Basic Information tab of the Basic Settings page for a streaming domain. To increase the source stream quota, see Quota management.

  • Stream delay is available only in the China (Beijing) and China (Shanghai) regions.

Procedure

  1. Log on to the ApsaraVideo Live console.
  2. In the left navigation pane, click Domain Names. The Domain Management page appears.

  3. Find the streaming domain that you want to configure and click Domain Settings in the Actions column.

  4. Navigate to Streaming Management > Advanced Settings.

  5. On the Stream Delay Settings tab, click Add.

    The following table describes the stream delay template parameters.

    Parameter

    Description

    Application Name

    The application name. Must match the AppName in the ingest URL for the template to apply. Case-sensitive. An asterisk (*) matches all application names.

    Stream Name

    The live stream name. Must match the StreamName in the ingest URL for the template to apply. Case-sensitive. An asterisk (*) matches all stream names.

    Delay

    The delay duration for live stream playback.

    • Valid values: 16 to 3600.

    • Unit: seconds.

    Triggered By

    • Ingest Parameters: Stream delay is triggered only when the alDelayTime parameter is included in the ingest URL.

    • Configuration: Stream delay is triggered only by the stream delay configuration. Stream delay takes effect when the application name and stream name in the ingest URL match those in the stream delay template.

    • Ingest Parameters > Configuration: Stream delay can be triggered by the alDelayTime parameter in the ingest URL or the stream delay configuration. The alDelayTime parameter takes precedence over the stream delay configuration.

    Note

    If you set Triggered By to Ingest Parameters or Ingest Parameters > Configuration, you can trigger stream delay by specifying the alDelayTime parameter in the ingest URL. The following rules apply to the ingest URL:

    • Ingest URL without authentication: <ingest domain>/<AppName>/<StreamName>?alDelayTime=xx. In this URL, alDelayTime is the delay parameter and xx is the delay duration in seconds. Example: rtmp://demo.aliyundoc.com/app/stream?alDelayTime=100.

    • Ingest URL with authentication: <ingest domain>/<AppName>/<StreamName>?<authentication_string>&alDelayTime=xx. In this URL, alDelayTime is the delay parameter and xx is the delay duration in seconds. Example: rtmp://demo.aliyundoc.com/app/stream?auth_key=1678354414-0-0-c4789ecbd37a23a20ad2e9973301dae9&alDelayTime=100.

    • Generation time of the delayed stream: After the source stream is ingested and the delay period elapses, you can check whether the delayed stream is generated in the stream list of the ApsaraVideo Live console. If the source stream is interrupted within the delay period, the delayed stream generation timer may reset and start over.

    Note
    • The application name or stream name can be up to 255 characters in length and can contain digits, letters, hyphens (-), underscores (_), and equal signs (=).

    • After the configuration is complete, you can play the delayed stream by using a delayed streaming URL. For more information about how to obtain the URL, see Generate ingest and streaming URLs.

  6. Click OK.

Related API operations

CreateLiveDelayConfig

Adds a stream delay configuration.

UpdateLiveDelayConfig

Updates a stream delay configuration.

DeleteLiveDelayConfig

Deletes a stream delay configuration.