All Products
Search
Document Center

ApsaraVideo VOD:Adaptive bitrate transcoding

Last Updated:Jan 28, 2026

Adaptive bitrate streaming packages specified audio and video streams into a single file. This allows a player to automatically select the stream that best suits the current network bandwidth. This topic describes how to transcode a video into an adaptive bitrate stream.

What is adaptive bitrate streaming

Adaptive bitrate streaming packages multiple audio and video streams into a single file. This file contains information about each stream, such as its bitrate and resolution. Unlike traditional single-bitrate playback, adaptive bitrate streaming allows a player to select the stream that best suits the current network bandwidth and device. This improves the playback experience.

Note

The most common output formats for adaptive bitrate streaming are HLS and DASH. ApsaraVideo VOD currently supports only HLS for adaptive bitrate streaming.

Demonstration

image

How to use

Transcode using the console

Step 1: Create an adaptive bitrate transcoding template group

First, create an adaptive bitrate transcoding template group to use when you start a transcoding job.

For more information, see Transcoding templates.

Step 2 (Optional): Create a workflow and associate the transcoding template group

Orchestrate media processing tasks, such as transcoding, review, and snapshot capture, in a workflow. After you upload a media file or trigger media processing, the workflow automatically processes the file according to the predefined sequence of tasks.

Create a workflow, add a media transcoding node, and associate the adaptive bitrate transcoding template group that you created in the previous step. For more information, see Manage workflows.

Step 3: Start transcoding

Use the adaptive bitrate transcoding template group or workflow that you created to transcode a video. You can trigger transcoding during or after you upload the media.

Automatically trigger transcoding during upload

  1. Log on to the ApsaraVideo VOD console.

  2. In the navigation pane on the left, choose Media Files > Audio/Video, and then click Upload Audio/Video.

  3. Click Add Audio/Video. Set parameters such as the upload method and storage address. Select Use Transcoding Template Group or Use Workflow, and then specify the adaptive bitrate transcoding template group or workflow that you created.

    For more information about supported upload formats and parameter descriptions, see Upload media assets in the console.多码率转码1

  4. Add the audio or video files to upload and click Upload.

Initiate transcoding after upload

This operation is often used to re-transcode existing videos, apply standard encryption, or overwrite watermark parameters.

  1. Log on to the ApsaraVideo VOD console.

  2. In the navigation pane on the left, choose Media Files > Audio/Video.

  3. On the Audio/Video page, find the audio or video file to transcode and click Processing in the Actions column.

  4. Select Use Transcoding Template Group or Use Workflow. Then, specify the adaptive bitrate transcoding template group or workflow that you created.多码率转码2

  5. Click OK.

Step 4: View the transcoding result

After you start a transcoding job, you can view its status and the URL of the output video in one of two ways. You can then obtain the video URL and use ApsaraVideo Player or a third-party player for playback.

Important

If you have not configured an accelerated domain name in ApsaraVideo VOD, playing or downloading the video from its URL incurs storage outbound traffic fees. For more information, see Billing for outbound traffic from storage.

Method 1: View in the console

  1. Log on to the ApsaraVideo VOD console.

  2. In the navigation pane on the left, choose Media Files > Audio/Video.

  3. On the Audio/Video page, view the status of the audio or video file.

    A status of Normal indicates that the transcoding is complete. For descriptions of other statuses, see Status: Video Status.

  4. In the Actions column of the transcoded audio or video file, click Manage to go to the Video URL tab.

    For a successfully transcoded audio or video file, the system generates one adaptive stream and multiple transcoded streams, along with their corresponding video URLs.

    多码率转码3.png

Method 2: Use event notifications

ApsaraVideo VOD supports event notifications through HTTP and MNS callbacks. After you configure event notifications, ApsaraVideo VOD sends you a notification when a media file is processed, for example, when it is uploaded or transcoded. You can obtain the status of the transcoding job and the URL of the output video from the callback results. For more information, see Event notifications.

The following events are related to transcoding:

Transcode using OpenAPI

Usage notes

To call API operations, see ApsaraVideo VOD API overview. We recommend that you use the Alibaba Cloud online command-line tool OpenAPI Explorer to test API operations. In OpenAPI Explorer, you can run ApsaraVideo VOD API operations without needing to calculate signatures. After an operation is successful, OpenAPI Explorer dynamically generates sample code for different SDKs.

Step 1: Create an adaptive bitrate transcoding template group

First, create an adaptive bitrate transcoding template group to use when you start a transcoding job.

  1. Call the AddTranscodeTemplateGroup operation and configure the packaging template using the TranscodeTemplate parameter.

    This section describes only the configuration parameters that are specific to packaging templates. For more information, see TranscodeTemplate: Transcoding template configuration.

    Click to expand packaging template parameters

    Video packaging parameters

    API parameter

    Console parameter

    Description

    PackageType

    Packaging type

    The adaptive bitrate packaging type. The output can be in HLS or DASH format. Valid values: HLSPackage (HLS packaging) and DASHPackage (DASH packaging).

    Note

    Only HLSPackage is supported.

    BandWidth

    Bandwidth threshold

    The bandwidth threshold. This is provided to the player to select a stream for playback based on the current network bandwidth. Unit: bps.

    Note

    This parameter is for video packaging templates.

Step 2: (Optional) Create a workflow and associate the transcoding template group

Orchestrate media processing tasks, such as transcoding, review, and snapshot capture, in a workflow. After you upload a media file or trigger media processing, the workflow automatically processes the file according to the predefined sequence of tasks.

Currently, you can create workflows only in the ApsaraVideo VOD console. For more information, see Manage workflows.

Step 3: Start transcoding

Use the transcoding template group or workflow that you created to transcode a video. You can trigger transcoding during or after you upload the media.

Automatically trigger transcoding during upload

Note

The CreateUploadVideo operation is used only to obtain an upload URL and credential and create basic media asset information. It does not upload the file. You must implement the upload logic. For a complete example of how to upload a file by calling an API operation, see Upload media assets by calling ApsaraVideo VOD API operations.

  1. When you call the CreateUploadVideo or UploadMediaByURL operation to upload an audio or video file, specify the transcoding template group ID in the TemplateGroupId parameter or the workflow ID in the WorkflowId parameter. After the file is uploaded, ApsaraVideo VOD automatically starts a transcoding job based on the specified template group or workflow.

Initiating transcoding after upload

This operation is often used to re-transcode existing videos, apply standard encryption, or overwrite watermark parameters.

  1. Call the SubmitTranscodeJobs operation and specify the transcoding template group ID in the TemplateGroupId parameter. Alternatively, call the SubmitWorkflowJob operation and specify the workflow ID in the WorkflowId parameter. ApsaraVideo VOD then immediately transcodes the audio or video file based on the specified transcoding template group or workflow.

Step 4: View the transcoding result

After you start a transcoding job, you can view its status and the URL of the output video in one of two ways. You can then obtain the video URL and use ApsaraVideo Player or a third-party player for playback.

Important

If you have not configured an accelerated domain name in ApsaraVideo VOD, playing or downloading the video from its URL incurs storage outbound traffic fees. For more information, see Billing for outbound traffic from storage.

Method 1: Query by calling an API operation

When you call the SubmitTranscodeJobs operation to submit a transcoding job, the operation returns the transcoding job ID TranscodeTaskId. You can then call the GetTranscodeTask operation to query the execution status of the job and the URL of the output video.

Method 2: Use event notifications

ApsaraVideo VOD supports event notifications through HTTP and MNS callbacks. You can configure event notifications so that ApsaraVideo VOD sends you a notification when a media file is processed, for example, when a file is uploaded or transcoded. You can obtain the status of the transcoding job and the URL of the output video from the callback results. For more information, see Event notifications.

The following events are related to transcoding:

What to do next

After you configure the adaptive streaming feature for your player, you can use the transcoded adaptive video stream for playback. This allows the player to adaptively switch the video definition based on network conditions or to manually switch the definition and subtitles.

For information about how to configure the adaptive streaming feature in the ApsaraVideo Player SDK, see the following topics: