tencent cloud

APIs

ProcessLiveStream

下载
聚焦模式
字号
最后更新时间: 2026-09-14 12:14:35

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 Name Required Type Description
Action Yes String Common Params. The value used for this API: ProcessLiveStream.
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.
Url Yes String

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

TaskNotifyConfig Yes LiveStreamTaskNotifyConfig
OutputStorage No TaskOutputStorage
OutputDir No String
AiContentReviewTask No AiContentReviewTaskInput
AiRecognitionTask No AiRecognitionTaskInput
AiAnalysisTask No AiAnalysisTaskInput
AiQualityControlTask No AiQualityControlTaskInput
SmartSubtitlesTask No LiveSmartSubtitlesTaskInput
SessionId No String
SessionContext No String
ScheduleId No Integer
ResourceId No String

3. Output Parameters

Parameter Name Type Description
TaskId String
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 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 Code Description
FailedOperation.GenerateResource Resource generation failed.
FailedOperation.InvalidMpsUser Operation failed: illegal mps user.
InternalError Internal error.
InvalidParameter Parameter error.
InvalidParameterValue.Definition Parameter error: Definition.
InvalidParameterValue.Definitions Parameter error: Definitions.
InvalidParameterValue.SessionId

帮助和支持

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

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

文档反馈