tencent cloud

All product documents
Video on Demand
Live Streaming Time Shifting
Last updated: 2024-10-12 10:22:55
Live Streaming Time Shifting
Last updated: 2024-10-12 10:22:55
Combining the time shifting feature of CSS and the delivery acceleration capability of VOD, time shifting for live stream playback allows users to rewind and play back earlier parts of a live stream. This is commonly used to play back highlights during live streamed sports events. Users can drag the progress bar to view earlier parts of a live stream, and they can also switch back to continue viewing the currently ongoing live stream.

Strengths

Users can specify the delay for playing live content, i.e., the difference between the playback start time and current time.
Users can specify the bitrate for time shifting if a live stream is recorded in multiple bitrates.

Prerequisites

You have signed up for a Tencent Cloud account and logged in.
You have activated CSS and added a push domain.

Must-Knows

Before you can use the time shifting feature, you must first enable the feature for a stream.
Currently, the smallest time-shift offset is 90 seconds, which means there must be a delay of at least 90 seconds between live content and time-shifted content.
Time shifting relies on the live recording feature. Therefore, you may also incur VOD storage and traffic costs.

Directions

Step 1. Activate VOD

1. Go to the VOD console. Click Activate Now.
2. Agree to the service agreement, and click OK to activate VOD.

Step 2. Add a domain for time shifting

Follow the steps below to add a VOD domain for time shifting:
1. Log in to the VOD console. Select Application Management on the left sidebar and select the target application. Go to Distribution and Playback > Domain Name.
2. Click Add Domain and enter a domain name. For detailed directions, see Distribution and Playback Settings.



3. Add a CNAME record for the domain.

Step 3. Bind a recording template

1. Go to the CSS console and select Feature Configuration > Live Recording.
2. Click Create Template. For detailed directions, see Live Recording.

Note:
Select HLS as the file format.
Set the file storage period, which cannot be shorter than the time-shift period.
3. Bind the recording template to the push domain. For detailed directions, see Recording Configuration.

Step 4. Enable time shifting

You need to submit a ticket to enable the time shifting feature: Select "CSS", make your request, and provide the following parameters:
The domain added in Step 2.
The ID of the recording template created in Step 3.
The time-shift period (timeshift_dur) 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.
This 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 time-shift period is set to 7200 (two hours), you will be able to request content generated as early as two hours ago. (i.e., the value range for playback delay is 90 seconds to 2 hours). If content generated earlier than two hours ago is requested, HTTP 404 will be returned even if there is live streaming content at the requested time.

Playback Request

Request URL format

http://[Domain]/timeshift/[AppName]/[StreamName]/timeshift.m3u8?delay=xxx

Parameter description

Parameter
Description
[Domain]
The domain you registered for time shifting (the domain you added in the VOD console).
timeshift
This is a fixed field. You don't need to modify it.
[AppName]
The application name. For example, if your application is named live, pass in live.
[StreamName]
The stream name.
timeshift.m3u8
This is a fixed field. You don't need to modify it.
delay
The playback delay (seconds). This parameter cannot be smaller than 90. If you pass in a value smaller than 90, 90 will be used.

Example

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?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon