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.


Time shifting is based on conventional HTTP Live Streaming (HLS). In live streaming, an ingest 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 persistently 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 is billed in pay-as-you-go mode. The billing items include 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 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 consumed for live streaming. For more information about the fees, see the ApsaraVideo Live pricing page.


  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.
    Configure time shifting

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

    Parameter Description
    Application Name The name of the video application. The value of this 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, enter an asterisk (*).
    Stream Name The name of the live stream.
    Time-shifted Content Retention Valid values:
    • 1 Days
    • 3 Days
    • 7 Days
    • 15 Days
    • 30 Days

    The time shifting configuration takes effect only for newly ingested streams. The time shifting configuration does not take effect for live streams in progress.

    You can use the URL that corresponds to the live streaming domain to access time-shifting streams. For more information, see Time-shifting live streaming.

  7. Click OK.