ApsaraVideo VOD provides the transcoding feature. You can select and configure a transcoding template to transcode videos based on your business requirements.
After you upload videos, you must configure transcoding settings. You can select a normal transcoding template group or the No Transcoding template group. Built-in template groups No Transcoding and TranscodeTemplateGroup are provided. You can also create a custom transcoding template group.
- Normal transcoding template groups
- TranscodeTemplateGroup: This template group includes preset parameters such as definition, bitrate, and
resolution for videos in 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 the built-in template group TranscodeTemplateGroup.
- Custom transcoding template group: You can select different encapsulation formats
and definitions to transcode videos based on your business requirements. This template
group is suitable for long videos that require transcoding.
The definition options include Low Definition, Standard Definition, High Definition, Ultra High Definition, Original, 2K, 4K, High Quality, and Standard 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.
When you create a custom transcoding template group, you can select the definition of narrowband HD 1.0 such as LD-Narrowband HD1.0 or SD-Narrowband HD1.0. Narrowband HD TM 1.0 analyzes each scene, movement, content, and texture of a video based on the exclusive transcoding technology of Alibaba Cloud. Video bitrates can be optimized to lower bandwidth costs without the need to sacrifice video quality. For more information about narrowband HD 1.0, see Narrowband HD TM 1.0.
- TranscodeTemplateGroup: This template group includes preset parameters such as definition, bitrate, and resolution for videos in HTTP Live Streaming (HLS) and MP4 formats. You can quickly configure the encoding format, watermark template, and encryption method.
- No Transcoding template group
Videos are directly played in original quality. This template group is suitable for short videos that do not require transcoding.
If you select this template group, ApsaraVideo VOD automatically distributes videos in original quality and adds the videos to video streams. When you call the GetPlayInfo operation to obtain the playback information, the URL of the video in original quality is returned for playback. This template group is suitable for short videos and live-to-VOD scenarios.
By default, the No Transcoding template group is used after you activate the ApsaraVideo VOD service.
- You are charged for transcoding. For more information, see Pricing.
- If you set the Definition parameter to Original, the original definition and bitrate of videos are retained. Only the encapsulation format of videos is modified. This template group is suitable for scenarios in which you do not need to adjust the size or bitrate of videos. If you select the No Transcoding template group, the CDN URLs of your videos in original quality are used.
- Transcoding fees are calculated based on the width and height of the video, which may be different from the definition that is specified in the transcoding template.
Custom transcoding template groupIf the No Transcoding and TranscodeTemplateGroup template groups cannot meet your business requirements, you can create a custom transcoding template group.
- The changes of transcoding settings apply only to newly uploaded videos.
- To avoid transcoding failures, do not modify or delete a template or a template group when a transcoding job is in progress.
- Log on to the ApsaraVideo VOD console.
- In the left-side navigation pane, click Configuration Management.
- Choose . The Transcoding Template Groups page appears.
- Click Create Transcoding Template Group. Then, the Create Transcoding Template Group page appears.
- Click Add Template in the Normal Transcoding Template section. The following table describes the parameters in the normal transcoding template.
No. Category Parameter Description 1 Basic Parameters Encapsulation Format
- Valid values for video files: hls, mp4, and flv.
- Valid value for audio files: mp3.
For more information about each encapsulation format, see Terms.
- Valid values for video files: Low Definition, Standard Definition, High Definition,
Ultra High Definition, 2K, 4K, and Original.
Note For more information about the definition of narrowband HD 1.0 such as LD-Narrowband HD1.0 or SD-Narrowband HD1.0, see Narrowband HD TM 1.0.
- Valid values for audio files: Standard Quality and High Quality.
2 Video Parameters Disable Video If you select Disable Video, the transcoded stream does not contain video information. You can select Disable Video to extract audio in scenarios such as radio broadcasts. Encoding Format Valid values: H.264 and H.265. Bitrate Valid values: 10 to 50000 Kbit/s. The definition is based on the bitrate. We recommend that you use the recommended bitrate in the following table for each definition. Resolution Valid values: 128 to 4096, in pixels. You can specify the width or height of the video. For example, if you specify the width of the video, the height is automatically scaled based on the original aspect ratio of the video. Frame Rate The number of frames per second. We recommend that you use the recommended value. Maximum Keyframe Interval The number of frames in a group of pictures (GOP). We recommend that you use the recommended value. Watermark Specifies whether to add a watermark to a video. To add a watermark to a video, you must add watermark materials in watermark settings and turn on Watermark. For more information, see Manage watermarks. 3 Audio Parameters Disable Audio If you select Disable Audio, the transcoded stream does not contain audio information. If you want to generate a video stream with no sound, select Disable Audio. Encoding Format If you set Encapsulation Format to hls or mp4, you can set this parameter to AAC or MP3. If you set Encapsulation Format to mp3, you can set this parameter only to MP3. Sample Rate We recommend that you use the recommended value. Bitrate Valid values: 8 to 1000 Kbit/s. We recommend that you use the recommended value. Audio Channels We recommend that you use the recommended value. 4 Advanced Parameters. This section is displayed only if you set Encapsulation Format to hls. Fragment Length The duration of each TS segment. We recommend that you use the recommended value. Video Encryption You can enable this feature to encrypt HLS videos. After you enable video encryption, you must integrate an official player SDK that supports video decryption to play videos. A free trial is provided for this feature.Note The video encryption feature that you configure encrypts videos by using Alibaba Cloud proprietary cryptography. For more information about how to encrypt videos in HLS encryption mode, see SubmitTranscodeJobs. 5 Conditional Transcoding Parameters Video Resolution Check Checks whether the resolution of the video file is lower than the resolution that is specified in the transcoding template. Video Bit Rate Check Checks whether the bitrate of the video file is lower than the bitrate that is specified in the transcoding template. Audio Bit Rate Check Checks whether the bitrate of the audio file is lower than the bitrate that is specified in the transcoding template.The following table describes the recommended bitrates, recommended resolutions, and resolution range for different definitions. Definition Recommended bitrate Recommended resolution Resolution range Low definition 400 640x360 128x128 to 640x360 Standard definition 900 960x540 641x361 to 960x540 High definition 1500 1280x720 961x541 to 1280x720 Ultra high definition 3000 1920x1080 1281x721 to 1920x1080 2K 3500 2560x1440 1920x1080 to 2560x1440 4K 6000 2560x1440 2560x1440 to 3840x2160
- Click Save.
- Optional: On the Transcoding Template Groups page, you can select a template group and click
Set as Default. This template group is set as the default template group.
After you set a template group as the default template group, newly uploaded videos are transcoded based on this transcoding template group.
What to do next
After you create a transcoding template group, you can view, edit, or delete the transcoding template group, or specify the transcoding template group as the default transcoding template group. You cannot view, edit, or delete the No Transcoding template group.