CSS Transcoding

Last updated: 2021-03-12 11:06:03

    CSS transcoding (including video transcoding and audio transcoding) refers to the process where the original stream pushed from the live streaming site is converted into streams of different codecs, resolutions, and bitrates in the cloud before being pushed to viewers. This meets playback needs in varying network environments on different devices. This document describes how to create, modify, bind, unbind, and delete a transcoding template in the console.

    You can create a transcoding template in two ways:

    Notes

    • CSS supports standard transcoding, top speed codec transcoding, and pure audio transcoding. Please read the billing overview before using the service.
    • Compared with standard transcoding, top speed codec transcoding provides higher image quality at a lower bitrate. Top speed codec transcoding comes with features including intelligent scene recognition, dynamic encoding, and three-level (CTU/line/frame) precise bitrate control model, enabling your live streaming platform to provide higher-definition streaming services at lower bitrates (30% less on average), which effectively reduces your bandwidth costs. This service is widely used in live games, live fashion shows, and other live events.
    • After creating a template, you can bind it to a playback domain name. The binding will take effect in 5–10 minutes.
    • After creating the template, you can add _transcoding template name after the StreamName of a live stream to generate a transcoding stream address. If values of the height and width or the short and long sides of the screen are entered, the resolution of the pushed video should follow the entered values as much as possible to avoid image distortion.
    • After a transcoding template is bound, the configured settings will be displayed in the template. You can also use this template to view and unbind granular settings created through APIs.
    • You can bind one playback domain name to multiple transcoding templates or bind one transcoding template to multiple playback domain names.

    Creating Transcoding Template

    Creating standard transcoding template

    1. Log in to the CSS console and select Feature Configuration > CSS Transcoding.
    2. Click Create Transcoding Template, select Standard Transcoding as the transcoding type, and configure as follows.
    3. After completing the configuration, click Save.

    Basic Settings for Standard TranscodingRequiredDescription
    Transcoding Type Yes You can select standard transcoding, top speed codec transcoding, or pure audio transcoding.
    Template Name Yes CSS transcoding template name, which can contain only letters and alphanumeric combinations. Please enter 1–10 characters.
    Template Description No CSS transcoding template description, which can contain only letters, digits, underscores (_), and hyphens (-).
    Recommended Parameter No Three types of templates are supported: Smooth, SD, and HD. After you select a template, the system will automatically enter the recommended video bitrate and video height. You can also modify them manually.
    Video Bitrate
    (in Kbps)
    Yes Average output bitrate. Value range: 100–8000 Kbps.
    • A value below 1,000 Kbps must be a multiple of 100.
    • A value above 1,000 Kbps must be a multiple of 500.
    Video resolution Yes Default setting: **Set by height**.
  • You should enter the height. You can also switch to **Set the short side length** and then enter the length of the short side of the screen.
  • Value range: 0–3000 px. The value should be a multiple of 2 and the other side of the screen will be scaled proportionally.
  • Advanced Settings for Standard TranscodingRequiredDescription
    Codec No Default setting: original bitrate. You can also select H.264 or H.265 as the codec.
    Video Frame Rate No Value range: 0–60 fps. If this parameter is left empty, the default value 0 fps will be used.
    Keyframe Interval/GOP
    (in seconds)
    No Value range: 2–6 seconds. The larger the GOP, the higher the delay. If this parameter is not set, the system default value will be used.
    Parameter Limit No This is disabled by default and can be enabled manually.
    After the parameter limit is enabled, the original parameter of the input live stream will be the output if the entered parameter is higher than the original parameter. This prevents image quality issues where a low resolution video stream is forced to play back in a higher resolution.

    Creating top speed codec transcoding template

    1. Log in to the CSS console and select Feature Configuration > CSS Transcoding.
    2. Click Create Transcoding Template, select Top Speed Codec Transcoding as the transcoding type, and configure as follows.
    3. Click Save.

    Basic Settings for Top Speed Codec TranscodingRequiredDescription
    Transcoding Type Yes You can select standard transcoding, top speed codec transcoding, or pure audio transcoding.
    Template Name Yes CSS transcoding template name, which can contain only letters and alphanumeric combinations. Please enter 3–10 characters.
    Template Description No CSS transcoding template description, which can contain only letters, digits, underscores (_), and hyphens (-).
    Recommended Parameter No Three types of templates are supported: Smooth, SD, and HD. After you select a template, the system will automatically enter the recommended video bitrate and video height. You can also modify them manually.
    Video Bitrate
    (in Kbps)
    Yes Average output bitrate. Value range: 100–8000 Kbps.
  • A value below 1,000 Kbps must be a multiple of 100.
  • A value above 1,000 Kbps must be a multiple of 500.
  • Video Resolution Yes Default setting: **Set by height**.
  • You should enter the height. You can also switch to **Set the short side length** and then enter the length of the short side of the screen.
  • Value range: 0–3000 px. The value should be a multiple of 2 and the other side of the screen will be scaled proportionally.
  • Advanced Settings for Top Speed Codec TranscodingRequiredDescription
    Codec No Default setting: original bitrate. You can also select H.264 or H.265 as the codec.
    Video Frame Rate No Value range: 0–60 fps. If this parameter is left empty, the default value 0 fps will be used.
    Keyframe Interval/GOP
    (in seconds)
    No Value range: 2–6 seconds. The larger the GOP, the higher the delay. If this parameter is not set, the system default value will be used.
    Parameter Limit No This is disabled by default and can be enabled manually.
    After the parameter limit is enabled, the original parameter of the input live stream will be the output if the entered parameter is higher than the original parameter. This prevents image quality issues where a low resolution video stream is forced to play back in a higher resolution.

    Creating pure audio transcoding template

    1. Log in to the CSS console and select Feature Configuration > CSS Transcoding.
    2. Click Create Transcoding Template, select Pure Audio Transcoding as the transcoding type, configure settings, and then click Save.

    Basic Settings for Pure Audio TranscodingRequiredDescription
    Transcoding Type Yes You can select standard transcoding, top speed codec transcoding, or pure audio transcoding.
    Template Name Yes CSS transcoding template name, which can contain only letters and alphanumeric combinations. Please enter 3–10 characters.
    Template Description No CSS transcoding template description, which can contain only letters, digits, underscores (_), and hyphens (-).

    Binding Domain Name

    1. Log in to the CSS console and select Feature Configuration > CSS Transcoding.
    2. Enter the domain name binding page in either of the following ways:
      • Directly bind a domain name: click Bind Domain Name in the top-left corner.
      • Bind a domain name after creating the transcoding template: after the template is created, click Bind Domain Name in the pop-up.
    3. Select a transcoding template and a playback domain name in the domain name binding window and then click OK.

      Note:

      You can click Add to bind multiple playback domain names to this template.

    Unbinding

    1. Log in to the CSS console and select Feature Configuration > CSS Transcoding.
    2. Select domain names bound to the transcoding template and click Unbind.
    3. Confirm whether to unbind the domain name and click OK to unbind it.

    Modifying Template

    1. Log in to the CSS console and select Feature Configuration > CSS Transcoding.
    2. Select the target transcoding template and click Edit on the right to modify the template information.
    3. Click Save.

    Deleting Template

    Note:

    If the template has been bound to a domain name, you need to unbind the template before deleting it.

    1. Log in to the CSS console and select Feature Configuration > CSS Transcoding.
    2. Select a template which is not bound to any playback domain name and click Delete.
    3. Confirm whether to delete the selected transcoding template and click OK to delete it.

    Relevant Operations

    For more information on binding/unbinding a domain name to/from a transcoding template, please see Transcoding Configuration.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help