All Products
Search
Document Center

Audio and video transcoding

Last Updated: May 13, 2022

Transcoding is an essential part of media processing. This topic provides an overview of transcoding and the transcoding methods supported by Alibaba Cloud, and describes how to configure a transcoding template and start transcoding.

Overview

What is transcoding?

Video transcoding is a process of converting a compressed and encoded video stream to another video stream to adapt to different network bandwidths, terminal processing capabilities, and user requirements. Transcoding is a process of decoding and encoding. Streams before and after transcoding may use the same or different video encoding standards.

The following figure shows at which point video transcoding takes place in a video production workflow.

Workflow

Features

  • Video processing: ApsaraVideo VOD provides comprehensive transcoding and container format conversion capabilities to convert between various media file formats.

  • Audio processing: ApsaraVideo VOD provides audio processing features such as audio transcoding and audio extraction.

  • Watermarking: ApsaraVideo VOD supports static watermarks, dynamic watermarks such as GIF and MOV files, and text watermarks. You can add multiple watermarks to a video. For more information, see Video watermarks.

  • Multiple preset definitions: ApsaraVideo VOD provides multiple preset definitions, such as Standard Definition, High Definition, Ultra High Definition, 2K, and 4K. ApsaraVideo VOD provides recommended optimal settings to help you start transcoding without the need for deep technical understanding.

  • Multi-scenario solutions such as audio extraction: You can extract an audio track of the standard or high quality from videos as an audio output. This is suitable for scenarios such as broadcasting at a radio station.

  • Content protection: ApsaraVideo VOD supports content encryption for various scenarios such as online education and copyright protection.

Benefits

  • Adaptation to multiple terminals: generates content that can be played on PCs, TVs, and mobile devices.

  • Adaptability with multiple network environments: allows you to select the most appropriate bitrate based on your network bandwidth to ensure smooth playback.

  • Reduction of storage and distribution costs: allows you to adjust video bitrates, improve video compression efficiency, and reduce file sizes without changes to image quality. This ensures smooth playback and reduces storage and traffic costs.

  • Content protection: supports content encryption for various scenarios such as online education and copyright protection.

  • Watermarking: allows you to add information such as enterprise logos, TV station logos, user IDs, and nicknames as watermarks for video copyright declaration or brand promotion.

ApsaraVideo VOD provides multiple scenario-specific preset definitions and streamlines the process from uploading to transcoding based on long-term data analysis.

Transcoding methods

ApsaraVideo VOD supports normal transcoding, no transcoding, and Narrowband HDTM transcoding 1.0. When you configure a transcoding template, you can select a transcoding method based on your business requirements.

Notice

You are charged for the ApsaraVideo VOD transcoding feature. For more information, see Billing of basic services.

Normal transcoding

Normal transcoding can meet your basic transcoding requirements. You can select different container formats and definitions to transcode videos based on your business requirements. Normal transcoding is suitable for long videos.

ApsaraVideo VOD provides seven video definitions, which are Low Definition, Standard Definition, High Definition, Ultra High Definition, 2K, 4K, and Original. In addition, ApsaraVideo VOD provides two audio definitions, which are Standard Quality and High Quality. You can specify bitrates, resolutions, and formats for videos in different definitions. You can also categorize and manage different transcoding templates in transcoding template groups.

Narrowband HDTM 1.0

Based on the proprietary transcoding technology of Alibaba Cloud, Narrowband HDTM 1.0 intelligently analyzes each scene, action, content, and texture in videos. This reduces the bitrate and bandwidth costs without changes to image quality. For more information, see the article posted in Yunqi Community.

No transcoding

Videos are directly played in original quality without transcoding. No transcoding is suitable for scenarios in which you can directly play videos in original quality, such as short videos and live-to-VOD recording.

  • Some videos such as short videos are compressed when they are captured. These videos can be directly played on multiple devices. In this case, you can distribute the videos without transcoding.

  • ApsaraVideo VOD does not need to transcode videos that are locally transcoded. You can distribute these videos without transcoding.

  • Only videos in the following formats can be played without transcoding: MP4, Flash Video (FLV), M3U8, MP3, and WEBM.

Configure transcoding template groups

In most cases, transcoding parameters are complex. To eliminate the need for complex parameter configurations, ApsaraVideo VOD saves complex parameters as templates. You can create custom transcoding templates. A custom transcoding template contains a set of transcoding parameters such as audio, video, and container parameters to meet your personalized requirements on transcoding. A transcoding template can have multiple outputs settings defined. In addition, ApsaraVideo VOD provides recommended parameter settings based on the video definition and audio quality, which allows you to transcode videos without the need to learn the technical details. You can create transcoding template groups by using the ApsaraVideo VOD console or by calling API operations.

Normal transcoding template groups

  • Use the ApsaraVideo VOD console

    Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Configuration Management > Media Processing > Transcoding Template Groups. On the Transcoding Template Groups page, click Create Transcoding Template Group. For more information about how to create normal transcoding template groups, see Configure transcoding template groups.

    • ApsaraVideo VOD provides seven video definitions, which are Low Definition, Standard Definition, High Definition, Ultra High Definition, 2K, 4K, and Original. In addition, ApsaraVideo VOD provides two audio definitions, which are Standard Quality and High Quality. ApsaraVideo VOD provides recommended parameter settings for each definition. When you select a definition, ApsaraVideo VOD automatically sets parameters to the recommended values to help you quickly create a custom template.

    • ApsaraVideo VOD provides a preset transcoding template group TranscodeTemplateGroup. This template group includes preset parameters such as definition, bitrate, and resolution for videos in the HTTP Live Streaming (HLS) and MP4 formats. You can quickly configure the encoding format, watermark template, and encryption method. The first time you use a transcoding template group, we recommend that you use TranscodeTemplateGroup.

  • Call API operations

    Call the AddTranscodeTemplateGroup operation and set the Definition parameter in this operation to create a normal transcoding template group.

Narrowband HDTM 1.0 transcoding template groups

  • Use the ApsaraVideo VOD console

    You can create Narrowband HD™ transcoding template groups by following the path to create a normal transcoding template group. When you create a transcoding template group, you can select the definition of Narrowband HD™ 1.0 such as LD-Narrowband HD1.0 or SD-Narrowband HD1.0. For more information about how to create Narrowband HD™ transcoding template groups, see Narrowband HD™ 1.0.

    ApsaraVideo VOD provides definition presets that support Narrowband HDTM 1.0. Narrowband HD™ transcoding 1.0 can be applied to videos in the MP4 and HLS formats. The following table describes the presets provided by Narrowband HD™ 1.0.

    Definition

    Bitrate range (kbit/s)

    Resolution - width (pixels)

    LD - Narrowband HD™ 1.0

    ≤ 400

    640

    SD - Narrowband HD™ 1.0

    ≤ 800

    848

    HD - Narrowband HD™ 1.0

    ≤ 1500

    1280

    UHD - Narrowband HD™ 1.0

    ≤ 3000

    1920

    2K - Narrowband HD™ 1.0

    ≤ 4000

    2048

    4K - Narrowband HD™ 1.0

    ≤ 8000

    3840

  • Call API operations

    Call the AddTranscodeTemplateGroup operation and set the Definition parameter in this operation to create a narrowband HD TM 1.0 template group.

No transcoding template group

ApsaraVideo VOD provides a built-in No Transcoding template group. You cannot edit this template group. By default, the No Transcoding template group is used after you activate the ApsaraVideo VOD service. If you select the No Transcoding template group, the URLs of your videos in original quality are used.

  • Use the ApsaraVideo VOD console

    Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Configuration Management > Media Processing > Transcoding Template Groups. On the Transcoding Template Groups page, select the No Transcoding template group.Audio and video transcoding 1

  • Call API operations

    Call an operation such as SubmitTranscodeJobs and set TemplateGroupId to VOD_NO_TRANSCODE in this operation if you do not need transcoding.

Note

If transcoding is not required, make sure that the files that you upload can be played directly in original quality. Only videos in the following formats can be played without transcoding: MP4, FLV, M3U8, MP3, and WEBM.

Start transcoding

Automatically trigger transcoding for videos to be uploaded

  • Use the ApsaraVideo VOD console

    Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Audio/Video. On the Audio and Video page, select a transcoding template before you upload a video. For more information, see Upload media files by using the ApsaraVideo VOD console.

  • Call API operations

    You can specify the transcoding template ID that you want to use in the TemplateGroupId parameter when you call the CreateUploadVideo operation or the UploadMediaByURL operation to upload a video. After you upload the video, ApsaraVideo VOD automatically transcodes the video based on the transcoding template. Then, ApsaraVideo VOD returns the information about the transcoded stream based on your callback settings. For more information, see Overview.

Manually start transcoding for uploaded videos

  • Use the ApsaraVideo VOD console

    Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Audio/Video. On the Audio and Video page, select a video that you want to transcode and click Media Processing in the Actions column to configure transcoding for the video. This method is used to transcode videos that are stored in ApsaraVideo VOD.Audio and video transcoding

  • Call API operations

    Call the SubmitTranscodeJobs operation and set the TemplateGroupId parameter in this operation to start transcoding. In most cases, this operation is used to re-transcode existing videos, encrypt existing videos in HLS encryption mode, or override watermark parameters.

Best practices

For more information, see Select a transcoding type.