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.
The example in this document uses MPS and SCF. MPS executes vide processing tasks, and SCF handles callback messages.
Log in to the SCF console, and click Function Service on the left sidebar.
At the top of the Function Service page, select Beijing and click Create to enter the function creating page.
Set the following parameters:
MPSAnalysis
.Note:Click Learn More in the template to view details in the Template Details window, which can be downloaded.
Click Next to go to the function configuration page.
Keep the default configuration and click Finish to complete the creation.
In the SCF console, click **Function Service on the left sidebar, and click the function created to go to the details page.
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
).
Note:
- 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.
Log in to the MPS console and start a video processing workflow.
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.
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.
Was this page helpful?