tencent cloud

Media Processing Service

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Strengths
Use Cases
Purchase Guide
Billing Overview
Purchase Instructions
Top Up and Purchase
Overdue Payments
Refund
Getting Started
Console Guide
Overview
Creating Tasks
Tasks
Orchestrations
Templates
Resource Packs
Video Evaluation
AIGC Content Generation
Terminal SDK
Subtitle Editing Tool
Usage Statistics
Cloud Access Management Sample
Integration Tutorials
Audio/Video Transcoding Integration
Audio/Video Enhancement Integration
Audio Separation Integration
Integration of Digital and Visible Watermarks
Media AI Integration Tutorial
Media Quality Inspection Integration
Terminal SDK integration
MPS Live Stream Recording integration
DRM integration
Other tutorials
Application Scenario and Practical Tutorial
Image Quality Improvement Scenario
Audio/Video Cost Optimization Scenario
Short Drama Translation Scenario
AI-Generated Content Scenario
Online Education Scenarios
API Documentation
History
Introduction
API Category
Making API Requests
Processing Task Initiation APIs
Task Management APIs
Transcoding and Enhancement Template APIs
Watermark Template APIs
Screenshot Template APIs
Media AI Template APIs
Media AI—Hotword Lexicon APIs
Media AI—Sample Management APIs
Media Quality Inspection Template APIs
Live Streaming Recording Template APIs
Orchestration Management APIs
Data Statistics APIs
StreamLink—Security Group Management APIs
Other APIs
Image Processing Template APIs
AI Generation APIs
Other APIs
Data Types
Error Codes
Other Documents
WebSocket Protocol for Recognition
FAQs
Basics
Account Authorization
Task Configuration
Task Initiation
Task Result Viewing
Related Agreement
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

MPS Task Callback Notification

PDF
Focus Mode
Font Size
Last updated: 2022-06-06 11:10:54
After a video is processed by MPS, it’s a standard practice to send a notification about the completion of the video processing task. MPS has a template in SCF which you can use to enable this feature.

Overview

The example in this document uses MPS and SCF. MPS executes vide processing tasks, and SCF handles callback messages.

Directions

Step 1. Create a function

1. Log in to the SCF console, and click Function Service on the left sidebar.
2. At the top of the Function Service page, select Beijing and click Create to enter the function creating page.
3. Set the following parameters:
Function name: enter a name, e.g., MPSAnalysis.
Runtime: task callback templates support only Nodejs 8.9 at the moment.
Create Method: select Function Template.
Fuzzy search: enter "MPS Webhook template" and search.
Note:
Click Learn More in the template to view details in the Template Details window, which can be downloaded.
4. Click Next to go to the function configuration page.
5. Keep the default configuration and click Finish to complete the creation.

Step 2. Configure an MPS trigger

1. In the SCF console, click Function Service on the left sidebar, and click the function created to go to the details page.
2. Click Trigger Management > Create a Trigger. A trigger creation window pops up. Select MPS trigger for the trigger method.
The information of the main parameters is as follows. Keep the default settings for other parameters.
Event Type: an MPS trigger pushes events at the account level. Two types of trigger events are supported now: Workflow Task (WorkflowTask) and Video Edit Task (EditMediaTask).
>?
>- A service role exception message will appear when you create an MPS trigger for the first time. Click **SCF_QcsRole** and **MPS_QcsRole** as prompted to grant the necessary permissions.
>- An MPS trigger uses events generated at the service level as event sources, regardless of attributes such as region and resources. Each event type can be bound to only one function for each account. If you need multiple functions to handle a task, please see [Node.js SDK](https://www.tencentcloud.com/document/product/583/32747).
3. Click Submit to complete the configuration.

Step 3. Test the function

1. Log in to the MPS console and start a video processing workflow.
2. Go to the SCF console to view the execution result. Select the Log Query tab on the function details page to view the printed log information.
3. Log in to the COS console to view the data dumping and processing result.
Note:
You can write your own data processing methods as needed.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback