Overview
Menu

ProcessLiveStream

Last updated: 2026-09-14 12:14:35Download PDF

1. API Description

Domain name for API request: mps.intl.tencentcloudapi.com.

This API is used to initiate processing tasks on a live stream. Features include:

Intelligent content moderation (porn detection in images, sensitive information detection, audio pornography detection);

  • Smart content recognition (human faces, full texts, text keywords, full speech, speech keywords, real-time speech translation, object recognition, and game tagging).
    Intelligent content analysis (clipping, highlights).
    Quality inspection (live stream format diagnosis, audio and video content detection (jitter, blur, low light, overexposure, black and white edges, black and white screens, screen glitch, noise, mosaic, QR code, and more), and no-reference scoring).
    Recording

Live stream processing event notification supports HTTP callbacks and also supports real-time writing to the message queue CMQ specified by the user. The user obtains the event notification result from the message queue CMQ. Meanwhile, if an output file exists during the process, it will be written to the target storage of the output file specified by the user.

A maximum of 100 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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: ProcessLiveStream.
VersionYesStringCommon Params. The value used for this API: 2019-06-12.
RegionNoStringCommon Params. This parameter is not required for this API.
UrlYesString

Live stream URL (must be a live streaming address, supporting rtmp, hls, flv, trtc, webrtc, srt, etc.).
The trtc address is as follows:
trtc://trtc.rtc.qq.com/mps/<roomid>?sdkappid=<sdkappid>&userid=<userid>&usersig=<usersig>
<roomid> is the TRTC room number ID
<sdkappid> is the TRTC SDK app ID
<userid> is the user ID for the service to enter the room, which can distinguish who is the robot
<usersig> is the TRTC user signature

webrtc supports LEB live streams. For address retrieval, please refer

For srt supported addresses, please refer

TaskNotifyConfigYesLiveStreamTaskNotifyConfig
OutputStorageNoTaskOutputStorage
OutputDirNoString
AiContentReviewTaskNoAiContentReviewTaskInput
AiRecognitionTaskNoAiRecognitionTaskInput
AiAnalysisTaskNoAiAnalysisTaskInput
AiQualityControlTaskNoAiQualityControlTaskInput
SmartSubtitlesTaskNoLiveSmartSubtitlesTaskInput
SessionIdNoString
SessionContextNoString
ScheduleIdNoInteger
ResourceIdNoString

3. Output Parameters

Parameter NameTypeDescription
TaskIdString
RequestIdStringThe 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 Trigger a live stream identification task

This example shows you how to initiate a content recognition task for a live stream with the URL http://www.abc.com/abc.m3u8.

Input Example

POST / HTTP/1.1
Host: mps.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ProcessLiveStream
<Common request parameters>

{
    "Url": "http://www.abc.com/abc.m3u8",
    "AiRecognitionTask": {
        "Definition": 10
    },
    "TaskNotifyConfig": {
        "CmqRegion": "gz",
        "CmqModel": "Queue",
        "QueueName": "queue-125717729292"
    }
}

Output Example

{
    "Response": {
        "RequestId": "5ca61e3a-6b8e-4b4e-9256-fdc701190064ef0",
        "TaskId": "125xxxxxx07-live-procedure-813dc41e6fdc22dcf24aa6e9c61cp92"
    }
}

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 CodeDescription
FailedOperation.GenerateResourceResource generation failed.
FailedOperation.InvalidMpsUserOperation failed: illegal mps user.
InternalErrorInternal error.
InvalidParameterParameter error.
InvalidParameterValue.DefinitionParameter error: Definition.
InvalidParameterValue.DefinitionsParameter error: Definitions.
InvalidParameterValue.SessionId