tencent cloud

Feedback

Getting Started

Last updated: 2024-03-15 17:51:31
    This document helps you get started with MPS. The diagram below describes the basic steps:

    Prerequisite Conditions

    Registration and Login

    1. Sign up for a Tencent Cloud account and verify your identity.
    2. Log in to the MPS console.

    Grant permission to access COS

    MPS needs to be able to download files from your COS buckets, transcode the files, and upload the files to your COS buckets after transcoding. Therefore, you need to create a service role to grant MPS the required permissions to access COS.
    To grant the permissions, go to the MPS console, and click Go to CAM to enter the authorization page.
    img
    
    Note
    You cannot perform further operations in the MPS console until you have granted the permissions.

    Operation Steps

    MPS can process VOD files and live streams.
    VOD file processing: Transcoding, moderation, screenshot, and other processing tasks can be performed on files uploaded to Tencent Cloud COS buckets or AWS S3 buckets. The processing results will be saved in buckets.
    Live stream processing: Processing tasks such as real-time recording can be performed on live streams.

    VOD File Processing

    Step 1. Set a template

    During media processing, you need to perform audio/video transcoding, watermarking, screencapturing, and other operations. You can control different operations by configuring different templates on the Templates page in the console.

    Step 2. Create a scheme

    A scheme helps automatically process new media files uploaded to your bucket according to the preconfigured processes and steps. In a scheme, you can set transcoding and screencapturing rules, processing workflows, callback notifications, etc.
    1. Log in to the MPS console and go to the Workflow > Schemes page.
    2. Click Create scheme to enter the Create scheme page. Then, set the Scheme name, Trigger bucket, Trigger directory, Output bucket, Output directory, Actions, and Enable event notifications. For more information on how to configure a scheme, see Scheme Configuration Description.
    
    The table below lists the information needed to configure a scheme.
    Configuration Item
    Required
    Description
    Scheme name
    Yes
    The name can contain up to 128 letters, digits, underscores (_), and hyphens (-), such as "MPS".
    Trigger bucket
    Yes
    Select a bucket created under the current APPID. After the scheme is enabled, videos uploaded to this bucket will be processed automatically.
    Trigger directory
    No
    This value must end with a slash (/). If it is left blank, the scheme will take effect for all directories in the trigger bucket.
    Output bucket
    Yes
    By default, the output bucket is the same as the trigger bucket. You can also select a bucket in the same region under the same APPID. After a scheme is executed, the processed videos will be stored in this bucket.
    Output directory
    No
    This value must end with a slash (/). If it is left empty, the output directory will be the same as the trigger directory.
    Enable event notifications
    No
    Event notifications are disabled by default. For more information on how to configure event notifications, see Getting Started. To enable TDMQ-CMQ event notifications, go to the TDMQ console to activate the service and create a model. After event notifications are enabled, the specified CMQ queue/topic will receive the event notifications of MPS.
    Actions
    Yes
    Select at least one task from transcoding, screencapturing, animated screenshot generating, moderation, content recognition, and content analysis tasks to configure the scheme.
    Callback Method Type
    Configuration Description
    TDMQ-CMQ callback
    TDMQ-CMQ model: Select Queue Model or Topic Model. Queue Model is selected by default. TDMQ-CMQ region: Select Guangzhou, Shanghai, Beijing, Shanghai Finance, Shenzhen Finance, Hong Kong (China), Chengdu, North America, or West US. Queue Name/Topic Name: Customize a name.
    HTTP callback
    When you call the TaskNotifyConfig API of the task, set NotifyType to URL and NotifyUrl to the HTTP callback URL.
    SCF callback
    You can click Go to SCF Console for configuration. For more information on how to configure the callback, see MPS Task Callback Notification. SCF callback configuration takes effect for all schemes. The configuration will not be retained for the current scheme.

    Step 3. Enable the scheme

    1. After a scheme is created, the Created successfully message will appear, and you will be automatically redirected to the Schemes page. In the scheme list, you can manage the scheme you just created.
    2. A scheme is not enabled by default. To enable a scheme, click the status button on the row of the scheme. Only after the scheme is enabled will it be automatically executed when a video is uploaded to the trigger bucket.

    Step 4. Initiate a task

    Currently, you can initiate a task by calling a task initiation API, uploading a video file to the COS directory bound to a scheme, or manually creating a task in Tasks > Create task.
    Manual task creation:
    1.1 Go to the Tasks page.
    1.2 Click Create task.
    1.3 Select the target video file, output path, and transcoding template and initiate the task.
    Automatic trigger for video uploaded to COS:
    1.1 After the scheme is enabled, go to the COS console and click Bucket List on the left sidebar.
    1.2 Locate the trigger bucket set in the scheme, click its name to enter the File List page, and upload a video file. MPS will automatically process the video according to the scheme settings.
    Note
    A scheme will be executed automatically only on video files that are uploaded to the trigger bucket after the scheme is enabled. Files uploaded before the scheme is enabled will not be processed.

    Step 5. Manage tasks

    1. Go to the Tasks page to view the list of all initiated tasks.
    2. You can filter tasks to be processed by field such as Status and Task ID. You can also click View details to view the subtask information, click Restart to restart tasks queuing up, play back the source video, and perform other operations.
    3. You can expand the subtask list to view the subtask information. You can also play back/view subtask files, download subtask output files, view subtask details, and perform other operations.
    img
    

    Live Stream Processing

    Step 1: Configure the template

    Currently, real-time recording of live streams is supported. For detailed template configurations, please refer to Stream Record Template.

    Step 2: Create a scheme

    1. Log in to the MPS console, and go to the Workflows > Live Schemes page.
    2. Click Create scheme. On the page that appears, set the scheme name, output bucket, output directory, and actions, and decide whether to enable event notification. For specific configuration methods, please refer to Live Schemes.
    

    Step 3: Initiate the task

    First, go to the Live Tasks page and create a new task. Then, enter the live stream address that requires recording, select the scheme created in the previous step, and associate the task with the scheme. At last, click \\*\\* Create\\*\\*.
    Note
    Make sure that the entered live stream address is correct when creating the recording task. If the live stream fails to be pulled the first time, the pull operation will be retried three times. If the operation still fails, the recording task status changes to Failed.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support