tencent cloud

Video on Demand

ProcessMediaByMPS

Download
Focus Mode
Font Size
Last updated: 2026-09-18 15:59:33

1. API Description

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

Use the media processing capacity of the media processing service (MPS) to initiate media processing for videos in video-on-demand.
Currently supported MPS features:

  1. Smart subtitling: This feature supports processing offline audio files, video files, and live streams. It can extract subtitles in the video source language through ASR speech recognition or OCR text recognition, and implement multilingual translation. View details in the integration guide (https://www.tencentcloud.com/document/product/266/131210?from_cn_redirect=1).
  2. Intelligent erasure: It can blur, mosaic, or seamlessly process elements such as logos, subtitles, human faces, and license plates in video footage, making it easy to spread and share content. The new video generated by this task will be assigned a new FileId and stored in a sub-application of the VOD platform. View details in the Access Guide.
  3. AI analysis: This feature supports all-in-one translation (https://www.tencentcloud.com/document/product/266/131212?from_cn_redirect=1), highlights (https://www.tencentcloud.com/document/product/266/131213?from_cn_redirect=1), LLM video summary (https://www.tencentcloud.com/document/product/266/131214?from_cn_redirect=1), LLM audio/video understanding (https://www.tencentcloud.com/document/product/266/131215?from_cn_redirect=1), intelligent splitting (https://www.tencentcloud.com/document/product/266/131216?from_cn_redirect=1), intelligent landscape-to-portrait (https://www.tencentcloud.com/document/product/266/131217?from_cn_redirect=1), video deduplication (https://www.tencentcloud.com/document/product/266/131218?from_cn_redirect=1), and other features.

Video processing task initiated this method:

  1. Query of task status and results is still completed in the VOD platform. Use DescribeTaskDetail or DescribeTasks to query tasks.
  2. The amount and bills of related features will be provided on the PS platform. Before using this feature, start by enabling Media Processing Service (MPS) in the console. For the activation method, see the preliminary operations in the integration guide.

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: ProcessMediaByMPS.
Version Yes String Common Params. The value used for this API: 2018-07-17.
Region No String Common Params. This parameter is not required.
FileId Yes String

Media file ID, the globally unique identifier of the file in VOD, assigned by the VOD backend after successful upload. You can obtain this field in the video upload completion event notification or the VOD console.

SubAppId Yes Integer

VOD application ID.

MPSProcessMediaParams No String

Optional parameter. This parameter is used for passing through to the media processing service (MPS) so that MPS video processing tasks can be triggered from the VOD side. For details on different types of video processing parameters, see Using MPS Media AI Capacity. You can create a custom template through the CreateMPSTemplate api.

AiAnalysisTask No MPSAiAnalysisTaskInput

Parameters for the video content analysis task. Valid when MPSProcessMediaParams is empty.

SmartSubtitlesTask No MPSSmartSubtitlesTaskInput

Parameters for the smart subtitling task. Valid when MPSProcessMediaParams is empty.

SmartEraseTask No MPSSmartEraseTaskInput

Intelligent erasure type task parameter. Valid when MPSProcessMediaParams is empty.

ExtInfo No String

Reserved field, used for special purposes.

3. Output Parameters

Parameter Name Type Description
TaskId String

Task ID.

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 Initiating an Intelligent Analysis Task with the MPSProcessMediaParams Parameter

Use the MPSProcessMediaParams parameter to initiate an intelligent analysis task.

Input Example

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

{
    "FileId": "966263619095884274",
    "SubAppId": 221157,
    "MPSProcessMediaParams": "{\"AiAnalysisTask\":{\"Definition\": 21,\"ExtendedParameter\":\"\"}}"
}

Output Example

{
    "Response": {
        "TaskId": "221157-ProcessMediaByMPS-c80d6b074ba566e4e4097bccc0044b9bt",
        "RequestId": "4cc2a86b-7463-4ac2-9a32-e64882716f9e"
    }
}

Example2 Initiating an Intelligent Analysis Task with Structured Parameters

Use structured parameters to initiate an intelligent analysis task.

Input Example

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

{
    "FileId": "966263619095884274",
    "SubAppId": 221157,
    "AiAnalysisTask": {
        "Definition": 21,
        "ExtendedParameter": ""
    }
}

Output Example

{
    "Response": {
        "TaskId": "221157-ProcessMediaByMPS-fd5bcd2cf2195fda7c7b571aa18cb68dt",
        "RequestId": "c8bbd537-0815-4123-b284-8c1ee856bbe8"
    }
}

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 Operation failed.
FailedOperation.InvalidVodUser The VOD service is not activated.
InternalError Internal error.
InvalidParameter Parameter error.
InvalidParameterValue.FileId FileId does not exist.
InvalidParameterValue.SessionContextTooLong SessionContext is too long.
InvalidParameterValue.SessionId Duplicate recognition code. Request deduplicated.
InvalidParameterValue.SessionIdTooLong SessionId is too long.
InvalidParameterValue.SubAppId Parameter value error: app ID.
UnauthorizedOperation Unauthorized operation.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback