Transcoding is an essential part of media processing. This topic describes the supported transcoding methods and how to use transcoding in ApsaraVideo VOD.
Before you start
Before you start transcoding, make sure that you understand basic concepts such as encoding format, container format, bitrate, and resolution. For more information, see Bitrate.
What is transcoding?
Video transcoding refers to the process of converting a compressed video stream to another video stream to adapt to different network bandwidths, terminal processing capabilities, and user requirements. Transcoding is a process in which decoding and encoding are performed. Streams before and after transcoding may use the same or different video encoding standards.
The following figure shows the point at which video transcoding is performed in a video production workflow.

Features
Video processing: ApsaraVideo VOD provides comprehensive transcoding and container format conversion capabilities to convert to 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, animated watermarks such as GIF and MOV files, and text watermarks. You can add multiple watermarks to a video. For more information, see Video watermark.
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 technical understanding.
Multi-scenario solutions such as audio extraction: You can extract an audio track of the standard or high quality from a video 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.
Scenarios
Compatibility with multiple terminals: The generated content can be played on PCs, TVs, and mobile devices.
Adaptation to multiple network environments: ApsaraVideo VOD allows you to select the most appropriate bitrate based on your network bandwidth for smooth playback.
Low storage and distribution costs: You can change video bitrates, increase the compression rate, and reduce file sizes without changes to image quality. This ensures smooth playback and reduces storage and traffic costs.
Content protection: Content encryption is supported for various scenarios such as online education and copyright protection.
Watermarking: You can 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 analysis of large volumes of data.
Transcoding methods
ApsaraVideo VOD supports multiple transcoding methods. You can select transcoding methods based on your business requirements.
Transcoding method | Description | Scenario | |
Standard transcoding | Regular video transcoding | ApsaraVideo VOD provides the following seven preset video definitions: Low Definition, Standard Definition, High Definition, Ultra High Definition, 2K, 4K, and Original. | Regular video transcoding can meet your basic transcoding requirements. You can generate videos in different specifications that can be played in different network environments or on different devices and use Alibaba Cloud CDN to accelerate the distribution. Regular transcoding is suitable for scenarios such as asynchronous processing and delayed playback. |
Audio transcoding | ApsaraVideo VOD provides two audio quality options: Standard Quality and High Quality. | Audio transcoding is suitable for scenarios in which you want to improve the audio quality. | |
Container format conversion (original quality) | Container format conversion only converts the container format of videos and does not change the definition and bitrate. | This transcoding method is suitable for scenarios in which you do not need to change the image size or bitrate of the video. | |
Narrowband HD transcoding | Narrowband HD TM 1.0 | Based on the proprietary transcoding technology of Alibaba Cloud, Narrowband HD™ 1.0 analyzes each scene, action, content, and texture in videos. This reduces the bitrate and bandwidth costs without changes to image quality. |
|
Narrowband HD TM 2.0 | Narrowband HD TM 2.0 attempts to reduce the bitrate according to the definition expectation, and selects the best resolution according to the preset bitrate. This technology is developed based on the human vision model and emphasizes user experience over fidelity for video optimization. Because of the Alibaba Cloud algorithm applied in this feature, Narrowband HD™ 2.0 performs better than current video encoders and enhances video clarity at lower bitrates. Compared with the Narrowband HD TM 1.0, Narrowband HD™ 2.0 delivers higher video resolution at lower bitrates. Note Narrowband HD TM 1.0 and 2.0 are available in all regions. For more information, see Regions. | This transcoding method is suitable for videos whose original quality is relatively low. | |
Distribute without transcoding | No Transcoding template group (preset) | Videos are directly played in original quality without transcoding.
| The No Transcoding template group is suitable for scenarios in which you can directly play videos in original quality, such as short videos and live-to-VOD recording. This reduces the response time of playback requests and transcoding costs.
|
Adaptive bitrate stream transcoding | Video packaging transcoding | You can use a video packaging template to transcode a video into video streams at different bitrates in the HTTP-Live-Streaming (HLS) format, and package these video streams into a file. This allows media players to switch to the most appropriate video stream based on the network bandwidth. The adaptive bitrate switching feature supports automatic definition switching based on the network environment. You can also manually switch the definition. | This transcoding method is suitable for adaptive bitrate streaming. |
Subtitle packaging transcoding | You can use a subtitle packaging template to configure subtitles for a video and store the subtitle information in the adaptive bitrate streaming file. This allows media players to switch between subtitles. | This transcoding method is suitable for subtitle switching in multiple languages. | |
Billing
You are charged for transcoding based on the specification ad duration of the transcoded video. For more information, see Media transcoding billing.
Usage notes
You are charged for each transcoding job. A new video file is generated after a transcoding job is complete. To improve storage utilization and prevent additional charges, we recommend that you create transcoding template groups and transcoding jobs based on your business requirements.
For more information about the supported formats of input and output files, see Audio and video transcoding limits.
The transcoding operation is performed on the original video stream. If you have completed transcoding and want to transcode the video to another format, we recommended that you use the original video for the operation. If you have deleted the original video and use the transcoded video for subsequent transcoding to another format, compatibility issues may occur.
Transcoding tasks are automatically triggered after video upload is complete (prerequisite: a transcoding template group is configured and associated with the upload strategy). The transcoding process does not affect upload speed — upload and transcoding are two independent stages.
Transcoding duration is variable and depends on the output specifications (resolution, encoding format, and others), video duration, and current service load. You need to wait for transcoding to complete before the video can be played.
If no transcoding template group is configured, the video is stored in its original encoding format and is not automatically converted to H.264 High. To standardize the output format, manually configure a transcoding template group.
If automatic transcoding is not triggered after upload, check the following: (1) Verify that a transcoding template group is bound. (2) Confirm that the uploaded video format is supported for automatic transcoding. (3) If you are using the RegisterMedia API to register videos that already exist in OSS, ensure that transcoding is enabled when registering.
If a transcoded video cannot be played or previewed, verify that the output encoding format is compatible with the playback client. Some browsers (Chrome, Firefox), older operating systems (such as Windows 7), and WeChat Mini Programs do not support H.265/HEVC encoding. If you experience a black screen or playback failure, change the encoding format in the transcoding template to H.264. Additionally, M3U8 format has limited support in iPad browsers — set the output format to MP4 in the transcoding template for better compatibility. For iOS playback stuttering, enable FastStart mode in the transcoding template (which moves the moov atom before the mdat atom in MP4 files); this is handled automatically when you configure a transcoding template group during upload.
References on how to use the transcoding feature
Custom transcoding via API: To dynamically adjust transcoding parameters at runtime, call the SubmitTranscodeJobs API to submit a transcoding job. For example: use the OverrideParams parameter to specify replacement subtitle assets when submitting a transcoding job, without modifying the original transcoding template. To avoid triggering default transcoding during upload, do not specify a transcoding template or set the default template to "No Transcoding" when calling CreateUploadVideo to obtain an upload credential, then call SubmitTranscodeJobs separately after upload completes to specify a custom template.
NoteImportant: Batch modification of video encryption status is not supported. You need to call SubmitTranscodeJobs individually for each video to re-transcode. To play a non-encrypted video, set playConfig: { EncryptType: "Unencrypted" } in the player configuration and remove the encryptType: 1 parameter.
Frequently asked questions
Does ApsaraVideo VOD support extracting audio from a video and transcoding it to MP3 or WAV format?
Yes. You can use an audio transcoding template to transcode video sources such as M3U8 into audio-only files in MP3 or WAV format. This is suitable for scenarios such as radio stations and podcasts where only audio is needed.
Why is my transcoding template not taking effect after upload, or why is playback abnormal?
Confirm that the video has triggered transcoding and that a transcoded stream has been generated. Check the transcoding status in the console.
If transcoding succeeded but playback is abnormal, the original video encoding is likely incompatible with the browser. Ensure that your frontend calls the GetPlayInfo API to obtain the transcoded video URL, rather than playing the source file URL directly.
If you need to combine FFmpeg processing, automatic transcoding after upload is not directly achievable. Instead, use the standard transcoding feature in ApsaraVideo VOD and associate it with a workflow or an upload trigger strategy.
Why does transcoding remain in "Processing" for a long time and ultimately fail?
A common cause is that the video duration does not meet the requirements of a specific feature. For example, the digital watermarking feature requires the video duration to be greater than 6 minutes. If the video is too short, transcoding will fail. We recommend uploading a video that meets the duration requirement for testing, or adjusting the transcoding template to remove features that have duration requirements.