Quick start

更新时间:
复制 MD 格式

This topic shows you how to use ApsaraVideo Media Processing (MPS), from activating the service to submitting a media processing job.

Process overview

image

Prerequisites

Create an Alibaba Cloud account and complete real-name verification. For more information, see Create an Alibaba Cloud account.

Step 1: Activate the service

  1. Activate the ApsaraVideo Media Processing (MPS) service. For detailed instructions, see Activate the service.

  2. (Recommended) Create a RAM user for MPS and grant permissions. For detailed instructions, see Create a RAM user and grant permissions.

    Note

    We recommend using RAM users to assign specific permissions. If multiple users collaborate on resources, grant each user only the minimum required permissions. This practice avoids sharing your Alibaba Cloud account or AccessKey pair, which reduces security risks.

Step 2: Upload and store files

  1. Log on to the Object Storage Service (OSS) console. In the left-side navigation pane, click Buckets, and then click Create bucket.

  2. In the Create Bucket panel, configure the parameters as prompted.

  3. Click OK.

    Important

    The bucket must be in a region where the MPS features you use are available. If you want to store input and output files in different buckets, repeat the preceding steps to create another bucket.

  4. Upload the file that you want to process.

    1. On the Buckets page, click the name of the bucket to which you want to upload the file. Go to the Files > Objects page.

    2. Click Upload and select the file that you want to upload.

    3. After the file status changes to Ready to upload, click Upload.

      When the file status in the job list changes to Uploaded, the upload is complete.

Step 3: Enable an MPS queue

Different types of jobs require different types of MPS queues. For details about queue types and how to enable them, see Enable an MPS queue.

  1. Log on to the MPS console.

  2. In the top navigation bar, select the same region as your OSS bucket.

  3. In the left-side navigation pane, choose Global settings > MPS queues and callback.

  4. Find the required MPS queue type, click Enable in the Actions column, and set a name for the MPS queue.

    Note

    If the required MPS queue type is not available, go to the Global settings > MPS queues page in the MPS console to create one. For more information, see Enable an MPS queue.

(Optional) Step 4: Configure media templates

MPS provides preset templates. If they meet your requirements, you can skip this step. Otherwise, create a custom template.

  • Preset transcoding templates include templates for standard transcoding, audio-only transcoding, transmuxing, Narrowband HDTM, and resolution enhancement. For more information, see Preset template details.

  • Custom templates include transcoding templates and watermark templates. You can create them in the console or by calling API operations. For instructions, see Manage templates.

Step 5: Create a media processing job

You can submit various media processing jobs by using the MPS console or by calling API operations. You can create a single job or a workflow.

  • Create a single media processing job in the console

    1. In the left-side navigation pane, click Job management to go to the job creation page.

    2. Select the required tab, click Create job, and configure parameters such as the file, MPS queue, and template. For more information, see Job management.

      Note

      To create media processing jobs by calling API operations, see the relevant operations in API reference.

  • Create a media processing workflow in the console

    1. In the left-side navigation pane, choose Workflow management > Workflows, and then click Create workflow.

    2. Configure parameters such as the input file, workflow nodes, and trigger type as required.

  • You can also create jobs programmatically by using the operations in the API reference.

Step 6: Check the job result

After submitting a job, you can check the result in the following ways:

  • On the Job management page of the MPS console, view the job status and details in the job list.

  • Call an API operation to query the job status. For example, for a transcoding job, you can call the QueryJobList operation to query multiple transcoding jobs in a batch by using their job IDs.

  • Use Simple Message Queue (formerly MNS) to receive message notifications. For more information, see Configure message notifications.