tencent cloud

Video on Demand

Smart Erase Integration

Download
フォーカスモード
フォントサイズ
最終更新日: 2026-07-14 16:06:18

Smart Erase Overview

Smart Erase can blur, mosaic, or invisibly remove elements such as logos, subtitles, faces, and license plates from video frames, making the content suitable for distribution and sharing. This feature is widely used in short-drama platforms, short-video platforms, cross-border e-commerce, and self-media studios.

Prerequisites

Before integration, you need to activate the MPS (Media Processing Service) on the Media AI Template page. This can be found under Media Processing > Media Processing Template within the VOD (Video on Demand) Console.
Note:
Smart Erase is powered by the Media Processing Service (MPS). Before using this feature, you need to activate both VOD and MPS services.
Feature usage and billing information will be displayed on the Media Processing Service (MPS) platform. For pricing details, please refer to MPS Media AI pay-as-you-go billing.


Usage Methods

Method 1: Using the Console

Initiate a Task

Navigate to the VOD console at Video/Audio Management > Audio/Video Management to start a task.
1. Select the video you want to process, and click Media Processing.

2. Set the processing type to Media AI > Intelligent Analysis, and select Preset Template 25. Enable Extended Parameters under Advanced Settings and pass the required parameters as described in the documentation.
Note:
Preset Template 25 defaults to Smart Erase - Basic Watermark Removal. To start a video translation task, you must pass Extended Parameters; otherwise, only watermark removal will be performed.
The console auto-escapes input. Pass raw JSON data directly — do not pass pre-escaped strings, or the task will fail.


Checking Task Results

1. In the VOD console, go to the Task Center page, locate the task, and click Details to view the results.

2. The output will be stored as a new video in VOD and can be viewed in the console.

Method 2: API Integration

Starting a Task

Call ProcessMediaByMPS. Enter the media asset ID to be processed in FileId, and enter the sub-application ID in SubAppId. In the AiAnalysisTask task, set Definition to 25 (preset template). You can configure ExtendedParameter with additional extended parameters as needed to enable specific capabilities.
The following is an example of the Smart Erase task parameter for a Highlights task:
{"Definition":25,"ExtendedParameter":"{\\\\\\"delogo\\\\\\":{\\\\\\"cluster_id\\\\\\":\\\\\\"gpu_zhiyan\\\\\\",\\\\\\"CustomerAppId\\\\\\":\\\\\\"subtitle_erase_fast\\\\\\"}}"}


Querying Task Results

You can query your tasks using the DescribeTaskDetail or DescribeTasks APIs.The generated results can be found within the output information of the API response.


ExtendedParameter Examples by Scenario

The most commonly used atomic capability of Smart Erase is subtitle removal. To support short-drama global expansion, video translation, and related use cases, the following operations can be performed simultaneously with subtitle removal:
OCR subtitle extraction and translation: Extract subtitles, translate them, and generate subtitle files in the target language.
Audio synthesis: Take the clean video (after subtitle removal) and the calibrated translated subtitle file to produce a new video with AI-dubbed audio in the target language.
Subtitle burning: Burn the translated subtitles into the video frames.
Additionally, Smart Erase supports:
Logo removal: Remove logos from video content.
Privacy protection: Blur or mosaic faces and license plates.

1. Subtitle Removal

Billing

Subtitle removal includes automatic erasure, region-specified erasure, and missed-area re-processing. Both "Area Edition" and "Standard Edition" models are billed under "Subtitle Removal." For pricing, refer to the Smart Erase billing guide.

1.1 Auto Erase

Auto-erase uses an AI model to automatically detect and invisibly remove subtitle text from video frames, producing a new video. Visual interference or unusual subtitle styles may cause missed or incorrect erasure — use region-specified erasure for such cases.
Basic ExtendedParameter for auto subtitle erase:
{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "subtitle_erase_fast"
}
}
Specifying Subtitle Regions to Protect Non-target Areas
By default, subtitle erasure detects text regions in the lower-middle area of the frame.
If your video has other text in that area that should not be removed, use the als_filter parameter to specify the approximate subtitle location and reduce incorrect erasure.

Left: Original video. Center: Removal effect using als_filter to specify the subtitle position. Right: Removal effect without specifying als_filter.
{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "subtitle_erase_fast",
"als_filter": {
"active_areas": [
{
"lt_x": 0.097,
"lt_y": 0.626,
"rb_x": 0.928,
"rb_y": 0.705
}
]
}
}
}
To erase full-screen text, set the als_filter region to the full frame:
{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "subtitle_erase_fast",
"als_filter": {
"active_areas": [
{
"lt_x": 0,
"lt_y": 0,
"rb_x": 0.9999,
"rb_y": 0.9999
}
]
}
}
}

1.2 Region-specified Erase

Auto-erase typically detects subtitle positions accurately, but certain edge cases — such as low contrast between subtitles and background, or fancy/gradient subtitle styles — may cause missed erasure.

Left: The subtitle in the red box has too low background contrast. Right: The subtitle style is cursive with a gradient special effect.
If your subtitle positions are relatively fixed, use custom_objs to specify the exact region for more reliable results.
Note:
Once custom_objs is specified, the system will only erase the defined region. It will not auto-detect or erase text elsewhere. Make sure to include the complete target region.

Left: Original video. Center: The green box indicates the erasure area specified by custom_objs. Right: Erasure effect.
{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "subtitle_erase_fast",
"custom_objs": {
"type": 0,
"time_objs": [
{
"objs": [
{
"type": 2,
"score": 100,
"rect": {
"lt_x": 53,
"lt_y": 228,
"rb_x": 137,
"rb_y": 644
}
}
]
}
]
}
}
}

1.3 Special Subtitle Styles

Two model versions are available for subtitle removal:
Standard Edition (recommended): Best for videos with standard subtitle styling. Offers better invisibility and detail preservation.
Set CustomerAppId to subtitle_erase_fast.

Left: Original video. Center: Result using the regional version. Right: Result using the standard version.
Area Edition: Designed for unusual subtitle styles (background shadows, fancy fonts, animations). Erases a larger area but may have slightly less seamless results compared to the Standard Edition.
Set CustomerAppId to subtitle_erase_area.

Left: Original video. Center: The green box indicates the erasure area specified by custom_objs. Right: Erasure effect.
{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "subtitle_erase_area",
"custom_objs": {
"type": 0,
"time_objs": [
{
"objs": [
{
"type": 2,
"score": 100,
"rect": {
"lt_x": 879,
"lt_y": 169,
"rb_x": 997,
"rb_y": 761
}
}
]
}
]
}
}
}

1.4 Re-processing Missed Regions

If auto-erase leaves residual subtitle regions, switch to the Area Edition model (subtitle_erase_area) and use custom_objs to specify the missed region for re-processing. You can also define the target time range using the begin_ms and end_ms fields.
Note:
The output video requires full encoding/decoding, so billing is based on the total video duration, not just the begin_ms to end_ms range.
{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "subtitle_erase_area",
"custom_objs": {
"type": 0,
"time_objs": [
{
"begin_ms": 3000,
"end_ms": 5000,
"objs": [
{
"type": 2,
"score": 100,
"rect": {
"lt_x": 0.0,
"lt_y": 10,
"rb_x": 10,
"rb_y": 20
}
}
]
}
]
}
}
}

2. Subtitle-only Translation

Input a video with subtitles in the source language and receive a video with subtitles in the target language (no AI voiceover).
Left: Original Chinese short video; Right: The processed output video features English subtitles.
Left: Original Chinese short video; Right: The processed output video features English subtitles.


Billing

Charged for "Subtitle Removal" + "OCR subtitle extraction, translation, and burning", refer to the Smart Erase billing guide.
{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "subtitle_erase_and_translate",
"subtitle_param": {
"translate_dst_language": "en"
}
}
}

3. Logo Removal

Logo removal erases logos, icons, user avatars, and other graphical elements from video frames. Two modes are available:
Basic Edition: Basic blur effect, cost-effective, suitable for animation or videos with clean backgrounds. Billed as "Smart Erase Basic (Logo Removal - Basic)."
Advanced Edition: Better erasure quality, suitable for short-dramas and realistic-style videos. Billed as "Logo Removal - Advanced."
Left: Original video, with the red box indicating the logo position. Center: Result using the basic version. Right: Result using the advanced version.
Left: Original video, with the red box indicating the logo position. Center: Result using the basic version. Right: Result using the advanced version.


3.1 Advanced Edition

Compared with the basic logo removal version, the advanced version delivers better erasure effects. Passing ai_delogo_v1 for the CustomerAppId indicates the use of the advanced logo removal version. Two processing methods are supported:
Automatic Erasure:The AI model automatically identifies logos in the full-screen frame of the video and erases them, supporting both static logos and logos with changing positions.
Currently, we support over a dozen common Internet logos. For logos outside the supported scope, we provide customized training services, which will incur separate model training fees.
Frame interferences may adversely affect automatic erasure, resulting in partial missed or incorrect erasures. Such issues can be fixed through secondary processing via region-specified erasure.
Region-Specified Erasure:For static logos with fixed positions, region-specified erasure is recommended to reduce instances of missed or incorrect erasures.
Red box: Dynamically moving logo; automatic removal is recommended. Green box: Static logo in a fixed position; removal can be achieved by specifying the area.
Red box: Dynamically moving logo; automatic removal is recommended. Green box: Static logo in a fixed position; removal can be achieved by specifying the area.

Billing Description
The advanced logo removal service is charged at the rate of Advanced Logo Removal. For pricing details, please refer to the Intelligent Erasure Billing Instructions.
3.1.1 Auto-erase
Left: Original video with a logo/icon in both the top-left and top-right corners. Right: Result using the advanced version of automatic logo removal.
Left: Original video with a logo/icon in both the top-left and top-right corners. Right: Result using the advanced version of automatic logo removal.

{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "ai_delogo_v1"
}
}
3.1.2 Auto-erase with Region Filter
Use als_filter to specify the approximate Logo location. The system will restrict auto-erasure to that region, protecting the rest of the frame.
Left: Original video with a logo/icon in both the top-left and top-right corners. Right: Result after removing only the icon in the top-right corner.
Left: Original video with a logo/icon in both the top-left and top-right corners. Right: Result after removing only the icon in the top-right corner.

{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "ai_delogo_v1",
"als_filter": {
"active_areas": [
{
"type": 1,
"lt_x": 527,
"lt_y": 13,
"rb_x": 701,
"rb_y": 78
}
]
}
}
}
3.1.3 Region-Specified Erasure
Automatic erasure only supports logos included in the MPS model library. Uncommon internet logos, which are generally not in the MPS model library, can be handled in one of the two following ways:
Dynamic logo position: Erasure requires model training, which incurs an additional model training fee.
Fixed logo position: The erasure area can be directly specified via custom_objs to remove the logo, with no additional model training fee required. An example is as follows:
Left image: Original video, with the red box marking the specified logo erasure area.Right image: Erasure result.
Left image: Original video, with the red box marking the specified logo erasure area.Right image: Erasure result.

{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "ai_delogo_v1",
"custom_objs": {
"type": 0,
"time_objs": [
{
"objs": [
{
"type": 1,
"value": "customobjs",
"score": 100,
"rect": {
"lt_x": 0.024,
"lt_y": 0.027,
"rb_x": 0.14,
"rb_y": 0.198
}
}
]
}
]
}
}
}

3.2 Basic Edition

The Basic Logo Removal edition features a blur-based erasure effect, and supports both automatic erasure and region-specified erasure.
Billing Description
Usage of Basic Logo Removal, including both automatic erasure and region-specified erasure, is charged at the Basic Intelligent Erasure Fee (Logo Removal - Basic Edition). For pricing details, please refer to the Intelligent Erasure Billing Description.
3.2.1 Automatic Erasure
If no value is provided for ExtendedParameter, it will be treated as the Basic Logo Removal (Automatic Erasure) scenario, which detects logos across the full frame.
3.2.2 Region-Specified Erasure
Similar to the Advanced Logo Removal edition, the automatic erasure feature of the Basic edition also only supports logos included in the MPS model library. Uncommon internet logos that are not in the MPS model library can be handled in one of the following two ways:
Dynamic logo position: Erasure requires model training, which incurs an additional model training fee.
Fixed logo position: The erasure area can be directly specified via custom_objs to remove the logo, with no additional model training fee required. An example is as follows:
{
"delogo": {
"custom_objs": {
"type": 0,
"time_objs": [
{
"objs": [
{
"type": 1,//watermark removal, type set to 1
"value": "customobjs",
"score": 100,
"rect": {
"lt_x": 0.024,
"lt_y": 0.027,
"rb_x": 0.14,
"rb_y": 0.198
}
}
]
}
]
}
}
}

4. Simultaneous Subtitle and Logo Removal

Billing Description

For simultaneous subtitle removal and logo removal, the fees for Logo Removal - Advanced Edition and Subtitle Removal will be charged separately. For pricing details, please refer to the Intelligent Erasure Billing Description.

Operation Guide

When a video contains both subtitles (text content) and logos (graphic content), you can set CustomerAppId to subtitle_logo_erase to perform subtitle and logo removal at the same time.
For common internet logos, you do not need to specify their positions as the system will erase them automatically. You only need to specify the subtitle area via als_filter.

{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "subtitle_logo_erase",
"als_filter": {
"active_areas": [
{
"type": 2,//Subtitle text removal, type set to 2
"lt_x": 0.106,
"lt_y": 0.733,
"rb_x": 0.901,
"rb_y": 0.824
},
{
"type": 2,//Subtitle text removal, type set to 2
"lt_x": 0.612,
"lt_y": 0.911,
"rb_x": 0.988,
"rb_y": 0.984
}
]
}
}
}
Uncommon internet logos, which are generally not included in the model library, can be processed in one of the two following ways:
Dynamic logo position: Erasure requires model training, which incurs an additional model training fee.
Fixed logo position: The erasure area can be directly specified via custom_objs to remove the logo, with no additional model training fee required. An example is as follows:
{
"delogo": {
"cluster_id": "gpu_zhiyan",
"CustomerAppId": "subtitle_logo_erase",
"custom_objs": {
"type": 0,
"time_objs": [
{
"objs": [
{
"type": 1,//watermark removal, type set to 1
"value": "customobjs",
"score": 100,
"rect": {
"lt_x": 0.024,
"lt_y": 0.027,
"rb_x": 0.14,
"rb_y": 0.198
}
}
]
}
]
}
}
}

5. Privacy Protection (Faces & License Plates)

Billing Description

The privacy protection processing function is used, and fees for "privacy protection processing (faces, license plates)" shall be charged. For pricing, please refer to the Intelligent Erasure billing instructions.

5.1 Face Processing

Perform blurring or mosaic processing and generate a new video after human faces are recognized in the video image.
Blur Effect
Left image: Original video frame; Right image: Face-blurred result
Left image: Original video frame; Right image: Face-blurred result

{
"delogo": {
"CustomerAppId": "facial_blur"
}
}
Mosaic Effect
{
"delogo": {
"CustomerAppId": "facial_mosaic"
}
}

5.2 Simultaneous Processing of Faces and License Plates

After recognizing the content in the video frame, the system applies blur or mosaic processing to both detected faces and license plate information simultaneously, and generates a new processed video.
{
"delogo": {
"CustomerAppId": "facial_and_numberplate_mosaic_v2"
}
}

Appendix: ExtendedParameter Field Reference

All supported fields and descriptions for ExtendedParameter:
"delogo":{
"CustomerAppId": "subtitle_extract",
// string; Preset scenario parameter. Different scenarios use different subsets of these parameters. Modifications generally require internal confirmation.
"cluster_id": "",
// string; Reserved field for cluster scheduling strategy. Specific tasks need to run on specific clusters. Do not modify arbitrarily.
"output_patten": "{task_type}-{session_id}",
// string; Output file name. No special characters, length < 200. Supported placeholders: task_type, session_id.
"als_filter": {
// json object; Target analysis filter
"min_ocr_height": 10,
// float, >= 0; Minimum text height for OCR. Values <= 1 represent ratio of video height, > 1 represent pixels.
"max_ocr_height": 0.06,
// float, >= 0; Maximum text height for OCR.
"active_areas": [
// json array; Region filter. Only recognition results whose center falls within this area are used.
{
"lt_x": 0.1,
// float, >= 0; Top-left x coordinate of the region. Values <= 1 represent ratio, > 1 represent pixels.
"lt_y": 0.6,
// float, >= 0; Top-left y coordinate.
"rb_x": 0.9,
// float, >= 0; Bottom-right x coordinate.
"rb_y": 0.95
// float, >= 0; Bottom-right y coordinate.
}
]
},
"custom_objs": {
// json object; Custom region
"type": 0,
// int; Set to 0. Specifies the type.
"time_objs": [
// json array; Time range information
{
"begin_ms": 0,
// int; Start time in ms. Omit to use video start.
"end_ms": 100,
// int; End time in ms. Omit to use video end.
"objs": [
// json array; Region information
{
"rect": {
// json object; Target rectangle
"lt_x": 55,
// float, >= 0; Top-left x. < 1 = ratio, >= 1 = pixels.
"lt_y": 143,
// float, >= 0; Top-left y.
"rb_x": 327,
// float, >= 0; Bottom-right x.
"rb_y": 192
// float, >= 0; Bottom-right y.
},
"score": 100,
// int; Fill in 100. Reference score for the target.
"type": 2,
// int; Target type. 1 = logo/graphic, 2 = text.
"value": "LUSN"
// string; Target value, e.g., the recognized text content.
}
]
}
]
}
"subtitle_param" : {
// json object; Subtitle-related parameters
"margin_bottom": 0.2,
// float, >= 0; Distance from subtitle to bottom edge for rendering. <= 1 = ratio of video height, > 1 = pixels.
"font_size": 50,
// float, >= 0; Subtitle font size for rendering. <= 1 = ratio of video height, > 1 = pixels.
"font_type": "simkai",
// string; Subtitle font: simkai (KaiTi), hei (SimHei), song (SimSun).
"translate_dst_language": "en"
// string; Target language for translation. Empty = output original subtitles only.
// Common values: en (English), zh (Chinese), ja (Japanese), ko (Korean), de (German),
// pt (Portuguese), id (Indonesian), th (Thai), ms (Malay).
// We support hundreds of languages. Contact us for the full list.
}
}

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック