Media assets must be registered with ApsaraVideo VOD before you can use the features provided by ApsaraVideo VOD to manage, process, deliver, and play these media assets. When you upload media assets to ApsaraVideo VOD, they are automatically registered with ApsaraVideo VOD. This topic describes the supported 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 including 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.

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 valid file name extensions.
Media typeSupported 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.
    Important If you use the ApsaraVideo VOD console to upload M3U8 files, you can upload them only by using their URLs. You cannot upload M3U8 files from your on-premises devices.
  • Other formats: DV, GIF, M2T, M4V, MJ2, MJPEG, MTS, OGG, QT, SWF, and WEBM.
AudioMP3, WMA, WAV, AAC, RA, M4A, FLAC, APE, AC3, AMR, CAF, and ACM.
ImagePNG, JPG, JPEG, GIF, and HEIC.
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.

Upload methods

You can upload media assets by using GUI tools and developer tools.

GUI tools

ApsaraVideo VOD provides two GUI tools: ApsaraVideo VOD console and PC client. GUI tools allow you to quickly upload files or upload large files and are suitable for general-use scenarios where no strong requirements on production are imposed. The following table describes the two GUI tools.

Upload methodScenarioDescription
ApsaraVideo VOD consoleThe ApsaraVideo VOD console is a quick and convenient method to upload media files.
Note However, the length of console sessions is controlled by security policies. When you upload large files that require a long time to complete, your console session may expire before the upload is complete. In this case, we recommended that you use a PC client to upload large files.
  • After you activate ApsaraVideo VOD, you can log on to the ApsaraVideo VOD console in a browser to upload media files.
  • You can upload audio and video files from your on-premises devices or by using the URLs of the files.

Developer tools

To meet the requirements of developers, ApsaraVideo VOD provides developer tools in the form of upload SDKs and API operations. The following steps describe the basic procedure for uploading media files by using developer tools.
  1. Obtain an upload URL and an upload credential from ApsaraVideo VOD.
  2. Call an OSS API operation to upload a media file.
ApsaraVideo VOD provides the following developer tools:
  • Upload SDK: Upload SDKs (both server- and client-side) 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.
  • API operation for URL-based batch upload: ApsaraVideo VOD provides the UploadMediaByURL operation that you can use to upload media files to a storage address 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 devices and then upload the media files to ApsaraVideo VOD by using upload SDKs.
    Note The URL upload jobs are asynchronous. After you submit a URL upload job, it may take hours or even days to complete. If you have high requirements on the upload speed, we recommended that you upload the media files by using the upload SDKs.
  • OSS SDK: 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, use an OSS SDK to decode the Base64-encoded upload URLs and credentials that you obtain, and then call API operations of OSS to upload media files.
  • OSS API: If you use this upload method, you must call API operations of ApsaraVideo VOD to obtain upload URLs and credentials and call API operations of OSS to upload media files. We recommend that you do not use this upload method due to its low upload efficiency and high error probability.
Note For more information about how to select an upload method, see Select an upload method.

The following table provides a summary about the various developer tools for upload.

Upload methodScenarioDescription

Upload from 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 upload SDKs of ApsaraVideo VOD do not support your favored programming language, 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 from 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 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.

UploadMediaByURL

Scenarios in which you want to upload files that are not stored on your servers or devices. 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 addresses in the China (Shanghai) and Singapore regions by using this upload method.
  • You cannot upload local files.

Upload media files by using OSS SDKs

  • 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 OSS objects

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.

Media asset storage

Storage regions

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 address by ApsaraVideo VOD.

Storage addresses

Note ApsaraVideo VOD does not allow cross-region data access, even if the data belongs to the same account. Before you upload media files, make sure that your destination region is the same as the region in which your business is located. Otherwise, you may not be able to use the media files in the intended location.
Storage address settingDescription
Enable the default storage addressAfter you activate ApsaraVideo VOD, the storage address in the China (Shanghai) region is enabled by default. The storage address indicates the address of the OSS bucket used by ApsaraVideo VOD.
Enable a new storage addressYou can enable the storage addresses in other regions as needed.
Note By default, ApsaraVideo VOD uses the storage address in the China (Shanghai) region as the default storage address.
Modify the default storage addressAfter you enable storage addresses in multiple regions, you can change the default storage address. You can specify a storage address for a media file to be uploaded. If you do not specify the storage address, the media file is uploaded to the default storage address.

The following table describes the storage regions that ApsaraVideo VOD supports and whether storage addresses 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 address 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 address. For example, you can specify the storage address by setting the StorageLocation parameter when you call the UploadMediaByURL operation.
Storage regionStorage region IDStorage address
China (Shanghai)cn-shanghaiBy default, this storage address is enabled after you activate ApsaraVideo VOD. This storage address is used as the default storage address.
China (Beijing)cn-beijingBy default, the storage addresses in these regions are not enabled. You can enable the storage addresses in the ApsaraVideo VOD console based on your business requirements. After you enable storage addresses in multiple regions, you can specify the default storage address as needed. For more information about how to enable a storage address and change the default storage address, see Manage VOD storage.
China (Shenzhen)cn-shenzhen
Japan (Tokyo)ap-northeast-1
Singaporeap-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 based on the pay-as-you-go or subscription billing method (resource plan).

Upload settings

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

Features

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

GroupFeatureUpload media files by using the ApsaraVideo VOD console

Upload from servers

Upload from clients

UploadMediaByURL

Upload media files by using OSS SDKs

Upload OSS objects

Media asset managementSet the title of a media assetSupportedSupportedSupportedSupportedSupportedSupported
Set the category of a media assetSupportedSupportedSupportedSupportedSupportedSupported
Set the tags of a media assetNot supportedSupportedSupportedSupportedSupportedSupported
Set the thumbnail of a video fileNot supportedSupportedSupportedSupportedSupportedSupported
Audio and video transcodingSpecify a transcoding template groupSupportedSupportedSupportedSupportedSupportedSupported
Specify a media workflowSupportedSupportedSupportedSupportedSupportedSupported
No transcodingSupportedSupportedSupportedSupportedSupportedSupported
Upload managementObtain the upload progressSupportedSupportedSupportedSupportedSupportedSupported
Perform resumable uploadNot supportedOnly the upload SDK for Java supports this feature.SupportedNot supportedOnly OSS SDK for Java supports this feature.Not supported
Perform multipart uploadEnabled by defaultEnabled by defaultEnabled by defaultEnabled by defaultEnabled by defaultEnabled by default

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.

Audio and video transcoding

You can specify a transcoding template group or a media workflow to transcode audio and video files when you configure upload settings. Transcoding is automatically triggered after the upload is complete. You can also configure no transcoding. 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.

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 parts may be retained if the upload fails. These useless parts are automatically deleted after seven days. You can also call the DeleteMultipartUpload operation to manually clear useless parts.
  • 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 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 callbacks. All upload methods support event notifications. The following table describes the upload events.
Note For more information about each event, see Events.
EventEvent typeDescription
FileUploadCompleteFileUploadCompleteThe FileUploadComplete event is generated when the upload of audio and video files is complete.
Note If you specify 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.

ImageUploadCompleteImageUploadCompleteThe ImageUploadComplete event is generated when the upload of image files is complete.
AttachedMediaUploadCompleteAttachedMediaUploadCompleteThe AttachedMediaUploadComplete event is generated when the upload of auxiliary media assets is complete.
UploadByURLCompleteUploadByURLCompleteThe UploadByURLComplete event is generated after you call the UploadMediaByURL operation to upload media files by using the URLs of source files.
StreamTranscodeCompleteStreamTranscodeCompleteThe 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. Playback failures may occur if you play an audio or video file before a callback is received.
TranscodeCompleteTranscodeCompleteThe TranscodeComplete event is generated after all transcoded streams of a video are generated.
Note To ensure that video streams in all definitions can be played, you can play a video file after you receive a notification for the TranscodeComplete event. Playback failures may occur if you play a video file before a callback is received.

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 using developer tools. This prevents unauthorized users from uploading or playing media files.

Upload acceleration

Feature 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 address in the Singapore region.

Enable upload acceleration

You must submit a request on Yida to enable the upload acceleration feature. You must include your Alibaba Cloud account ID and the storage address for which you want to enable the upload acceleration feature in your request.

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 and supported upload methods

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 methodUpload acceleration
Upload media files by using the ApsaraVideo VOD consoleNot supported

Upload from servers

Supported

Upload from clients

Supported

UploadMediaByURL

Supported

Upload media files by using OSS SDKs

Supported

Upload OSS objects

Supported

Usage notes for uploaded media files

The following table describes the usage notes for the features that can be used for the uploaded media files in ApsaraVideo VOD.

FeatureDescriptionReferences
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 must be received on ApsaraVideo VOD before they can be played. You can determine whether the audio and video files can be played by checking event notifications.
  • If you specify 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 played, you can play a video file after you receive a notification for the TranscodeComplete event.