Time-shift playback in live streaming is based on live recording, live streaming time shifting, and VOD accelerated distribution. After a live streaming starts, a viewer can choose a previous time point other than the current time to start watching. This is commonly used to play back highlights in sport events. Users can change the progress bar to view contents generated earlier than the current time without waiting until the end of the live streaming. At the same time, the live streaming stays the same and users can switch back to the live streaming.
To add the Tencent Cloud VOD domain name for time-shift playback, perform the following:
Log in to the VOD console and click Distribution and Playback > Domain Name in the left sidebar.
Click Add Domain Name and enter the VOD domain name. For more information, please see Distribution and Playback Settings
Configure the new domain CNAME.
Click Create Recording Template to create a recording template. For more information, please see Recording Template Configuration.
- Select HLS as the file type.
- Set the file storage duration, which cannot be shorter than the time-shift period.
Bind the recording template with the push domain name to be configured. For more information, please see Recording Configuration.
You can submit a ticket, select “CSS” and request to activate time shifting feature and provide the following parameters:
timeshift_dur, which is measured in seconds.
- Time-shift period indicates how further back you can go in terms of time shifting. The maximum time-shift period allowed currently is 7 days.
- The feature may not work exactly according to the period configured. We recommend you set the period a little longer than you actually need.
- If the parameter is set to
7200(2 hours), you will be able to request content generated since 2 hours ago. (i.e., the value range for the playback delay parameter
delayis 90 seconds to 2 hours). If content generated more than 2 hours ago is requested,
HTTP 404will be returned even if there is live streaming content.
|[Domain]||The registered domain name of the time shifting feature, namely, the time-shift playback domain name you added to the VOD console.|
|timeshift||Fixed field which needs no modification|
|[AppName]||Application name. If your application name is
|[StreamName]||Stream name. Enter the name of the stream you request.|
|timeshift.m3u8||Fixed field which needs no modification|
|delay||Playback delay (s). This parameter must be
Suppose the time-shift domain name is
testtimeshift.com, application name
live, and stream name
SLPUrIFzGPE. If you need to play back live content generated 5 minutes ago, the request URL should be: