tencent cloud


Time Shifting

Last updated: 2022-06-02 16:51:05

    Powered by the recording capability of CSS, the time shifting feature allows viewers to rewind and play back a video stream from earlier time points. When time shifting is enabled for a VOD playback domain, TS segment URLs and TS files for the video are saved in VOD, and the user can play back earlier video content by passing a time parameter in the request URL under the playback domain.

    How It Works

    In HLS streaming, a video stream is split into TS segments. Viewers use an M3U8 file to access a TS segment URL, get the TS file, and play the video content starting from that TS segment.


    TS files are not saved permanently, so there is a limit to how far back in time playback can start from.


    The time shifting feature has been in beta testing so far. However, we will start charging for use of the feature starting from 00:00 on June 1, 2022. For details, see Notice: Time Shifting to Become Paid Feature. Time shifting relies on recording, so you will also be charged live recording fees by CSS and storage and playback fees by VOD.

    How to Use Time Shifting


    • You have [signed up for a Tencent Cloud account(https://www.tencentcloud.com/document/product/378/17985).
    • You have activated CSS and added a push domain name.

    Step 1. Activate VOD

    1. Log in to the VOD console and click Activate Now.
    2. Select the checkbox to agree to the service agreement, and click OK to activate VOD.

    Step 2. Add a domain name

    Follow the steps below to add a VOD domain name for time shifting:

    1. Go to the VOD console and select Distribution and Playback > Domain Name on the left sidebar.
    2. Click Add Domain and enter a VOD domain name that has been registered with an ICP filing number. For more information, 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 Recording Template. For detailed directions for creating a recording template, see Live Recording.

      • Choose HLS as the recording format.
      • Enter a custom storage period, which cannot be shorter than the time-shift duration.
    3. Bind the recording template with the push domain you want to use. For detailed directions, see Recording Configuration.

    Step 4. Enable time shifting

    Submit a ticket to enable the time shifting feature. You need to select CSS as the product and provide the following information:

    • The VOD domain name added in Step 2.
    • The ID of the recording template added in Step 3.
    • A custom value (seconds) for timeshift_dur (time-shift duration).

      • The time-shift duration indicates how far back from the current time you can play back the video stream. Currently, the longest time-shift duration allowed is 30 days.
      • Given that the time-shift duration you configure may not exactly match the actual time-shift duration, we recommend you set the duration a little longer than you actually need.
      • For example, if the parameter is set to 7200 (2 hours), you will be able to request content generated 2 hours ago or later, and the value range for the playback delay parameter delay is 90 seconds to 2 hours. If delay is set to a value larger than 2 hours, HTTP 404 will be returned even if there is live streaming content at that time point.

    Playback Request

    Request URL format


    Parameter description

    Parameter Description
    [Domain] The VOD domain name added in Step 2 for time shifting.
    timeshift A non-customizable parameter.
    [AppName] The application name. For example, if your application name is live, set this parameter to live.
    [StreamName] The stream name. Set this parameter to the name of the stream for which you want to enable time shifting.
    timeshift.m3u8 A non-customizable parameter.
    delay The playback delay time (seconds). If you pass in a value smaller than 90, 90 will be used.


    Suppose the time-shift domain name is testtimeshift.com, application name is live, and stream name is SLPUrIFzGPE. To play back video content from 5 minutes ago, you should use the following request URL:

    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 avaliable.

    7x24 Phone Support