tencent cloud

All product documents
Media Processing Service
Media Quality Inspection Integration
Last updated: 2025-02-06 11:37:56
Media Quality Inspection Integration
Last updated: 2025-02-06 11:37:56

Scenario 1: VOD File Quality Inspection

Method 1: Initiating a Task in the Console

Step 1: Creating VOD Orchestration

1. Log in to the MPS console, click Create VOD Orchestration, and add a Media Quality Inspection node in the Actions field.

2. After the node is added, a new page pops up. Select a predefined system template or create a custom template based on the actual business scenario on this page. Then, save the settings.

3. Click Create at the bottom of the page after node configuration is completed to complete orchestration creation.
4. Return to the VOD orchestration list after the orchestration is created, find the newly created orchestration in the list, and click the switch to enable it. The orchestration will take effect in about 3-5 minutes after it is enabled.


Step 2: Initiating a VOD Quality Inspection Task

Upload VOD files requiring quality inspection to the trigger directory specified in the orchestration configuration after the orchestration takes effect. The uploaded files will be processed for quality inspection according to the configured node and template of the orchestration.

Step 3: Managing VOD Quality Inspection Tasks

Quality inspection tasks can be viewed on the VOD Processing Tasks page.


Method 2: Calling the API for Processing

Step 1: Initiating a VOD Quality Inspection Task

To initiate a processing task for video URLs or media files in COS, see ProcessMedia in API Documentation.
Request example:
POST / HTTP/1.1
Host: mps.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ProcessMedia
{
"InputInfo": {
"Type": "COS",
"CosInputInfo": {
"Bucket": "test-<appid>",
"Region": "ap-shanghai",
"Object": "/video/test.mp4"
}
},
"AiQualityControlTask": {
"Definition": 10
}
}
Example description:
1. Type can be set to COS or URL. Fill in the source file path based on the Type value.
2. Definition indicates the ID of the template configured in the task. Templates are created by calling CreateQualityControlTemplate.
Response example:
}
"Response": {
"TaskId": "26000002-ScheduleTask-8c0bb3a13e10462fc405262c623aeff4tt7"
}
}
Example description: TaskId indicates the unique ID of the task, which is used to query and manage tasks.

Step 2: Querying the Task Details

You can query the execution status and detailed result of a task by task ID. For more information, see DescribeTaskDetail in API Documentation.
Request example:
POST / HTTP/1.1
Host: mps.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTaskDetail
{
"TaskId": "26000002-ScheduleTask-8c0bb3a13e10462fc405262c623aeff4tt7"
}
Response example:
}
"Response": {
"WorkflowTask": {
"Output": {
"QualityControlResultSet": [
{
"Type": "BackWhiteEdge",
"QualityControlItems": [
{
"Confidence": 100,
"StartTimeOffset": 12,
"EndTimeOffset": 12
}
]
}
],
"ContainerDiagnoseResultSet": [
{
"Category": "StreamAbnormalCharacteristics",
"DateTimeSet": [],
"SeverityLevel": "Warning",
"TimestampSet": [
11.006
],
"Type": "AudioDuplicatedFrame"
}
],
"QualityEvaluationScore": 68
}
}
}
}

Scenario 2: Live Stream Quality Inspection

Method 1: Initiating a Task in the Console

Step 1: Creating Live Stream Orchestration

1. Log in to the MPS console, click Create Live Orchestration, and add the Media Quality Inspection node in the Actions field.

2. After the node is added, a new page pops up. Select a predefined system template or create a custom template based on the actual business scenario on this page. Then, save the settings.

3. Click Create at the bottom of the page after node configuration is completed to complete orchestration creation.
4. Return to the live stream orchestration list after the orchestration is created, and find the newly created orchestration in the list.


Step 2: Creating a Live Stream Quality Inspection Task

Go to the Live Processing Tasks page, click Create task, enter the live stream address to be processed on the task creation page, select the live stream orchestration created in the previous step, complete other information as needed, and click Create to complete the creation.


Step 3: Managing Live Stream Quality Inspection Tasks

Quality inspection tasks can be viewed on the Live Processing Tasks page.

Method 2: Calling the API for Processing

Step 1: Initiating a Live Stream Quality Inspection Task

To initiate a live stream processing task, see ProcessLiveStream in API Documentation.
Request example:
POST / HTTP/1.1
Host: mps.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ProcessLiveStream
{
"Url": "rtmp://tlivecloud.com/live/test",
"TaskNotifyConfig": {
"NotifyType": "URL",
"NotifyUrl": "http://tlivecloud.com/callback"
},
"AiQualityControlTask": {
"Definition": 10
}
}
Example description:
1. Url indicates the live stream address.
2. TaskNotifyConfig indicates the callback service address. When an issue is detected in the video stream, the issue information will be sent to this address in real time.
Response example:
}
"Response": {
"TaskId": "24000002-live-procedure-813dc41e6fdc22dcf24aa6e9c61cp92"
}
}
Example description: TaskId indicates the unique ID of the task, which is used to query and manage tasks.

Step 2: Parsing Live Stream Notifications and Performing Callback for Issues

After a message is received, the content of an MPS live stream processing event notification is parsed from the msgBody field in the message. For details, see ParseLiveStreamProcessNotification.
If TaskNotifyConfig is set when a live stream quality inspection task is initiated, the information on detected live stream issues detected will be sent to the configured address in real time.
Callback request example:
POST / HTTP/1.1
Content-Type: application/json

{
"NotificationType": "AiQualityControlResult",
"TaskId": "24000002-procedure-live-813dc41e6fdc22dcf24aa6e9c61cp92",
"AiQualityControlResultInfo": {
"QualityControlResultSet": [
{
"Type": "BackWhiteEdge",
"QualityControlItems": [
{
"Confidence": 100,
"StartTimeOffset": 12,
"EndTimeOffset": 12
}
]
}
],
"DiagnoseResultSet": [
{
"Category": "StreamStatusException",
"Type": "StreamOpenFailed",
"Timestamp": 0,
"Description": "Open url failed.",
"DateTime": "2023-11-06T06:37:28Z",
"SeverityLevel": "Fatal"
}
]
}
}
Example description: QualityControlResultSet indicates the information on issues detected through content quality inspections. DiagnoseResultSet indicates the information on issues detected through format diagnosis.


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

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