You can upload media assets to register the media assets with ApsaraVideo VOD. Then, you can use the features provided by ApsaraVideo VOD to manage, process, deliver, and play the media assets. This topic describes the supported media file formats, upload methods, upload settings, and usage notes for media assets in ApsaraVideo VOD.

Supported media file formats

ApsaraVideo VOD allows you to upload various media files such as videos, audio files, images, and auxiliary media assets that include watermark files, subtitle files, and material files. You can upload local files or online files. You can upload online files to ApsaraVideo VOD by using the URLs of these files. The following table describes the supported file formats of each type of media asset.

Note The file name extension must be included in the path of a media file to be uploaded to ApsaraVideo VOD. File name extensions are not case-sensitive. For example, both MP4 and mp4 are supported.
Type Supported format
Video
  • MPEG formats: MP4, TS, 3GP, MPG, MPEG, MPE, DAT, VOB, and ASF.
  • AVI format: AVI.
  • Windows Media Video formats: WMV and ASF.
  • Flash Video formats: FLV and F4V.
  • Real Video formats: RM and RMVB.
  • QuickTime format: MOV.
  • Matroska format: MKV.
  • HTTP-Live-Streaming (HLS) format: M3U8.
    Notice You can upload M3U8 files in the ApsaraVideo VOD console only by using the URLs of source files, but not by uploading local files from your servers or terminals.
  • Other formats: DV, GIF, M2T, M4V, MJ2, MJPEG, MTS, OGG, QT, SWF, and WEBM.
Audio MP3, WMA, WAV, AAC, RA, M4A, FLAC, APE, AC3, AMR, CAF, and ACM.
Image PNG, JPG, JPEG, and GIF.
Auxiliary media asset
  • Watermark files: PNG, GIF, APNG, and MOV.
  • Subtitle files: SRT, ASS, STL, TTML, and VTT.
  • Material files: JPG, GIF, PNG, MP4, MAT, and ZIP.

Limits on media files

  • You can upload a local file of up to 48.8 TB in size.
  • You can upload an online file of up to 5 GB in size.
  • You can upload M3U8 files in the ApsaraVideo VOD console only by using the URLs of source files, but not by uploading local files from your servers or terminals.

Media asset storage

Storage region

ApsaraVideo VOD stores media assets in Object Storage Service (OSS). The storage nodes of ApsaraVideo VOD are globally distributed. Each storage node represents a storage region. Each storage region is assigned a storage location by ApsaraVideo VOD.

Storage location

After you activate ApsaraVideo VOD, the storage location in the China (Shanghai) region is enabled by default. The storage location indicates the address of the OSS bucket used by ApsaraVideo VOD. You can enable the storage locations in other regions as needed. By default, ApsaraVideo VOD uses the storage location in the China (Shanghai) region as the default storage location. After you enable storage locations in multiple regions, you can change the default storage location. You can specify a storage location for a media file to be uploaded. If you do not specify the storage location, the media file is uploaded to the default storage location.

The following table describes the storage regions that ApsaraVideo VOD supports and whether storage locations in these storage regions are enabled by default.

Note When you upload media files by using the ApsaraVideo VOD console or PC clients, the storage location in the region in which you access the ApsaraVideo VOD service is used. When you upload media files by using SDKs or by calling API operations, you can specify the storage location. For example, you can specify the storage location by setting the StorageLocation parameter when you call the UploadMediaByURL operation.
Storage region Storage region ID Storage location
China (Shanghai) cn-shanghai By default, this storage location is enabled after you activate ApsaraVideo VOD. This storage location is used as the default storage location.
China (Beijing) cn-beijing By default, the storage locations in these regions are not enabled. You can enable the storage locations in the ApsaraVideo VOD console based on your business requirements. After you enable storage locations in multiple regions, you can specify the default storage location as needed. For more information about how to enable a storage location and change the default storage location, see Manage VOD resources.
China (Shenzhen) cn-shenzhen
Japan (Tokyo) ap-northeast-1
Singapore (Singapore) ap-southeast-1
Indonesia (Jakarta) ap-southeast-5
Germany (Frankfurt) eu-central-1
India (Mumbai) ap-south-1

Billing for media asset storage

ApsaraVideo VOD charges you for consumed storage resources in pay-as-you-go mode or based on resource plans.

Upload methods

Upload media files on the codeless UI

To meet the requirements for fast upload or upload of large files in scenarios where requirements for business operations are low, ApsaraVideo VOD allows you to upload media files on the codeless user interface (UI) of the ApsaraVideo VOD console or PC clients. The following table describes the two upload methods.

Upload method Scenario Remarks
Upload media files by using the ApsaraVideo VOD console Scenarios in which you want to upload media files to ApsaraVideo VOD in a fast and convenient manner.
  • After you activate ApsaraVideo VOD, you can log on to the ApsaraVideo VOD console to upload media files on a browser.
  • For audio and video files, you can upload local files from your servers or terminals or upload online files by using the URLs of source files.
Upload media files by using PC client Scenarios in which you want to upload large files that take an extended period of time to upload, or in which requirements for business operations are low.
Note The upload of large files takes an extended period of time to complete. When you upload large files by using the ApsaraVideo VOD console, your logon session may expire due to security policies before the upload is complete. As a result, the upload fails. You can upload media files by using the PC clients provided by ApsaraVideo VOD to prevent upload failures.
  • You must download and install a PC client. ApsaraVideo VOD provides the PC clients for both the Windows and macOS operating systems.
  • Only local files can be uploaded.
  • You can upload media files only to the storage location in the China (Shanghai) region on the PC client for macOS. To upload media files to the storage locations in other regions, you must use the PC client for Windows.

Upload media files by programming

To meet the requirements of developers, ApsaraVideo VOD provides upload SDKs and API operations. The following steps describe the basic procedure for uploading a media file in this way:
  1. Obtain an upload URL and an upload credential from ApsaraVideo VOD.
  2. Call an OSS API operation to upload a media file.
The following upload methods are supported for developers:
  • Upload media files by using the server and client upload SDKs. Upload SDKs encapsulate the logic for obtaining upload URLs and credentials and calling API operations of OSS to upload media files. This method is easy to use and requires simple configurations. We recommend that you use this upload method.
  • Upload multiple media files at a time by using the URLs of source files. ApsaraVideo VOD provides the UploadMediaByURL operation that you can use to upload media files to a storage location of ApsaraVideo VOD by using the URLs that can be accessed over the Internet. This way, you do not need to download the media files to your servers or terminals and then upload the media files to ApsaraVideo VOD by using upload SDKs.
  • Upload media files by using OSS SDKs. If the upload SDKs cannot meet your business requirements, you can use an ApsaraVideo VOD server operation SDK and an OSS SDK together to upload media files. For example, you can use this upload method if the upload SDKs are unavailable in the programming language that you use. You can use an ApsaraVideo VOD server operation SDK to obtain upload URLs and credentials, and use an OSS SDK to decode the Base64-encoded upload URLs and credentials that you obtain and call API operations of OSS to upload media files.
  • Upload media files by using OSS API. We recommend that you do not use this upload method due to its low upload efficiency and high error probability. If you use this upload method, you must call API operations of ApsaraVideo VOD to obtain upload URLs and credentials and then call API operations of OSS to upload media files.
Note For more information about how to select an upload method, see Select an upload method.

The following table provides the references for the upload methods for developers.

Upload method Scenario Remarks

Upload SDK for servers

  • Scenarios in which you require automatic upload or you want to upload a large number of video files.
  • Scenarios in which you want to upload online media files.
Note We recommend that you use upload SDKs to upload media files. If the programming languages that you want to use are not supported by the upload SDKs of ApsaraVideo VOD, you can upload media files by using OSS SDKs.
  • Server upload SDKs of ApsaraVideo VOD encapsulate the logic for obtaining upload URLs and credentials and calling API operations of OSS to upload media files. You only need to complete simple configurations before you can upload media files.
  • Server upload SDKs support the Java, Python, PHP, C, and C++ programming languages.

Upload SDK for clients

Scenarios in which you want to upload user generated content (UGC) and professionally generated content (PGC).
  • Client upload SDKs of ApsaraVideo VOD encapsulate the logic for calling API operations of OSS to upload media files.
  • You must obtain upload URLs and credentials yourself. We recommend that you obtain upload URLs and credentials by integrating an ApsaraVideo for VOD server operation SDK on your application server. You do not need to decode the obtained upload URLs or credentials. You only need to deliver them to clients.
  • You can use client upload SDKs for web (JavaScript), Android, iOS, and WeChat mini programs to upload media files.

Upload media files by using a source file URL

Scenarios in which you want to upload files that are not stored on your servers or terminals. You can upload such files by using the URLs that can be accessed over the Internet.
  • You can upload media files only to the storage locations in the China (Shanghai) and Singapore (Singapore) regions by using this upload method.
  • You cannot upload local files.

Upload media files by using the OSS-native SDK

  • Scenarios in which you require automatic upload or you want to upload a large number of video files.
  • Scenarios in which you want to upload online media files.
  • To upload media files by using OSS SDKs, you must implement the logic for the entire upload process. You need to obtain upload URLs and credentials from ApsaraVideo VOD, decode the Base64-encoded upload URLs and credentials, and then use OSS SDKs to upload media files.
  • OSS SDKs support the Java, Python, PHP, .NET, Node.js, C, C++, and Go programming languages.
    Note We recommend that you use upload SDKs if you use the Java, Python, PHP, C, or C++ programming language.

Upload media files by calling API operations of OSS

Not recommended

  • Scenarios in which you require automatic upload or you want to upload a large number of video files.
  • Scenarios in which you want to upload online media files.
  • You must call API operations of ApsaraVideo VOD to obtain upload URLs and credentials.
  • You must decode the Base64-encoded upload URLs and credentials and call API operations of OSS to upload media files.

Upload settings

ApsaraVideo VOD allows you to configure settings for uploading media files, such as settings for media asset management, audio and video transcoding, upload event notifications, and upload management.

Media asset management during upload
  • Set the title of a media asset. You can set the title of the audio, video, or image file to be uploaded.
  • Set the category of a media asset. After you create media categories, you can specify a category for the media file to be uploaded.
  • Set the tags of a media asset. You can add tags to the media file to be uploaded.
  • Set the thumbnail of a video file. When you upload a video file, you can specify the image to be used as the thumbnail of the video file.

The following table describes the media asset settings supported by different upload methods.

Upload method Set the title of a media asset Set the category of a media asset Set the tags of a media asset Set the thumbnail of a video file
Upload media files by using the ApsaraVideo VOD console Supported Supported Not supported Not supported
Upload media files by using PC clients Supported Supported Supported Not supported

Upload SDK for servers

Supported Supported Supported Supported

Upload SDK for clients

Supported Supported Supported Supported

Upload media files by using a source file URL

Supported Supported Supported Supported

Upload media files by using the OSS-native SDK

Supported Supported Supported Supported

Upload media files by calling API operations of OSS

Supported Supported Supported Supported

Audio and video transcoding

You can specify a transcoding template group or a media workflow for transcoding audio and video files when you configure upload settings. Transcoding is automatically triggered after the upload is complete. Transcoding is not required for videos of specific formats. Only videos in the following formats can be played without transcoding: MP4, FLV, M3U8, MP3, and WEBM.

  • Specify a transcoding template group. By default, ApsaraVideo VOD asks you to specify a transcoding template group when you upload media files. Transcoding is automatically triggered after the upload is complete.
  • Specify a media workflow. After you create a media workflow that contains one or more transcoding jobs, you can specify the media workflow to be used for transcoding when you upload media files. After the upload is complete, ApsaraVideo VOD automatically runs the specified media workflow to complete the transcoding jobs.
  • Disable transcoding. If transcoding is not required, you can specify the No Transcoding template when you upload media files.

The following table describes the transcoding settings supported by different upload methods.

Upload method Specify a transcoding template group Specify a media workflow Disable transcoding
Upload media files by using the ApsaraVideo VOD console Supported Supported Supported
Upload media files by using PC clients Supported Not supported Supported

Upload SDK for servers

Supported Supported Supported

Upload SDK for clients

Supported Supported Supported

Upload media files by using a source file URL

Supported Supported Supported

Upload media files by using the OSS-native SDK

Supported Supported Supported

Upload media files by calling API operations of OSS

Supported Supported Supported

Upload event notifications

You can configure callbacks to receive event notifications about the upload progress and status after you upload media files. ApsaraVideo VOD allows you to configure HTTP or HTTPS and Message Service (MNS) callbacks to obtain event notifications. For more information about callback configurations, see Overview. For more information about how to configure callbacks, see Configure callback settings. All upload methods support event notifications. The following table describes the upload events.
Note For more information about the details of each upload event, see Events.
Event Event type Description
FileUploadComplete FileUploadComplete The FileUploadComplete event is generated when the upload of audio and video files is complete.
Note If you specified the No Transcoding template for audio or video files, you can obtain the streaming URLs after you receive a notification for the FileUploadComplete event.

You can also call the SubmitTranscodeJobs operation to transcode the audio or video files as needed after you receive a notification for the FileUploadComplete event.

ImageUploadComplete ImageUploadComplete The ImageUploadComplete event is generated when the upload of image files is complete.
AttachedMediaUploadComplete AttachedMediaUploadComplete The AttachedMediaUploadComplete event is generated when the upload of auxiliary media assets is complete.
UploadByURLComplete UploadByURLComplete The UploadByURLComplete event is generated after you call the UploadMediaByURL operation to upload media files by using the URLs of source files.
StreamTranscodeComplete StreamTranscodeComplete The StreamTranscodeComplete event is generated after a video stream in a specific definition and format, such as an SD stream in the MP4 format, is generated during transcoding.
Note For transcoded audio and video files, you can obtain the streaming URLs after you receive a notification for the StreamTranscodeComplete event.
TranscodeComplete TranscodeComplete The TranscodeComplete event is generated after all transcoded streams of a video are generated.
Note To ensure that video streams in all definitions can be received, you can play a video file after you receive a notification for the TranscodeComplete event.

Upload management

  • Perform multipart upload. ApsaraVideo VOD splits a media file into multiple parts during upload and combines the uploaded parts together after the upload is complete. By default, all media files are uploaded to ApsaraVideo VOD in multipart upload mode.
    Note During multipart upload, useless part files may be retained if the upload fails. These useless part files are automatically deleted after seven days. You can also call the DeleteMultipartUpload operation to manually clear useless part files.
  • Obtain the upload progress and status.
  • Perform resumable upload. If the upload of a media file fails due to network errors, ApsaraVideo VOD resumes the upload from the last successfully uploaded part.
    Note Resumable upload is implemented inside the client upload SDK. If a media file fails to be uploaded due to an exception, the upload is resumed from the recorded position without user interference.

The following table describes the upload management features supported by different upload methods.

Upload method Obtain the upload progress Perform resumable upload Perform multipart upload
Upload media files by using the ApsaraVideo VOD console Supported
Note You can view the upload progress in the Status column of the upload page.
Not supported Enabled by default
Upload media files by using PC clients Supported
Note You can view the upload progress on the Upload or Upload complete page.
Not supported Enabled by default

Upload SDK for servers

Supported
Note You can query the upload progress by calling the GetUploadDetails operation.
Only the upload SDK for Java supports this feature. Enabled by default

Upload SDK for clients

Supported
Note You can query the upload progress by calling the GetUploadDetails operation.
Supported Enabled by default

Upload media files by using a source file URL

Supported
Note You can query the upload progress by calling the GetURLUploadInfos operation.
Not supported Enabled by default

Upload media files by using the OSS-native SDK

Supported Only OSS SDK for Java supports this feature. Enabled by default

Upload media files by calling API operations of OSS

Supported Not supported Enabled by default

Upload authorization

You can use upload credentials or Security Token Service (STS) tokens to perform authorization and ensure security when you upload media files by programming. This prevents unauthorized users from uploading or playing media files.

Upload acceleration

Description

ApsaraVideo VOD provides the upload acceleration feature to speed up file transfer over a long distance and upload of files of gigabytes or terabytes in size. Upload acceleration is applicable to scenarios in which media files are transferred across regions. For example, you upload media files that are stored in the Chinese mainland to the storage location in the Singapore (Singapore) region.

Enable upload acceleration

Submit a ticket to enable the upload acceleration feature. You must provide the UID of your Alibaba Cloud account and the storage location for which you want to enable the upload acceleration feature.

Billing

You are charged for using the upload acceleration feature, which is a value-added feature provided by ApsaraVideo VOD. For more information about the pricing of the upload acceleration feature, see ApsaraVideo VOD pricing.
Note No fees are charged if you enable upload acceleration but do not use the feature.

Limits

The upload acceleration feature applies only to video files. The following table describes the support for the upload acceleration feature by different upload methods.

Upload method Upload acceleration
Upload media files by using the ApsaraVideo VOD console Not supported
Upload media files by using PC clients Not supported

Upload SDK for servers

Supported

Upload SDK for clients

Supported

Upload media files by using a source file URL

Supported

Upload media files by using the OSS-native SDK

Supported

Upload media files by calling API operations of OSS

Supported

Usage notes for uploaded media files

The following table describes the usage notes for the features of ApsaraVideo VOD that are related to uploaded media files.

Feature Description References
Media asset management after upload

You can manage uploaded media files such as source video files, transcoded stream files, and image files in ApsaraVideo VOD.

Media asset management
Media processing
ApsaraVideo VOD supports audio and video transcoding, automated review, online editing, and AI processing for uploaded media files.
Note ApsaraVideo VOD automatically extracts the metadata of uploaded audio and video files, such as the video resolution, duration, and bitrate. By default, ApsaraVideo VOD also captures snapshots of videos as thumbnails. Metadata extraction and thumbnail snapshots are free of charge.
Media processing
Audio and video playback
After audio and video files are uploaded, they are not immediately ready for playback. ApsaraVideo VOD needs to confirm that the audio and video files are received. You can determine whether the audio and video files are ready for playback by checking event notifications.
  • If you specified the No Transcoding template for audio or video files, you can obtain the streaming URLs after you receive a notification for the FileUploadComplete event.
  • For transcoded audio and video files, you can obtain the streaming URLs after you receive a notification for the StreamTranscodeComplete event. To ensure that video streams in all definitions can be received, you can play a video file after you receive a notification for the TranscodeComplete event.