You can use multiple methods to upload media files (such as audio, video, and image files) to the bucket allocated by ApsaraVideo for VOD. ApsaraVideo for VOD can automatically start media processing such as transcoding, editing, and distribution. You can also manually start media processing by using the API.
ApsaraVideo for VOD supports the following upload methods:
Console upload: allows you to upload audio, video, and image files in the ApsaraVideo for VOD console. You can upload multiple files at a time. After activating ApsaraVideo for VOD, you can log on to the ApsaraVideo for VOD console in a browser to upload media files.
Server upload: allows you to upload media files stored on an application server to the bucket allocated by ApsaraVideo for VOD. You need to integrate a server upload SDK. This method applies to automatic upload of videos and migration of a large number of videos.
Client upload: allows you to upload local media files on PCs (through a webpage) or mobile devices to the bucket allocated by ApsaraVideo for VOD. This method applies to the upload of UGC and PGC files. You need to integrate a client upload SDK. Currently, the Android upload SDK, iOS upload SDK, and Web upload SDK are provided.
URL-based upload: allows you to upload media files stored in other places to the bucket allocated by ApsaraVideo for VOD based on media file URLs. You can call the UploadMediaByURL operation and specify the URLs of the media files to be uploaded. ApsaraVideo for VOD automatically pulls the media files from the origin in the background.
For more information about the AccessKey and permission configuration required for the upload, see Account and authorization.
|Media type||Supported file format (file name extension)|
|Audio||MP3, WMA, WAV, AAC, RA, M4A, FLAC, APE, AC3, AMR, CAF, and ACM|
|Image||PNG, JPG, JPEG, and GIF|
|Attached media asset|
- File name extensions are case-insensitive. For example, both MP4 and mp4 are supported.
- When you upload files in the ApsaraVideo console or PC client or by using an upload SDK, files are uploaded in multi-part mode by default. The maximum size of a single file that can be uploaded in multi-part mode is
48.8 TB. Upload SDKs also support the simple upload mode. The maximum size of a single file that can be uploaded in simple upload mode is 5 GB.
- If an upload in multi-part mode fails, part files may be generated. The part files are automatically deleted
ApsaraVideo for VOD uses Alibaba Cloud OSS to store media resources. You do not need to activate OSS separately. When you activate ApsaraVideo for VOD, a system bucket is allocated by default. The system bucket is generally located in China (Shanghai). You can also add buckets in other storage regions. For more information, see Storage management in User Guide.
You can upload media files to the globally default bucket or specify the bucket when uploading each media file. To prevent uploaded media files from overwriting each other, ApsaraVideo for VOD automatically sets the storage paths of uploaded media files. After media files are uploaded, you can view them and manage media assets.
The following settings are supported when you upload media files:
Metadata: You can configure metadata such as the title, category, and tag of audio, video, and image files to facilitate media asset management and search.
Bucket: You can specify the bucket by using the
StorageLocationparameter in the upload SDK or API. By default, the globally default bucket is used.
Callback type and URL: You can configure the callback type and URL by using the
MessageCallbackparameter of the UserData parameter in the upload SDK or API. By default, the global callback settings are used.
Video processing method: After a video is uploaded, ApsaraVideo for VOD automatically transcodes the video and takes thumbnail snapshots by default. You can specify the transcoding template by setting the
TemplateGroupIdparameter. You can also use the
No Transcodingtemplate to distribute videos without transcoding. By default, the global transcoding settings are used.
For more information, see the media upload API.
After a video is uploaded and automatically transcoded, ApsaraVideo for VOD automatically selects the middle one among thumbnail snapshots as the thumbnail. You can also set a custom image as the thumbnail by setting the
CoverURL parameter in the upload SDK or API during the video upload.
To use a local image file as the thumbnail, you must upload the image file in advance and set the CoverURL parameter to the URL of this image file. The methods for uploading an image file are similar to those for uploading a video file. You can upload an image file in the ApsaraVideo for VOD console or by using the client upload and server upload methods.
To use an image file on the Internet as the thumbnail, set the CoverURL parameter to the URL of the image file. The image file can be from a website other than Alibaba Cloud. Ensure that the URL is valid and accessible.
You can also call the UpdateVideoInfo operation to set the thumbnail after a video is uploaded.
When uploading videos, you can specify a transcoding template or disable transcoding by using the No Transcoding template. For example, you can use the No Transcoding template to upload short videos because short videos generally have been encoded and compressed when they are captured. For more information about how to configure transcoding, see Transcoding settings in the ApsaraVideo for VOD console.
Quick transcoding: By default, ApsaraVideo for VOD automatically transcodes uploaded videos.
Distribution without transcoding: If the No Transcoding template is used to upload videos, the videos can be played immediately after they are uploaded. If a CDN domain name is configured, uploaded videos are distributed in accelerated mode by default to ensure smooth playback.
After media files are uploaded, you can obtain event notifications in real time. However, you must deploy the event notification receiving service and configure the callback URL in the ApsaraVideo for VOD console in advance. For more information, see Event notification overview.The upload completion events include:
ApsaraVideo for VOD supports audio and video transcoding, automated review, online editing, and AI processing for uploaded media files.
Different from OSS, ApsaraVideo for VOD automatically extracts the metadata (such as the video resolution, duration, and bitrate) from the uploaded audio and video files by default. In addition, ApsaraVideo for VOD takes thumbnail snapshots of videos. The metadata extraction and thumbnail snapshot taking are free of charge.
When a video is uploaded, it is not immediately ready for playback. ApsaraVideo for VOD needs to confirm that the video has been received completely. You can determine whether videos are ready for playback based on
For a video (or audio) that does not need to be transcoded, you can play it when a FileUploadComplete event notification is received. You can call the GetPlayInfo operation to obtain the playback URL.
For a video that needs to be transcoded, you can play it when a StreamTranscodeComplete event notification is received. To ensure that streams in all definitions can be obtained, wait until a TranscodeComplete event notification is received.
You can also use the No Transcoding template to upload videos so that they are not transcoded. After receiving a FileUploadComplete event notification, you can call the SubmitTranscodeJobs, SubmitSnapshotJob, or SubmitAIMediaAuditJob operation to process the uploaded videos.
After media files are uploaded, you can use ApsaraVideo for VOD to manage media assets, such as video mezzanine files, transcoded stream files, and image files.
Use the media library in the ApsaraVideo for VOD console to manage media assets.
Use the media asset management API to perform relevant operations.