Standard transcoding includes video transcoding, audio transcoding, and transmuxing. It converts audio or video streams to different definitions or encoding formats for various network bandwidths and playback devices. ApsaraVideo VOD supports H.264, H.265, H.266, AV1, WebP, and GIF.
Usage notes
-
ApsaraVideo VOD provides a preset transcoding template group named TranscodeTemplateGroup, pre-configured with common settings for standard-definition (SD) HLS and MP4 video formats, including bitrates and resolutions. Use this group to quickly specify formats, watermarks, and encryption. This template group is recommended for new users.
-
When you use the built-in No Transcoding template group, your source video must be directly playable. Currently, only videos in MP4, FLV, M3U8, MP3, and WEBM formats can be played directly without transcoding.
Billing
Video transcoding is a paid service. You are charged based on the specifications and duration of the output video. For more information, see Media transcoding billing.
Procedure
Console
Step 1: Create a regular transcoding template group
If the built-in No Transcoding and TranscodeTemplateGroup template groups do not meet your requirements, create a custom transcoding template group with your preferred container formats, definitions, and other parameters.
For more information, see Transcoding templates.
Step 2 (Optional): Create a workflow
Orchestrate media processing tasks such as transcoding, content moderation, and snapshotting into a workflow. When triggered during or after a media upload, the tasks run automatically in the predefined order.
Create a workflow, add a media transcoding node, and associate it with the transcoding template group you created. For more information, see Manage workflows.
Step 3: Initiate transcoding
Use the transcoding template group or workflow you created to transcode your videos. You can trigger transcoding during or after the upload.
During upload
-
Log on to the ApsaraVideo VOD console.
-
In the left-side navigation pane, choose Media Files > Audio/Video. Click Upload Audio/Video.
-
Click Add Audio/Video. Configure parameters such as the upload method and storage location. Select Use Transcoding Template Group or Use Workflow, and then select the template group or workflow you created.
For more information about supported formats and parameter descriptions, see Upload media files by using the console.
-
Add the media files you want to upload and click Upload.
After upload
This method is often used for re-transcoding existing videos, applying standard encryption, or overriding watermark settings.
-
Log on to the ApsaraVideo VOD console.
-
In the left-side navigation pane, choose Media Files > Audio/Video.
-
Find the media file you want to transcode and click Processing in the Actions column.
-
Select Use Transcoding Template Group or Use Workflow. In the Media Processing dialog box, if you select Process with Transcoding Template Group, choose a group such as TranscodeTemplateGroup from the Transcoding Template Group drop-down list.
-
Click OK.
Step 4: View results
After you initiate a transcoding job, check its status and view the output video URLs by using the following methods. Use these URLs to play the transcoded videos with ApsaraVideo Player or a third-party player.
If you have not configured a Content Delivery Network (CDN) domain name for ApsaraVideo VOD, you will be charged for outbound data transfer when videos are played or downloaded from their URLs. For more information, see Billing for outbound data transfer from storage.
Console
-
Log on to the ApsaraVideo VOD console.
-
In the left-side navigation pane, choose Media Files > Audio/Video.
-
Check the status of the media file.
The Normal status indicates that the transcoding was successful. For a description of other statuses, see Status: Video status.
-
Click Manage in the Actions column for the transcoded media file, and then go to the Video URL tab.
A successful transcoding job generates video streams for each specified definition, with corresponding URLs.
The Video Address tab lists the transcoded outputs for each definition, such as Original File, Fluent, SD, and Original (Transmuxed). Columns include Format, Resolution, Bitrate, Address, Size, and Creation Time. In the Actions column, you can Copy Address, Preview, or Delete a video stream. If multiple outputs exist for the same definition and format, the playback API returns the latest one by default. Click One-click Clear to remove historical outputs.
Event notifications
Configure event notifications to receive updates when media processing completes, such as after a successful upload or transcoding job. You can obtain the transcoding status and output video URLs from these notifications. For configuration instructions, see Event notifications.
The following events are related to transcoding:
API
Usage notes
For instructions on calling API operations, see ApsaraVideo VOD API overview. We recommend OpenAPI Explorer, an online debugging tool from Alibaba Cloud that lets you run ApsaraVideo VOD operations without handling signature calculations. OpenAPI Explorer also generates SDK sample code after a successful call.
Step 1: Create a transcoding template group
If the built-in No Transcoding (with a TemplateGroupId of VOD_NO_TRANSCODE) and TranscodeTemplateGroup template groups do not meet your requirements, create a custom group with your preferred container formats, definitions, and other parameters.
-
Call the AddTranscodeTemplateGroup operation. Specify the parameters for regular transcoding in the
Definitionfield of theTranscodeTemplateparameter.
Step 2: (Optional) Create a workflow
Orchestrate media processing tasks such as transcoding, content moderation, and snapshotting into a workflow. When triggered during or after a media upload, the tasks run automatically in the predefined order.
Currently, you can create a workflow only in the ApsaraVideo VOD console. For more information, see Manage workflows.
Step 3: Initiate transcoding
Use the transcoding template group or workflow you created to transcode your videos. You can trigger transcoding during or after the upload.
During upload
The CreateUploadVideo operation only obtains upload URLs and credentials and creates basic media asset information. It does not upload the file itself. You must implement your own upload logic. For a complete upload example using the API, see Upload media files by using the ApsaraVideo VOD API.
-
When you upload an audio or video file by calling the CreateUploadVideo or UploadMediaByURL operation, specify the transcoding template group ID in the
TemplateGroupIdparameter or the workflow ID in theWorkflowIdparameter. After the upload is complete, ApsaraVideo VOD automatically starts transcoding based on your specified settings.
After upload
This method is often used for re-transcoding existing videos, applying standard encryption, or overriding watermark settings.
-
Call the SubmitTranscodeJobs operation and specify the transcoding template group ID in the
TemplateGroupIdparameter. Alternatively, call the SubmitWorkflowJob operation and specify the workflow ID in theWorkflowIdparameter. The system immediately starts transcoding based on the specified settings.
Step 4: View results
After you initiate a transcoding job, check its status and view the output video URLs by using the following methods. Use these URLs to play the transcoded videos with ApsaraVideo Player or a third-party player.
If you have not configured a CDN domain name for ApsaraVideo VOD, you will be charged for outbound data transfer when videos are played or downloaded from their URLs. For more information, see Billing for outbound data transfer from storage.
API query
The SubmitTranscodeJobs operation returns a TranscodeTaskId. Call the GetTranscodeTask operation to query the task status, output video URLs, and other details.
Event notifications
Configure event notifications to receive updates when media processing completes, such as after a successful upload or transcoding job. You can obtain the transcoding status and output video URLs from these notifications. For configuration instructions, see Event notifications.
The following events are related to transcoding: