All Products
Search
Document Center

ApsaraVideo Live:Configure default transcoding

Last Updated:Oct 09, 2024

The bitrate of an ingested stream may not be suitable for the network conditions of a streaming client, which may cause video playback issues such as stuttering. The transcoding feature of ApsaraVideo Live helps resolve these issues. This topic describes how to configure default transcoding based on the preset transcoding templates with specific template IDs and transcoding resolutions.

Procedure

  1. Log on to the ApsaraVideo Live console.
  2. In the left-side navigation pane, choose Feature Management > Transcoding.

  3. Select the domain name that you want to configure. On the Default Transcoding tab, click Add to configure a transcoding template.

    49cf8e84bff12e8a7c7ae3d078f2cecf

    The following table describes the parameters that you can configure for the transcoding template.

    Parameter

    Description

    AppName

    • The value of this parameter must be the same as the application name that is specified in the ingest URL. Otherwise, the transcoding template does not take effect.

      The name can be up to 256 characters in length and can contain digits, letters, hyphens (-), and underscores (_).

    • You can also set this parameter to an asterisk (*) to specify any string, including an empty string.

    Note

    If you set this parameter to an asterisk (*), the following rule applies when transcoding starts: The system prioritizes a transcoding template whose AppName matches the application name that is specified in the ingest URL. If such a template does not exist, the system uses a transcoding template whose AppName is set to an asterisk (*).

    Trigger Transcoding

    • If you enable this feature, transcoding is triggered only when a stream is pulled for the first time.

    • If you disable this feature, transcoding is triggered whenever a stream is ingested, regardless of whether the stream is pulled.

    Transcoding Type

    The Narrowband HDTM transcoding supports the following transcoding templates: Low Definition, Standard Definition, High Definition, and Ultra High Definition.

    Note

    You can select multiple transcoding templates at a time.

    The Template ID is used to construct the URL for the transcoded stream. For more information about how to construct a transcoded stream URL, see Generate ingest and streaming URLs.

    The following parameters are specified for the preset transcoding templates:

    Template Name: The valid values include Low Definition, Standard Definition, High Definition, and Ultra High Definition.

    Template ID: Different transcoding templates have different template IDs. For more information, see Preset templates.

    Screen Orientation: The valid values include Landscape and Portrait.

    Resolution (Width × Height): The width and height of the transcoding template.

    Encoding Standard: The valid values include H.264 and H.265.

    Transcoding Mode: The valid values include Quality-first and Latency-first. In the latency-first mode, the transcoded stream has a low latency.

    Encryption

    After you turn on the switch, you can select Alibaba Cloud Proprietary Cryptography or DRM Encryption.

    Note

    Digital rights management (DRM) encryption is supported only in the China (Shanghai) and Singapore regions.

    • Alibaba Cloud Proprietary Cryptography

      • Videos can be generated only in the HTTP Live Streaming (HLS) and Flash Video (FLV) formats.

      • KMS CMK ID: Specify a customer master key (CMK) in Key Management Service (KMS). The region of the CMK must be the same as the region in which the domain name resides. If you do not have a CMK, go to the KMS console to create one. For more information, see Purchase and enable a KMS instance.

      • CMK Rotation Period: Enter an integer from 60 to 3,600.

      • For more information, see Alibaba Cloud proprietary cryptography.

    • DRM Encryption

      • Before you enable this feature, you need to configure DRM encryption. For more information, see Configure DRM encryption.

      • Videos in the HLS format can be encrypted by using Widevine and FairPlay DRM. To use FairPlay DRM, you must upload a FairPlay Streaming certificate that you obtain from Apple on the DRM Management page. For information about how to apply for a FairPlay Streaming certificate, see Apply for a FairPlay Streaming certificate.

  4. Click OK.

Use the feature

For more information about how to use the live stream transcoding feature, see Live stream transcoding.