tencent cloud

Feedback

Template Configuration

Last updated: 2024-05-28 10:26:22
    With CSS, the original bitrate is used for playback by default. To use a different playback bitrate, you can bind your domain with a transcoding or adaptive bitrate template. This document shows you how to bind a template to and unbind a template from a playback domain.

    Notes

    A template takes effect about 5-10 minutes after it is bound to a domain.
    After you specify a transcoding template, the backend will generate playback URLs of different formats for the transcoded stream. To avoid image distortion, push the stream at a resolution as close as possible to the original resolution.
    H.265 is supported by fewer players than H.264. Playback may fail if a player does not support H.265. To solve this issue, you can configure a transcoding template to transcode your video to H.264.
    Loading may take some time for the first user accessing the URL that uses a different playback bitrate.
    One domain can be bound with multiple transcoding templates. After you bind a template, videos will be transcoded as specified in the template.
    You can create up to 50 transcoding templates.

    Prerequisites

    You have logged in to the CSS console and added a playback domain name.

    Transcoding Template

    Binding a transcoding template

    1. Go to Domain Management. Click the name of your playback domain or Manage on the right.
    
    2. Select Template Configuration > Transcoding Configuration , and click Edit in the upper-right corner of the Transcoding Configuration tab.
    
    3. Based on your actual business needs, choose different transcoding configuration templates.
    Note:
    Choosing different transcoding configuration templates will specify the encoding method and bitrate settings set by the transcoding template for the playback URL under that domain.
    
    4. Click Confirm.

    URL format for transcoded streams

    After binding a transcoding template, append its name to your playback URL ( playback URL_transcoding template name). If you do not append the template name, the original stream will be played. For more information on playback URLs, see Playback Configuration.
    Suppose the name of the transcoding template bound is hd, and the original playback URL is as follows:
    http://domain/AppName/StreamName.flv?txSecret=Md5(key+StreamName+hex(time))&txTime=hex(time)
    To play the transcoded stream, you need to use the following URL:
    http://domain/AppName/StreamName_hd.flv?txSecret=Md5(key+StreamName_hd+hex(time))&txTime=hex(time)

    Unbinding a transcoding template

    1. Go to Domain Management. Click the name of your playback domain or click Manage on the right.
    
    2. Select Template Configuration > Transcoding Configuration , and click Edit in the upper-right corner of the Transcoding Configuration tab.
    
    3. Based on your actual business needs, deselect the corresponding templates.
    
    4. Click Confirm.
    Note
    To delete a template, you need to unbind it first and then go to Feature Configuration > Live Transcoding to delete it. For details, see Deleting a Template.

    Adaptive Bitrate Template

    Binding an adaptive bitrate template

    1. Go to Domain Management. Click the name of your playback domain or Manage on the right.
    
    2. Select Template Configuration > Adaptive bitrate configuration , and click Edit in the upper-right corner of the Adaptive bitrate configuration tab .
    
    3. Based on your actual business needs, choose the appropriate adaptive bitrate configuration template.
    Note:
    Choosing different adaptive bitrate configuration templates will specify the sub-stream information set by the adaptive bitrate template for the playback URL under that domain.
    
    4. Click Confirm.

    Adaptive bitrate URL format

    Only HLS and WebRTC are supported for adaptive bitrate playback. The URL formats for the two protocols are different. For details, see Playback Configuration. HLS URL: Suppose the name of the adaptive bitrate template bound is autobitrate, and the original playback URL is as follows:
    http://domain/AppName/StreamName.m3u8?txSecret=Md5(key+StreamName+hex(time))&txTime=hex(time)
    To play the transcoded stream, you need to use the following URL:
    http://domain/AppName/StreamName_autobitrate.m3u8?txSecret=Md5(key+StreamName_autobitrate+hex(time))&txTime=hex(time)
    WebRTC URL: Suppose the adaptive bitrate template bound has three streams. Their names are "test 1", "test 2", and "test 3", and their bitrates are 200 Kbps, 300 Kbps, and 400 Kbps respectively. The adaptive bitrate playback URL would be as follows:
    webrtc://domain/AppName/StreamName?txSecret=Md5(key+StreamName+hex(time))&txTime=hex(time)&tabr_bitrates=test3,test2,test1&tabr_start_bitrate=test1&tabr_control=auto.

    Unbinding an adaptive bitrate template

    1. Go to Domain Management. Click the name of your playback domain or click Manage on the right.
    
    2. Select Template Configuration > Adaptive bitrate configuration , and click Edit in the upper-right corner of the Adaptive bitrate configuration tab .
    
    3. Based on your actual business needs, deselect the corresponding templates.
    
    4. Click Confirm.
    Note
    To delete a template, you need to unbind it first and then go to Feature Configuration > Live Transcoding to delete it. For details, see Deleting a Template.
    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