tencent cloud

媒体处理

ParseLiveStreamProcessNotification

下载
聚焦模式
字号
最后更新时间: 2026-10-13 17:12:23

1. API Description

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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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.

3. Output Parameters

Parameter Name Type Description
NotificationType String Live stream processing result type, including:
  • AiReviewResult: content moderation result;
  • AiRecognitionResult: content recognition result;
  • LiveRecordResult: live streaming result;
  • AiQualityControlResult: media quality inspection result.
  • AiAnalysisResult: content analysis result.
  • AiSmartSubtitleResult: smart subtitle result;
  • ProcessEof: end of live stream processing.
  • 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.

    4. Example

    Example1 Parse live stream event notification content

    Callback packet description

    Input Example

    https://mps.intl.tencentcloudapi.com/?Action=ParseLiveStreamProcessNotification
    &Content={"NotificationType":"AiReviewResult",XXX
    &<Common request parameters>

    Output Example

    {
        "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"
        }
    }

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    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.

    帮助和支持

    本页内容是否解决了您的问题?

    填写满意度调查问卷,共创更好文档体验。

    文档反馈