Smart Erase

Updated at:

The Smart Erase service includes icon and caption removal features. This topic describes the details and usage of each feature.

Service regions

Smart Erase type descriptions

Smart Erase removes and fills areas in a video that contain elements such as captions and icons. The Smart Erase feature of video-on-demand (VOD) media processing supports the following two removal types:

Smart Erase Type

Description

Caption Removal

Intelligently detects captions in a video, removes them, and fills the background. This restores the original video without captions to assist with post-production and caption regeneration. Caption removal is available in Normal (default) and Premium versions. The Premium version uses a superior algorithm for a better removal effect. However, it processes more slowly and costs more than the Normal (default) version. Choose the version that best suits your business scenario.

Icon Removal

Intelligently detects icons in a video, such as TV station logos and internet platform logos, using a built-in icon library. It removes the icons and fills the background. This restores the original video without icons to assist with post-production and reuse.

Note

The Smart Erase feature supports only MP4 videos.

Create a Smart Erase template

Create using the console

  1. Log on to the Intelligent Media Services (IMS) console.

  2. In the upper-left corner of the top navigation bar, select a region.

  3. In the navigation pane on the left, choose VOD Media Processing > Template Management.

  4. On the Smart Erase tab, create a Smart Erase template.

    Parameter

    Description

    Template Name

    Enter a name for the Smart Erase template.

    Task Type

    Select Icon Removal or Caption Removal.

    Icon Removal Type

    When **Task Type** is set to Icon Removal, select the type of icon to remove. You can remove Internet platform logos and TV station logos.

    Removal Area

    Auto-detect

    Automatically detects and removes standard captions in the bottom 1/4 of the video.

    Custom

    • Removal Position: Set the position of the rectangular box to specify the caption removal area. You can specify up to two removal areas.

    • Preview Frame Size: Enter the dimensions for the preview frame. The minimum width and height are 100 px. If you configure multiple removal areas (LimitRegion) that overlap, only the overlapping (intersecting) part is removed, and non-overlapping parts are not removed. Plan the coordinates of your removal areas based on the actual position of the captions to avoid incomplete removal caused by unintended intersection behavior.

Create using OpenAPI

Call the CreateCustomTemplate operation and set the Type parameter to create a custom template.

Create a Smart Erase task

Create a task in the console

  1. Log on to the Intelligent Media Services (IMS) console.

  2. In the upper-left corner of the top navigation bar, select a region.

  3. In the navigation pane on the left, choose VOD Media Processing > Task Management.

  4. On the Smart Erase tab, create a Smart Erase task.

    Parameter

    Description

    Task Name

    Enter a name for the Smart Erase task.

    File Source

    Select media assets from Object Storage Service (OSS) or IMS Media Asset Management.

    OSS Path

    If **File Source** is set to Object Storage Service (OSS), select the OSS path of the media asset.

    Storage Address

    If **File Source** is set to Media Asset Management, select a storage address in the IMS system, and then click Add File to add media assets from that address.

    Select Template

    Select a Smart Erase template.

    Output Location

    • Original Storage Location: If the file source is Media Asset Management, the processed file is saved to the original storage location by default.

    • Custom: Customize the output location.

    Output Address

    If **Output Location** is set to Custom, select an output address.

    Output File Name

    Enter a name for the file after Smart Erase is performed.

Create a task using an API

Call the SubmitIProductionJob operation to submit a Smart Erase task.

Note
  • **Premium (Recommended)**: Produces a more natural-looking video after removal. It effectively resolves issues such as mosaic and shadow artifacts, achieving seamless removal. To enable the Premium version of caption removal, set the ModelId parameter to algo-video-detext-new. For more information, see ModelId parameter description.

  • **Normal**: May leave residual artifacts such as mosaic shadows after removal. The restoration quality is average. For the Normal (default) version, leave the ModelId parameter unset or set it to default.

Query Smart Erase task details

Query details using a callback

You can query task details by receiving the callback for AI Production Completed, which is the callback related to the completion of a Smart Erase task. For more information, see Callback event overview.

Query details using an API

Call the QueryIProductionJob operation to query the details of a Smart Erase task.

Query Smart Erase task usage

  1. Log on to the Intelligent Media Services (IMS) console.

  2. In the navigation pane on the left, choose Data Center > Usage Query.

  3. On the VOD Task Usage tab, in the Video AI area, you can query or export the detailed usage duration for tasks.

    Note

    To ensure data security, the download link for the exported file is valid for 30 minutes. If it expires, refresh the page.

FAQ

Why is the caption not removed even though the Smart Erase job succeeded?

Smart Erase does not automatically detect the position of captions in the video. It only removes the default removal area or the custom area that you specify. If the captions are not located in the default area, or if the coordinates you provide are inaccurate, the removal will have no effect. Check and correct the normalized coordinates in the LimitRegion parameter to ensure that the removal area covers the actual position of the captions.

Can Smart Erase fix garbled text on product packaging or logos in a video?

No. Smart Erase cannot directly fix garbled text in a video. You can use icon removal (VideoDelogo) instead: call the SubmitIProductionJob operation, set the FunctionName parameter to VideoDelogo, and use the Boxes parameter to specify the normalized coordinates of the garbled area to remove and fill it. This operation only removes the content and restores the background. It cannot recover the original text. If you need a perfect fix, we recommend reshooting the footage.

What are the concurrency limits and processing time for Smart Erase jobs?

Intelligent Media Services (IMS) interfaces are subject only to a QPS limit. There is no cap on the number of concurrent background jobs. Longer processing time under higher submission concurrency is expected queuing behavior, not an error. If a job status looks abnormal or takes too long, first check whether your job-status retrieval logic is correct. If you have high-concurrency business requirements, you can evaluate adjusting your regional resource quota.

Why is the end of my video not processed when I submit a Smart Erase job by calling an API operation?

If the end time of the Time parameter is earlier than the actual duration of the video, the frames after that end time are not erased. The end of the video then looks unprocessed and the erasure is incomplete. For example, a video is 17.467 seconds long, but you set Time to [0, 17] when you call the SubmitIProductionJob operation. In this case, the segment after the 17th second is not processed. Use either of the following methods to make the Time parameter cover the full duration of the video:

  • Set the end time of Time to a value that is greater than or equal to the actual duration of the video. For the preceding example, set the end time to 18.

  • Do not specify the Time parameter. The system then processes the full duration of the video by default.

What is the difference between the video erasure features of Intelligent Media Services (IMS) and Visual Intelligence API (VIAPI)?

IMS and VIAPI are two independent products. Their video erasure features differ in the following ways:

  • Feature ownership and algorithm models: In IMS, Caption Removal and Icon Removal belong to the intelligent production module, whereas VIAPI provides video erasure as a separate product. The two services use different algorithm models.

  • Billing method: IMS bills you by the duration of the processed video. For unit prices, see the Caption Removal, Caption Removal - Premium and Icon Removal billing items listed in the "Billing" section of this topic. VIAPI uses a different billing method, and the actual fees are subject to the bill that each product console generates.

Billing

API reference