ApsaraVideo Media Processing (MPS) supports video uploads through the MPS console, the OSS console, OSS API operations, and OSS tools.
Usage notes
-
Uploading a video to OSS incurs storage fees. To process the uploaded video, MPS must download it first. OSS offers multiple storage classes: Standard, Infrequent Access (IA), Archive, and Cold Archive. Standard storage does not incur traffic fees for access over an internal network within the same region. Other storage classes incur traffic and API call fees. If you use Archive storage with real-time access enabled, Archive data retrieval fees also apply during media processing. Billing overview.
-
If you upload a video to the input path of an MPS workflow with automatic triggering enabled, the workflow starts automatically. Trigger a workflow.
-
Incomplete videos may fail to transcode. Verify that a video is intact before uploading.
Upload methods
Upload a video in the MPS console
With a workflow configured in the MPS console, you can upload a video to the OSS input path of the workflow's Input node to start processing. After the upload completes, MPS generates a media file with a media asset ID on the Media List page.
Prerequisites
-
OSS is activated. Activate OSS.
-
A workflow is created. Create a workflow.
Procedure
Log on to the MPS console.
In the top navigation bar, select a region from the drop-down list.
-
In the left-side navigation pane, choose . The Upload Video page appears.
-
Click Add Video.
-
In the Add Video and Initiate Workflow dialog box, configure the upload settings.
Parameter
Description
Workflow
Select a workflow from the drop-down list.
Add Video
Click Add Local Video or Add Video and select the video to upload.
-
Click Upload.
NoteDuring an upload, you can navigate to other MPS console pages but must not refresh or close the browser, or switch to other Alibaba Cloud consoles. Otherwise, the upload is interrupted.
What to do next
After the upload completes, go to to view or publish the generated media file. Manage media.
Upload a video in the OSS console
Upload a video through the OSS console to a bucket in an MPS-supported region. You can then manually start a processing job such as transcoding. Alternatively, upload the video to the input path of an MPS workflow's Input node to trigger the workflow automatically.
Prerequisites
OSS is activated. Activate OSS.
Procedure
-
Log on to the OSS console.
-
In the left-side navigation pane, click Buckets.
-
Click the destination bucket. To trigger a workflow, select the input bucket added in the MPS console and navigate to the input path configured for the workflow's Input node.
-
In the left-side pane of the bucket details page, choose Object Management > Objects. On the Objects page, click Upload Object.
-
Configure the upload parameters. For parameter details, see Upload objects.
Parameter
Description
Upload To
The destination directory. You can upload to the current directory or a specified directory.
Object ACL
The ACL of the uploaded object. Default: Inherited from Bucket.
Files to Upload
Click Select Files or Select Folders, or drag files to the upload area. After the video is uploaded, the specified workflow is triggered to generate a media file.
-
Click Upload Object.
What to do next
After the upload completes, a media file appears on the Media List page in the MPS console. You can view or publish the media file. Manage media.
Upload a video by using the OSS API or OSS tools
You can also upload videos through OSS API operations or OSS tools:
-
Basic operations such as
PutObject,PostObject, andCopyObject. For more information, see Basic operations.NoteIf you upload a video to the input path of an automatically triggered MPS workflow using basic operations, the workflow starts automatically. To avoid triggering a workflow when calling CopyObject, disable the workflow first.
-
multipart upload. For more information, see Multipart upload.NoteFor multipart uploads, use the UploadPart operation instead of PutObject to upload parts. Using PutObject triggers the workflow for each part. After all parts are uploaded, call CompleteMultipartUpload to complete the upload. Otherwise, the workflow cannot be triggered.
-
OSS tools such as ossutil and ossbrowser. Overview of OSS management tools.
FAQ
Why are multiple transcoding jobs triggered after I upload a file?
If a single uploaded file triggers multiple transcoding jobs, check the following:
-
Verify that the file's upload path does not match multiple workflow input paths. Workflow triggering rules for files.
-
Check whether the workflow's input path and output path create a loop — for example, a processed output file triggers the same workflow again.
-
Check whether the file is a live stream recording in the M3U8 format. Calling PutObject multiple times to update an M3U8 file during recording triggers the workflow each time. To avoid this, set the workflow to manual trigger and call AddMedia after the M3U8 file is updated. If the workflow uses automatic trigger, wait until live stream recording completes before uploading the final M3U8 file to OSS.
-
Check whether multipart upload uses PutObject instead of UploadPart. PutObject triggers the workflow for each part. Use UploadPart for individual parts and call CompleteMultipartUpload after all parts are uploaded. Otherwise, the workflow cannot be triggered.