This topic shows you how to enable the time shifting feature of ApsaraVideo Live to trace and watch the video content of a live stream prior to the current time.

Usage notes

This feature allows a maximum of 100,000 users to watch a live stream at the same time. If you want to raise the upper limit, submit a ticket.

Overview

Time shifting is based on conventional HTTP Live Streaming (HLS). In live streaming, an ingested stream is divided into TS segments, which are distributed to users by using the HLS protocol. The .m3u8 playlist that users request contains TS segment URLs that are constantly updated.

In conventional HLS, TS segment URLs and corresponding TS files are not persistently stored, making it impossible to trace the video content of a live stream prior to the current time. After the time shifting feature is enabled for HLS, TS segment URLs and corresponding TS files are separately stored in a database and an Object Storage Service (OSS) bucket for up to 30 days. This enables users to trace the video content back from the start time of the live streaming to the current time.

Time shifting is a value-added feature that adopts the pay-as-you-go billing method. To be specific, the bills cover the fees for the time shifting feature and the fees for bandwidth and traffic generated for time-shifting streaming. The fees for the time shifting feature are charged based on the daily amount of time-shifting data that is recorded and the specified number of days the time-shifting data is retained. The fees for time-shifting streaming are charged based on the unit prices of bandwidth and traffic generated for live streaming. For more information about the fees, see the ApsaraVideo Live pricing page.

Procedure

  1. Log on to the ApsaraVideo Live console.
  2. In the left-side navigation pane, click Domains to go to the Domain Management page.
  3. Find the streaming domain that you want to configure and click Domain Settings.
    Domain name configuration
  4. Choose Templates > Time-shifting Settings.
  5. Click Add.
  6. Configure time shifting.
    Time shifting

    The following table describes the parameters that you can set to configure time shifting.

    Parameter Description
    AppName The name of the video application. The value of the AppName parameter must be the same as the application name specified in the ingest URL. Otherwise, the configuration does not take effect. If you need to configure time shifting for all applications in your domain name, enter an asterisk (*).
    StreamName The name of the live stream.
    Time-shifted Content Retention The number of days the time-shifting data is retained. Valid values:
    • 1 Days
    • 3 Days
    • 7 Days
    • 15 Days
    • 30 Days
    Note
    • The time shifting configuration takes effect only for newly ingested streams. If a live stream is in progress, the time shifting configuration does not take effect.
    • You can use the URL that corresponds to the streaming domain to access time-shifting streams. For more information, see Time shifting.
  7. Click OK.