This topic describes 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.
The feature allows up to 100,000 viewers to watch a live stream at the same time. If you want to raise the upper limit, submit a ticket. For more information, see Contact us.
Time shifting is based on conventional HTTP Live Streaming (HLS). During live streaming, an ingested stream is sliced into TS segments, which are distributed to viewers over the HLS protocol. The requested M3U8 playlist contains a segment URL that is constantly refreshed.
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 you enable the time shifting feature, 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 allows you to trace the video content back from the start time of the live stream to the current time.
Time shifting is a value-added feature that adopts the pay-as-you-go billing method. The bills for time shifting cover the fees for using the time shifting feature and the fees for bandwidth and traffic generated for time shifting. The fees for using the time shifting feature are charged based on the daily amount of time-shifting data that is written and the specified number of days the time-shifting data is retained. The fees for bandwidth and traffic generated for time shifting are charged based on the unit prices of bandwidth and traffic for streaming. For more information, visit the ApsaraVideo Live pricing page.
- Log on to the ApsaraVideo Live console.
- In the left-side navigation pane, click Domains to go to the Domain Management page.
Find the streaming domain that you want to configure and click Domain Settings in the Actions column.
Configure time shifting.
The following table describes the parameters that you can specify to configure time shifting.
The name of the application. The value of the Application Name 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 (*).
The name of the live stream.
Time-shifted Content Retention
The number of days the time-shifting data is retained. Valid values:
The time shifting configuration takes effect only for newly ingested streams, but not for live streams in progress.
You can use the URL that corresponds to the streaming domain to access time-shifting streams. For more information, see Time shifting.
If the main streaming domain is associated with a sub-streaming domain, go to the configuration page of the sub-streaming domain and enable time shifting for the sub-streaming domain. Otherwise, the time shifting settings do not take effect for the sub-streaming domain.
You are charged for time shifting based on the daily amount of time-shifting data that is written and the specified number of days the time-shifting data is retained. For more information, see Billing of time shifting.