This topic describes the full process of using ApsaraVideo Media Processing (MPS), from activating the service to submitting an MPS job or workflow. This helps you get started with MPS.
Flowchart of using MPS
An Alibaba Cloud account is created, and real-name verification is complete. For more information, see Create an Alibaba Cloud account.
Step 1: Activate MPS
- Activate MPS. For more information, see Activate ApsaraVideo Media Processing.
- Recommended. Create a RAM user and authorize the RAM user to access MPS. For more information, see Create a RAM user and grant permissions to a RAM user. Note We recommend that you create RAM users and authorize the RAM users to access different resources. If multiple users in your enterprise need to simultaneously access resources, you can use Resource Access Management (RAM) to grant the least permissions to the users. This prevents the users from sharing the username and password or AccessKey pair of an Alibaba Cloud account and reduces security risks.
Step 2: Upload and store an input file
- Log on to the Object Storage Service (OSS) console. In the left-side navigation pane, click Buckets. On the Buckets page, click Create Bucket.
- In the Create Bucket panel, configure parameters as prompted.
- Click OK. The bucket is created. Important The bucket must be created in the region in which you activate MPS. If you want to store the input and output files in different buckets, repeat the preceding steps.
- Upload an input file.
- On the Buckets page, click the name of the bucket in which you want to store the input file. On the Upload. page, click
- On the page that appears, click Select Files to upload the input file.
- After the input file enters the Ready for Upload state, click Upload. In the Task List panel, wait until the input file enters the Uploaded state. The input file is uploaded.
Step 3: Activate an MPS queue
The MPS queues used by jobs vary with the job type. For more information, see Manage MPS queues.
- Log on to the MPS console.
- In the top navigation bar, select the region in which your OSS buckets reside.
- In the left-side navigation pane, choose .
- Find the MPS queue of the type that you want to use and click Activate in the Actions column. In the dialog box that appears, name the MPS queue. Note If the MPS queue that you want to use is unavailable, you can click Create MPS Queue on the page to create an MPS queue based on your requirements. For more information, see Manage MPS queues.
Step 4: (Optional) Configure a template
If you use a preset template provided by MPS, skip this step. If preset templates do not meet your business requirements, you can create a custom template.
- Preset templates can be divided into several types, such as preset templates for regular transcoding, audio transcoding, container format conversion, Narrowband HDTM, and resolution redoubling. For more information, see Preset template details.
- MPS allows you to create custom transcoding templates and custom watermark templates. You can create custom templates in the MPS console or by calling API operations. For more information, see Manage templates.
Step 5: Create an MPS job or workflow
MPS allows you to create MPS jobs or workflows in the MPS console or by calling API operations.
- Create an MPS job in the MPS console
- In the left-side navigation pane, click Tasks.
- On the Tasks page, click a tab based on the type of the MPS job that you want to create. On the tab, click Create Task. On the page that appears, configure parameters of the job input, job output, MPS queue, and template. For more information, see Job management. Note For information about how to create MPS jobs by calling API operations, see API path.
- Create an MPS workflow in the MPS console
- In the left-side navigation pane, choose Create Workflow. . On the Workflow Settings page, click
- On the Create Workflow page, configure basic parameters and configure nodes in the workflow.
- For information about how to create MPS workflows by calling API operations, see API path.
Step 6: Query the job results
- In the left-side navigation pane of the MPS console, click Tasks. On the Tasks page, view the status and details of the job.
- Call API operations. For example, you can call the QueryJobList operation to query the results of one or more transcoding jobs. The IDs of the transcoding jobs are required when you call the operation.
- Enable the feature for sending notifications on jobs to a Message Service (MNS) queue or topic. For more information, see Enable the notification feature for jobs or workflows.