All Products
Search
Document Center

:Configure video packaging templates

更新時間:Jul 19, 2024

ApsaraVideo VOD provides video packaging templates that you can use to generate adaptive bitrate files. Adaptive bitrate files contain information such as the bitrates and resolutions of audio and video streams. The player automatically selects the most suitable stream to play based on your network conditions.

Usage notes

  • Video packaging templates do not support HLS encryption. If you require HLS encryption, use a normal transcoding template. For more information about the differences between an adaptive bitrate streaming template and a normal transcoding template, see Implement adaptive bitrate streaming with ApsaraVideo VOD.

  • You can create up to 20 transcoding template groups within an Alibaba Cloud account by using the ApsaraVideo VOD console. You can add up to 10 video packaging templates in each transcoding template group.

  • You are charged for transcoding operations. For more information, visit the ApsaraVideo VOD pricing page.

Procedure

  1. Create a transcoding template group for adaptive bitrate streaming.

    Note

    If you require only packaging templates for adaptive bitrate streaming, you do not need to create regular transcoding templates. You need to delete all existing regular transcoding templates to avoid unnecessary transcoding fees.

    1. Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Configuration Management > Media Processing > Transcoding Template Groups.

    2. On the Transcoding Template Groups page, click Create Transcoding Template Group.

    3. On the page that appears, specify a name for the template group.

    4. In the Video Packaging Template section, click Add Template, and set the parameters.

      • In the Basic Parameters section, Encapsulation Format is fixed to hls. The Video Packaging section contains the following parameters:

        • Packaging Type: The value is fixed to HLS packaging.

        • Bandwidth Threshold: the network bandwidth based on which media players select video streams of specific bitrates. Unit: bit/s. We recommend that you use the recommended value.

      • You can configure Basic Parameters, Video Parameters, Audio Parameters, Advanced Parameters, and Conditional Transcoding Parameters in the same way as you create regular transcoding templates. For more information about how to configure these parameters, see Configure regular transcoding templates.

      • You can use Add Template to create multiple video packaging templates with different bitrates, resolutions, and video qualities based on your business requirements. Video qualities include high definition, standard definition, and low definition.

    5. After the parameters are configured, click Save.

  2. Transcode a video into streams of different bitrates.

    1. In the ApsaraVideo VOD console, choose Media Files > Audio/Video.

    2. On the Audio/Video page, find the video that you want to transcode, and click Media Processing in the Actions column.

    3. In the Media Processing dialog box, set Processing Type to Use Transcoding Template Group, select the transcoding template group that you created in Step 1, and then click OK to start media processing.

  3. View video streams.

    • The following figure shows the video streams that are generated after adaptive bitrate streaming is implemented. In this example, two streams use fixed bitrates while one stream adapts its bitrate based on network bandwidths.

      In the ApsaraVideo VOD console, choose Media Files > Audio/Video, find the video that you processed in the previous step, and click Manage in the Actions column. On the page that appears, click the Video URL tab.

      效果展示_1

    • The URL of the adaptive bitrate stream in the preceding figure is used for playback.

      On the Basic tab of the Online Settings page in ApsaraVideo Player, enter the URL of the adaptive bitrate stream and view the video playback effect on the Preview tab.