All Products
Search
Document Center

ApsaraVideo Live:Live stream transcoding

Last Updated:Dec 26, 2024

The bitrate of an ingested stream may not be suitable for the network conditions of viewer clients, causing video playback issues such as stuttering. The transcoding feature of ApsaraVideo Live helps resolve these issues. This topic introduces the application scenarios, limits, and configurations of transcoding.

Scenarios

  • If a high bitrate is set on the stream ingest client, insufficient bandwidth on the viewer client may cause stuttering during video playback. If a low bitrate is set on the stream ingest client, the video quality is poor. In these scenarios, you can use the transcoding feature to improve the viewing experience.

  • To implement multi-bitrate streaming, the player plug-in requires streaming URLs of the ingested stream at different bitrates. In this scenario, you can use the real-time transcoding feature to generate multiple URLs.

    • Transcoding live streams from H.264 to H.265 can reduce bandwidth.

    • H.265 codec can transcode live streams into low-bitrate format.

    • Transcoding live streams from H.265 to H.264 can resolve the incompatibility issue with some browsers.

Important

You are charged for transcoding based on the transcoding standard, resolution, and duration. For more information, see Billing of live stream transcoding.

Limits

  • Transcoding templates are configured based on application names. For the transcoding settings to take effect, the application name specified in a template must be the same as that in the ingest URL. A sub-streaming domain uses the transcoding templates of its main streaming domain.

  • For live centers in the China (Beijing), China (Shanghai), and China (Shenzhen) regions, each domain name supports up to 300 concurrent transcoded streams. For live centers in other regions, the upper limit is 50. If you transcode a high definition (HD) stream into standard definition (SD) and low definition (LD), two transcoded streams are generated. When the upper limit is reached, additional streams will play at their original bitrate. You can view the current usage or increase the quota on the Basic Settings > Basic Information page of a streaming domain.

  • If your business requirements extend beyond what ApsaraVideo Live currently offers, contact your account manager or Alibaba Cloud customer service.

Overview

ApsaraVideo Live supports default transcoding, custom transcoding, multi-bitrate transcoding, and HTML5 auto transcoding.

Default transcoding: You can select a preset transcoding template. The template ID, output resolution, and output bitrate in such a template are not adjustable.

Custom transcoding: You can specify the encoding format, resolution, bitrate, frame rate, group of pictures (GOP) size, template ID, and the method to trigger transcoding.

Multi-bitrate transcoding: You can add multiple transcoding templates to a template group. The player automatically plays streams at the most appropriate bitrate based on the network condition.

HTML5 auto transcoding: This feature resolves the problem that native browsers do not support B-frames and AAC audio encoding in ultra-low latency live streaming using ApsaraVideo Real-time Communication (ARTC).

Preset templates

  • Narrowband HDTM

Template

Template ID (H264, quality-first)

Template ID (H265, quality-first)

Template ID (H264, latency-first)

Template ID (H265, latency-first)

Resolution

Bitrate

Low definition (landscape)

ld

ld265

ld-ll

ld265-ll

Width: adaptive

Height: 360

≤ 450

Standard definition (landscape)

sd

sd265

sd-ll

sd265-ll

Width: adaptive

Height: 432

≤ 480

High definition (landscape)

hd

hd265

hd-ll

hd265-ll

Width: adaptive

Height: 648

≤ 1200

Ultra high definition (landscape)

ud

ud265

ud-ll

ud265-ll

Width: adaptive

Height: 1080

≤ 1300

Standard definition (landscape)

sd540

sd265-540

sd540-ll

sd265-540-ll

Width: adaptive

Height: 540

≤ 480

Low definition (portrait)

ld-v

ld265-v

ld-v-ll

ld265-v-ll

Width: 360

Height: adaptive

≤ 450

Standard definition (portrait)

sd-v

sd265-v

sd-v-ll

sd265-v-ll

Width: 432

Height: adaptive

≤ 480

High definition (portrait)

hd-v

hd265-v

hd-v-ll

hd265-v-ll

Width: 648

Height: adaptive

≤ 1200

Ultra high definition (portrait)

ud-v

ud265-v

ud-v-ll

ud265-v-ll

Width: 1080

Height: adaptive

≤ 1300

Standard definition (portrait)

sd540-v

sd265-540-v

sd540-v-ll

sd265-540-v-ll

Width: 540

Height: adaptive

≤ 480

Important
  • The transcoding standard for billing is determined by the width and height of the output video, instead of the template ID. Assume that you choose a low-definition template (template ID: ld). If the short edge is no greater than 480 pixels and the long edge is no greater than 640 pixels, the transcoding standard for billing is 480p (LD). If the resolution of the output video is 700 × 360 pixels, the transcoding standard for billing is 720p (SD). For more information, see Billing of live stream transcoding.

Transcoding rules

  • ApsaraVideo Live supports delayed transcoding. This feature allows ApsaraVideo Live to start transcoding a live stream only when a viewer joins the live stream and stops transcoding if no viewers are detected for 5 minutes.

  • Each stream can be transcoded only once.

  • Transcoding is optional. Configure the feature based on your business requirements.

  • You can transcode streams in the Flash Video (FLV), Real-Time Messaging Protocol (RTMP), HTTP Live Streaming (HLS), and Real-Time Streaming (RTS) formats.

Adaptive resolution

ApsaraVideo Live preserves the aspect ratio of a video during transcoding.

  • When the template orientation is landscape, the width of the output video is automatically adapted to the fixed height.

  • When the template orientation is portrait, the height of the output video is automatically adapted to the fixed width.

Example:

高度自适应

If you use the low-definition (landscape) template (ID: ld) to transcode a 1920 x 1080 video, the height of the output video is fixed (360 pixels), and the width is scaled proportionally to 640 pixels.

If you use the low-definition (portrait) template (ID: ld-v) to transcode a 1920 x 1080 video, the width of the output video is fixed (360 pixels), and the height is scaled proportionally to 203 pixels.

Important

Only default transcoding and custom transcoding support adaptive resolution.

Feature configuration

Default transcoding

You can configure default transcoding in the ApsaraVideo Live console or through API operations.

ApsaraVideo Live console

  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 manage. On the Default Transcoding tab, click Add to configure a transcoding template.

    49cf8e84bff12e8a7c7ae3d078f2cecf

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

    Parameter

    Description

    Application Name

    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 turn on the switch, transcoding is triggered only when a stream is pulled for the first time.

    • If you turn off the switch, transcoding is triggered whenever a stream is ingested.

    Transcoding Type

    • Valid value: Narrowband HD™.

    • 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. For details about template IDs and transcoding modes, see Preset templates.

    • The template ID and AppName serve as a composite primary key.

    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 HLS and 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 live center 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.

API

        // Replace the placeholders with actual values.
        DefaultProfile profile = DefaultProfile.getProfile("<regionId>", "<ALIBABA_CLOUD_ACCESS_KEY_ID>", "<ALIBABA_CLOUD_ACCESS_KEY_SECRET>");
        IAcsClient client = new DefaultAcsClient(profile);
        AddLiveStreamTranscodeRequest addLiveStreamTranscodeRequest = new AddLiveStreamTranscodeRequest();
        addLiveStreamTranscodeRequest.setDomain("<DomainName>");
        addLiveStreamTranscodeRequest.setApp("<AppName>");
        addLiveStreamTranscodeRequest.setTemplate("<ld>");
        addLiveStreamTranscodeRequest.setLazy("<true>");
        
        try {
            AddLiveStreamTranscodeResponse addLiveStreamTranscodeResponse = client.getAcsResponse(addLiveStreamTranscodeRequest);
            System.out.println(new Gson().toJson(addLiveStreamTranscodeResponse));
            // todo something.
        } catch (ServerException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ClientException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }           
Note
  • In this example, the preset transcoding template <ld> is applied to live streams in the application specified by the AppName parameter. For more information about preset templates, see Preset templates.

  • setLazy("<true>") specifies that the transcoding is triggered only when a stream is pulled. setLazy("false") specifies that the transcoding is triggered when a stream is ingested.

  • For more information about API parameters, see AddLiveStreamTranscode.

To view the URLs of the transcoded streams, log on to the ApsaraVideo Live console and choose Streams in the left-side navigation pane. On the Active Streams tab, find the ingested stream that you want to view and click View URLs in the Actions column.

Note
  • The ApsaraVideo Live console displays URLs of the source and transcoded streams.

  • To generate the URL of a transcoded stream, add _<Transcoding template ID> after the StreamName in the URL of the source stream. For more information, see Generate ingest and streaming URLs.

Custom transcoding

Custom transcoding allows you to customize the encoding format, resolution, bitrate, frame rate, GOP size, template ID, and the method to trigger transcoding.

You can configure custom transcoding in the ApsaraVideo Live console or through API operations.

ApsaraVideo Live console

  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 manage. On the Custom Transcoding tab, click Add to configure a transcoding template.

    image.png

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

    Parameter

    Description

    Application Name

    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 (*).

    Template ID

    • The value of this parameter is used to construct the URL of the transcoded stream. For more information, see Generate ingest and streaming URLs.

    • The template ID must be different from default transcoding template IDs. For details about default IDs, see Preset templates.

    • The template ID and AppName serve as a composite primary key.

    Template Type

    • Valid values: Narrowband HD™ Transcoding and Audio-only Transcoding.

    • An audio-only transcoding template removes the video content and generates an audio-only stream.

    Transcoding Format

    Valid values: H.264 and H.265.

    Recommended Parameter Settings

    Valid values: Low Definition, Standard Definition, High Definition, and Ultra High Definition.

    After you select one, the system automatically fills in the corresponding frame rate, bitrate, and resolution. You can modify them based on your business requirements.

    Resolution

    The resolution of the output stream. Unit: pixels. You can specify a fixed resolution or configure source-based values.

    Source-based: If the resolution of the source stream is smaller than the adaptive resolution, the output resolution is equal to the source resolution. Otherwise, the output resolution is equal to the adaptive resolution. You can select one of the following adaptation methods:

    • Adapted to Shorter Side

    • Adapted to Longer Side

    • Adapted to Orientation

    Fixed: Different prices apply to different resolutions. The following transcoding standards for billing are available:

    • Low definition (LD): 640 × 480 and lower

    • Standard definition (SD): 1280 × 720 and lower

    • High definition (HD): 1920 × 1080 and lower

    • 2K: 2560 × 1440 and lower

    • 4K: 3840 × 2160 and lower

    Note

    • You cannot specify a custom resolution higher than 1080p in the console. If your business scenario requires a resolution of 2K or 4K, submit a ticket.

    • The transcoding standard for billing is determined by the width and height of the output video and is irrelevant to the preset template IDs for Narrowband HD™ transcoding, including ld, sd, hd, and ud.

      Take the SD resolution (1280 × 720) as an example.

      • If the long edge of an output stream has no more than 1,280 pixels and the short edge has no more than 720 pixels, the transcoding standard for billing is SD.

      • If the long edge of an output stream has more than 1,280 pixels, or the short edge has more than 720 pixels, the transcoding standard for billing is higher than SD.

    Video Frame Rate (FPS)

    Source-based: If the frame rate of the source stream is within the specified limits, the output frame rate is equal to the source frame rate. If it exceeds the upper limit, the output is capped at the maximum frame rate. If it falls below the lower limit, the output is set to the minimum frame rate.

    Fixed: The output stream uses the specified frame rate. The value must be smaller than or equal to the frame rate of the input stream.

    Video Bitrate

    Source-based: If the bitrate of the source stream is within the specified limits, the output bitrate is equal to the source bitrate. If it exceeds the upper limit, the output is capped at the maximum bitrate. If it falls below the lower limit, the output is set to the minimum bitrate. You can also specify a coefficient.

    Fixed: The output stream uses the specified bitrate. The following list describes the bitrate ranges for different resolutions:

    • LD: 100 to 800 Kbit/s

    • SD: 200 to 1,500 Kbit/s

    • HD: 500 to 4,000 Kbit/s

    • 2K: 2,000 to 8,000 Kbit/s

    • 4K: 4,000 to 30,000 Kbit/s

    Video GOP

    The GOP size indicates the interval between two I-frames. The GOP size of the output stream must be smaller than or equal to the GOP size of the input stream. To ensure low latency, the value cannot exceed 3 seconds.

    Audio Bitrate

    This parameter is available when you set Template Type to Audio-only Transcoding.

    Unit: Kbit/s. Valid values: 8 to 1000.

    Profile

    This parameter is available when you set Template Type to Audio-only Transcoding.

    • LC-AAC: advanced audio coding with low complexity. The transcoding efficiency is high.

    • HE-AAC: advanced audio coding with high efficiency. The sound effect of HE-AAC is better than that of LC-AAC when the audio bitrate is lower than 128 Kbit/s.

    Sampling Rate

    This parameter is available when you set Template Type to Audio-only Transcoding.

    Valid values: 22050, 32000, 44100, 48000, and 96000.

    Sound Channels

    This parameter is available when you set Template Type to Audio-only Transcoding.

    Valid values: 1 and 2.

    Advanced Settings

    Transcoding Mode

    The quality-first and latency-first modes are supported. In the latency-first mode, low latency is ensured for the transcoded stream.

    Trigger Transcoding

    • If you turn on the switch, transcoding is triggered only when a stream is pulled for the first time.

    • If you turn off the switch, transcoding is triggered whenever a stream is ingested.

    Video Encryption

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

    Note

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

    • Alibaba Cloud Proprietary Cryptography

      • Videos can be generated only in the HLS and 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 live center 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.

    All SEI Passed-through

    If you enable this feature, all SEI messages are passed through.

    Source-based Keyframes

    If you enable this feature, the keyframes of the transcoded stream are the same as the keyframes of the source stream.

    Source-based PTS

    If you enable this feature, the presentation timestamp (PTS) of the transcoded stream is the same as the PTS of the source stream.

  4. Click OK.

API

The parameter configuration of relevant API operations is complex. We recommend that you use the APIs in conjunction with the console, because the console provides resolution preview and supports automatically filling in the preset templates.

Procedure

  1. Add a template for custom transcoding in the ApsaraVideo Live console.

  2. Call the DescribeLiveStreamTranscodeInfo operation to query the template added. SDK for Java sample code:

        // Replace the placeholders with actual values.
        DefaultProfile profile = DefaultProfile.getProfile("<regionId>", "<ALIBABA_CLOUD_ACCESS_KEY_ID>", "<ALIBABA_CLOUD_ACCESS_KEY_SECRET>");
        IAcsClient client = new DefaultAcsClient(profile);
        DescribeLiveStreamTranscodeInfoRequest describeLiveStreamTranscodeInfoRequest=new DescribeLiveStreamTranscodeInfoRequest();
        describeLiveStreamTranscodeInfoRequest.setAppName("<AppName>");
        describeLiveStreamTranscodeInfoRequest.setDomainTranscodeName("<DomainName>");
        DescribeLiveStreamTranscodeInfoResponse describeLiveStreamTranscodeInfoResponse = null;
        try {
            describeLiveStreamTranscodeInfoResponse = client.getAcsResponse(describeLiveStreamTranscodeInfoRequest);
        } catch (ClientException e) {
            e.printStackTrace();
        }
        System.out.println(new Gson().toJson(describeLiveStreamTranscodeInfoResponse));
Note
  1. Call the AddCustomLiveStreamTranscode operation to add a custom transcoding configuration based on the domain name and application name.

        AddCustomLiveStreamTranscodeRequest addCustomLiveStreamTranscodeRequest=new AddCustomLiveStreamTranscodeRequest();
        addCustomLiveStreamTranscodeRequest.setDomain("<DomainName>");
        addCustomLiveStreamTranscodeRequest.setApp("<AppName>");
        /**
         * Configure transcoding parameters.
         */
        AddCustomLiveStreamTranscodeResponse addCustomLiveStreamTranscodeResponse = null;
        try {
            addCustomLiveStreamTranscodeResponse = client.getAcsResponse(addCustomLiveStreamTranscodeRequest);
        } catch (ClientException e) {
            e.printStackTrace();
        }
        System.out.println(new Gson().toJson(addCustomLiveStreamTranscodeResponse));
Note
  • For information about how to configure transcoding parameters, see AddCustomLiveStreamTranscode. You can take the query result obtained in Step 2 as a reference.

Usage notes:

  • A newly configured or modified template does not take effect on an ongoing live stream. You must re-ingest the stream.

  • The value of the AppName parameter must be the same as the application name specified in the ingest URL. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_), but cannot start with hyphens (-) and underscores (_).

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

  • 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 (*).

  • The template ID and AppName serve as a composite primary key.

To view the URLs of the transcoded streams, log on to the ApsaraVideo Live console and choose Streams in the left-side navigation pane. On the Active Streams tab, find the ingested stream that you want to view and click View URLs in the Actions column.

Note
  • The ApsaraVideo Live console displays URLs of the source and transcoded streams.

  • To generate the URL of a transcoded stream, add _<Transcoding template ID> after the StreamName in the URL of the source stream. For more information, see Generate ingest and streaming URLs.

Multi-bitrate transcoding

ApsaraVideo Live allows you to add multiple transcoding templates to a group to transcode streams to multiple bitrates. This reduces the impact of network jitters on the playback experience. After you configure multi-bitrate transcoding, the player automatically plays streams at the most appropriate bitrate based on the network condition.

You can configure multi-bitrate transcoding only in the ApsaraVideo Live console.

ApsaraVideo Live console

  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 manage. Click the Multi-bitrate Transcoding tab, and then click Add to create a multi-bitrate transcoding template group.

    1. On the Basic Information tab, configure the basic information of the multi-bitrate transcoding template group.

      多码率转码模板组-基本信息

      The following table describes the parameters.

      Parameter

      Description

      AppName

      The transcoding templates take effect only when the value of this parameter is the same as the application name in the ingest URL.

      The template ID and AppName serve as a composite primary key.

      Template Group ID

      The ID of the transcoding template group. The ID is concatenated to the URLs of the transcoded streams. The value can be up to 10 characters in length and can contain digits, letters, and hyphens (-).

      Container Format

      Only HLS is supported.

      Trigger Transcoding

      Multi-bitrate transcoding can be triggered only upon stream ingest.

      Timestamp Alignment

      After you enable this feature, you are not allowed to specify the GOP size for templates. The GOP size of the source video is used.

    2. Click + Add to add a template.image

      Click the added template to configure the parameters, which may vary based on the template type. The following table describes the parameters.

      Parameter

      Description

      Template ID

      The template ID must be unique in the transcoding template group.

      Template Type

      Valid values: Narrowband HD™ and Audio-only.

      An audio-only transcoding template removes the video content and generates an audio-only stream.

      Transcoding Format

      Valid values: H.264 and H.265.

      Resolution

      The resolution of the output stream. Unit: pixels.

      Different prices apply to different resolutions. The following transcoding standards for billing are available:

      • Low definition (LD): 640 × 480 and lower

      • Standard definition (SD): 1280 × 720 and lower

      • High definition (HD): 1920 × 1080 and lower

      • 2K: 2560 × 1440 and lower

      • 4K: 3840 × 2160 and lower

      Note

      • The transcoding standard for billing is determined by the width and height of the output video and is irrelevant to the preset template IDs for Narrowband HD™ transcoding, including ld, sd, hd, and ud.

        Take the SD resolution (1280 × 720) as an example.

        • If the long edge of an output stream has no more than 1,280 pixels and the short edge has no more than 720 pixels, the transcoding standard for billing is SD.

        • If the long edge of an output stream has more than 1,280 pixels, or the short edge has more than 720 pixels, the transcoding standard for billing is higher than SD.

      Video Bitrate

      The bitrate that corresponds to the resolution. Unit: Kbit/s. The following list describes the bitrate ranges for different resolutions:

      • LD: 100 to 800 Kbit/s

      • SD: 200 to 1,500 Kbit/s

      • HD: 500 to 4,000 Kbit/s

      • 2K: 2,000 to 8,000 Kbit/s

      • 4K: 4,000 to 30,000 Kbit/s

      Video Frame Rate

      The frame rate of the output stream. Unit: FPS. The value must be smaller than or equal to the frame rate of the input stream.

      Video GOP

      The GOP size indicates the interval between two I-frames. The GOP size of the output stream must be smaller than or equal to the GOP size of the input stream. To ensure low latency, the value cannot exceed 3 seconds.

      Encoding Standard

      This parameter is available when you set Template Type to Audio-only. Only Advanced Audio Coding (AAC) is supported.

      Codec

      This parameter is available when you set Template Type to Audio-only. Valid values:

      • LC-AAC: advanced audio coding with low complexity. The transcoding efficiency is high.

      • HE-AAC: advanced audio coding with high efficiency. The sound effect of HE-AAC is better than that of LC-AAC when the audio bitrate is lower than 128 Kbit/s.

      Bitrate (Kbit/s)

      The audio bitrate. This parameter is available when you set Template Type to Audio-only. Valid values: 8 to 1000.

      Channels

      The number of sound channels. This parameter is available when you set Template Type to Audio-only. Valid values: 1 and 2.

      Maximum Bandwidth

      Valid values: 100 Kbit/s to 100 Mbit/s. The value is accurate to 2 decimal places. We recommend that you set the maximum bandwidth to 1.2 to 1.5 times the video bitrate.

  4. Click OK.

Important
  • Multi-bitrate transcoding provides URLs of the source stream and transcoded streams in HLS format.

  • The aliyunols=on field must be added to the streaming URL to play a transcoded stream.

Sample URL of a transcoded stream:

http://<DomainName>/<AppName>/<StreamName>_<Template group ID>.m3u8?aliyunols=on&auth_key=1234****

The following example shows how to use multi-bitrate transcoding in the business scenarios:

First, add a multi-bitrate transcoding template group as shown in the following figure. This group contains four templates for different transcoding standards.

image

Then, ingest the stream and use the ApsaraVideo Player for Web to play the stream. After debugging, you can see that the player automatically plays the stream at the most appropriate bitrate based on the network condition.

image

Note

For information about how to use the ApsaraVideo Player, see ApsaraVideo Player SDK.

HTML5 auto transcoding

RTS utilizes the communication standards and mechanisms provided by Web Real-Time Communication (WebRTC) to achieve low-latency streaming. Native browsers do not support B-frames and AAC audio encoding for WebRTC. HTML5 auto transcoding helps resolve this issue.

You can enable this feature when you enable RTS. For more information, see Enable RTS.

Note
  • HTML5 auto transcoding processes only B-frames and AAC audio encoding for RTS in native browsers. If you want to adjust video content, such as its bitrate, frame rate, and resolution, you need to configure default or custom transcoding.

  • HTML5 auto transcoding can be used together with default or custom transcoding.

  • HTML5 auto transcoding incurs fees for audio-only transcoding. For more information, see Billing of live stream transcoding.

Video encryption

You can enable video encryption when you configure default and custom transcoding templates. For more information about Alibaba Cloud proprietary cryptography, see Alibaba Cloud proprietary cryptography.

References

For information about APIs related to the transcoding feature, see API reference for transcoding.

For information about how to use the server SDK for Java, see Use the server SDK for Java.