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 and enter the VOD domain name. For more information, please see Distribution and Playback Settings.
Configure the new domain CNAME.
Log in to the CSS console and click Feature Configuration > Live Recording.
Click Create Recording Template to create a recording template. For more information, please see Recording Template Configuration.
Note:
- 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.Note:
- 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 parameterdelay
is 90 seconds to 2 hours). If content generated more than 2 hours ago is requested,HTTP 404
will be returned even if there is live streaming content.
http://[Domain]/timeshift/[AppName]/[StreamName]/timeshift.m3u8?delay=xxx
Parameter | Description |
---|---|
[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 live , then enter live . |
[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 90 or larger. It will be defaulted to 90 if the value specified is less than 90 . |
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:
http://testtimeshift.com/timeshift/live/SLPUrIFzGPE/timeshift.m3u8?delay=300
Was this page helpful?