Domain name for API request: mps.intl.tencentcloudapi.com.
After receiving the message from CMQ, parse out the content of the MPS live stream processing event notification from the msgBody field of the message.
This API is not used to trigger network calls, but to help generate SDKs for each language platform. You can refer to the parsing implementation in the SDK to parse event notifications.
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 | Event notification content for live streams obtained from CMQ. |
| Parameter Name | Type | Description |
|---|---|---|
| NotificationType | String | Live stream processing result type, including: |
| TaskId | String | Task ID for video processing. |
| ProcessEofInfo | LiveStreamProcessErrorInfo | |
| AiReviewResultInfo | LiveStreamAiReviewResultInfo | |
| AiRecognitionResultInfo | LiveStreamAiRecognitionResultInfo | |
| AiAnalysisResultInfo | LiveStreamAiAnalysisResultInfo | |
| AiQualityControlResultInfo | LiveStreamAiQualityControlResultInfo | |
| LiveRecordResultInfo | LiveStreamRecordResultInfo | |
| 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 for event notification signature expiration. Notifications from Media Processing Service (MPS) have a default expiration time of 10 minutes. If the time specified by the Timestamp value in a notification has expired, the notification can be deemed invalid, which helps prevent network replay attacks. The Timestamp format is a decimal UNIX timestamp, representing the seconds elapsed since midnight on January 1, 1970 (UTC/GMT). |
| 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 body 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: unauthorized MPS user. |
| InvalidParameterValue.InvalidContent | The value of Content is invalid. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback