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.
|Media type||Supported format|
|Audio||MP3, WMA, WAV, AAC, RA, M4A, FLAC, APE, AC3, AMR, CAF, and ACM.|
|Image||PNG, JPG, JPEG, GIF, and HEIC.|
|Auxiliary media asset|
You can upload media assets by using GUI tools and developer 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 two GUI tools.
|ApsaraVideo VOD console||The ApsaraVideo VOD console is a quick and convenient method to upload media files. |
Note 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.
- Obtain an upload URL and an upload credential from ApsaraVideo VOD.
- Call an OSS API operation to upload a media file.
- 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 then 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.
The following table provides a summary about the various developer tools for upload.
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.
|Scenarios in which you want to upload user generated content (UGC) and professionally generated content (PGC).|
|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.|
Media asset storage
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 address setting||Description|
|Enable the default storage address||After you activate ApsaraVideo VOD, you are assigned an independent VOD bucket in each region. You must enable the bucket before you can upload and manage media resources in a region. Other configurations are not required. For more information, see Enable VOD buckets.|
|Add a new storage address||You can add OSS buckets to ApsaraVideo VOD. This way, you can perform operations such as transcoding, snapshot capture, and playback on media files that are stored in the OSS buckets. For more information, see Add user-created OSS buckets.|
|Modify the default storage address||After 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. For more information, see Specify the default bucket.|
The following table describes the storage regions that ApsaraVideo VOD supports and the corresponding region IDs.
StorageLocationparameter when you call the UploadMediaByURL operation.
|Storage region||Storage region ID|
|China (Hong Kong)||cn-hongkong|
Billing for media asset storage
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.
The following table describes the upload settings supported by different upload methods.
|Group||Feature||Upload media files by using the ApsaraVideo VOD console|
|Media asset management||Set the title of a media asset||Supported||Supported||Supported||Supported||Supported||Supported|
|Set the category of a media asset||Supported||Supported||Supported||Supported||Supported||Supported|
|Set the tags of a media asset||Not supported||Supported||Supported||Supported||Supported||Supported|
|Set the thumbnail of a video file||Not supported||Supported||Supported||Supported||Supported||Supported|
|Audio and video transcoding||Specify a transcoding template group||Supported||Supported||Supported||Supported||Supported||Supported|
|Specify a media workflow||Supported||Supported||Supported||Supported||Supported||Supported|
|Upload management||Obtain the upload progress||Supported||Supported||Supported||Supported||Supported||Supported|
|Perform resumable upload||Not supported||Only the upload SDK for Java supports this feature.||Supported||Not supported||Only OSS SDK for Java supports this feature.||Not supported|
|Perform multipart upload||Enabled by default||Enabled by default||Enabled by default||Enabled by default||Enabled by default||Enabled 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 an image 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.
- 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
|FileUploadComplete||FileUploadComplete||The 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 playback 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 is transcoded in a specific definition and format, such as an SD stream in the MP4 format. |
Note For transcoded audio and video files, you can obtain the playback 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.
|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 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.
- For more information about the scenarios of using upload credentials or STS tokens, see Comparison between credentials and STS.
- For more information about how to use upload credentials or STS tokens, see the following topics:
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.
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 method||Upload acceleration|
|Upload media files by using the ApsaraVideo VOD console||Not 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.
|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|
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 from videos as thumbnails. Metadata extraction and thumbnail snapshots are free of charge.
|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.