Domain name for API request: mps.intl.tencentcloudapi.com.
After receiving a message from CMQ, parse out the content of the MPS live stream processing event notification from the msgBody field in the message.
This API is not used to initiate network calls. Instead, it helps generate SDKs for each language platform. You can refer to the parsing implementation in the SDK for event notification parsing.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: ParseLiveStreamProcessNotification. |
| Version | Yes | String | Common Params. The value used for this API: 2019-06-12. |
| Region | No | String | Common Params. This parameter is not required for this API. |
| Content | Yes | String | Content of the live stream event notification obtained from CMQ. |
| Parameter Name | Type | Description |
|---|---|---|
| NotificationType | String | Live stream processing result type, including: |
| TaskId | String | Video processing task ID. |
| ProcessEofInfo | LiveStreamProcessErrorInfo | Error information of live stream processing. Valid when NotificationType is ProcessEof. |
| AiReviewResultInfo | LiveStreamAiReviewResultInfo | Content moderation result. Valid when NotificationType is AiReviewResult. |
| AiRecognitionResultInfo | LiveStreamAiRecognitionResultInfo | Content recognition result. Valid when NotificationType is AiRecognitionResult. |
| AiAnalysisResultInfo | LiveStreamAiAnalysisResultInfo | Content analysis result. Valid when NotificationType is AiAnalysisResult. |
| AiQualityControlResultInfo | LiveStreamAiQualityControlResultInfo | Media quality inspection result. Valid when NotificationType is AiQualityControlResult. |
| LiveRecordResultInfo | LiveStreamRecordResultInfo | Live streaming result is valid when NotificationType is LiveRecordResult. |
| AiSmartSubtitleResultInfo | LiveStreamAiSmartSubtitleResultInfo | Smart subtitle result. Valid when NotificationType is AiSmartSubtitleResult. |
| SessionId | String | An identifier for deduplication. If there has been a request with the same identifier within the past seven days, an error will be returned for the current request. The maximum length is 50 characters. Leaving it blank or using a null string indicates no deduplication is required. |
| SessionContext | String | Source context, which is used to pass through user request information. The callback for task flow status changes will return the value of this field. The maximum length is 1,000 characters. |
| Timestamp | Integer | - Expiration time: the UNIX Timestamp when the event notification signature expires. - Message notifications from media processing expire after 10 minutes by default. If the time specified by the Timestamp value in a message notification has expired, the notification is deemed invalid, which prevents network replay attacks. - Timestamp is in decimal UNIX Timestamp format, which is the seconds elapsed since January 1, 1970 (UTC/GMT midnight). |
| Sign | String | Event notification security signature. Sign = MD5 (Timestamp + NotifyKey). Note: Media Processing Service concatenates Timestamp and NotifyKey from TaskNotifyConfig as a string and calculates the Sign value through MD5. This value is included in the notification message. Your backend server can verify whether the Sign is correct using the same algorithm, to confirm whether the message is indeed from the Media Processing Service backend. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Callback packet description
https://mps.intl.tencentcloudapi.com/?Action=ParseLiveStreamProcessNotification
&Content={"NotificationType":"AiReviewResult",XXX
&<Common request parameters>
{
"Response": {
"NotificationType": "AiReviewResult",
"TaskId": "2459149217-procedure-live-xxx51da009t0",
"ProcessEofInfo": null,
"AiReviewResultInfo": {
"ResultSet": [
{
"Type": "VoicePorn",
"ImagePornResultSet": [],
"ImageTerrorismResultSet": [],
"ImagePoliticalResultSet": [],
"VoicePornResultSet": [
{
"StartPtsTime": 0.266,
"EndPtsTime": 4.146,
"Confidence": 98,
"Suggestion": "block",
"Label": "sexual_moan"
}
]
}
]
},
"AiRecognitionResultInfo": null,
"AiAnalysisResultInfo": null,
"AiQualityControlResultInfo": null,
"SessionId": "",
"SessionContext": "",
"RequestId": "335bdaa3-db0e-46ce-9946-51941d9cb0f5"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.InvalidMpsUser | Operation failed: illegal mps user. |
| InvalidParameterValue.InvalidContent | Invalid value of the parsed Content. |
文档反馈