Video icon removal
ApsaraVideo VOD workflows integrate with the video icon removal feature of Intelligent Media Service (IMS) to automatically detect and erase embedded icons, such as TV station and platform logos, and fill the surrounding background. This restores the video to a cleaner state and simplifies post-production.
This feature is available in the following regions:
-
China (Shanghai), China (Beijing), and Asia Pacific SE 1 (Singapore).
Prerequisites
-
To use the video icon removal node in a workflow, you must activate ApsaraVideo VOD and Intelligent Media Service (IMS), and subscribe to the Standard Edition. For more information, see Subscription billing.
Billing
The video icon removal feature in ApsaraVideo VOD workflows is provided by Intelligent Media Service (IMS). You must purchase the IMS subscription service to use this feature. For billing details, see icon erasing.
Usage
Step 1: Configure a workflow in the console
You can create workflows only in the ApsaraVideo VOD console.
-
Log on to the ApsaraVideo VOD console.
-
In the left-side navigation pane, choose Configuration Management > Media Processing > Workflows to go to the workflow management page.
-
Click Add Workflow Template and enter a name for the workflow.
-
In the workflow designer, click the + button to the right of the start node to add a video icon removal node.
-
In the panel on the right, configure the following parameters:
-
Node Name: Enter a custom name for the video icon removal node.
-
Logo Model: You can select TV, Internet, or Select All (to remove both TV and Internet type icons).
-
TV (general TV station icons): Detects icons from television channels, such as CCTV and local station logos.
-
Internet (general online media icons): Detects icons from online media sources, such as short-form videos, YouTube, and ad watermarks.
-
-
Example Media: A sample video for adjusting settings. This video is not processed by the workflow. Supported formats: MP4, WebM, MOV, and M3U8.
-
Detection Range: Defaults to the bottom 1/4 of the video. You can also manually draw a selection box.
-
-
After you complete the configuration, click OK to submit the workflow template and generate a workflow ID. Record this ID to specify the workflow during upload. Once submitted, the system creates the workflow template and sets its status to Enabled in the workflow list. You can click View to check the configuration or click Disable to deactivate the template.
Step 2: Trigger the workflow
Use the workflow you created to process videos. You can trigger the task during or after video upload.
From the console
During upload
-
Log on to the ApsaraVideo VOD console.
-
In the left-side navigation pane, choose Media Files > Audio/Video, then click Upload Media.
-
On the Upload Media page, select an upload method and storage location. Then, select Use Workflow and specify the workflow you created. In the dialog box that appears, select Local Upload, click Add Audio/Video to select local video files, select the video icon removal workflow in the Transcoding Template Group/Workflow column, then click Start Upload.
After upload
-
Log on to the ApsaraVideo VOD console.
-
In the left-side navigation pane, choose Media Files > Audio/Video to go to the audio/video list page.
-
In the Actions column for the target media, click Processing. In the dialog that appears, select Process with Workflow and choose the workflow you created.
Step 3: Check the result
ApsaraVideo VOD console
-
Log on to the ApsaraVideo VOD console.
-
In the left-side navigation pane, choose Media Files > Audio/Video to go to the audio/video list page.
-
On the audio/video list page, find the video generated by the icon removal workflow. You can filter by the source video name, creation time, or other criteria.
Intelligent Media Service console
-
Log on to the Intelligent Media Service (IMS) console.
-
In the left-side navigation pane, choose VOD Media Processing > Task Management to go to the task management page, then click the Intelligent Erase tab.
-
On the Intelligent Erase tab, find the icon removal task generated by the workflow. You can filter by name, creation time, or other criteria.
-
When the task status is Success, click View to see the following details:
-
Basic parameters and configuration of the icon removal task.
-
Input information for the icon removal task.
-
Output information and files from the icon removal task.
-
Workflow task callback
-
Configure an HTTP or Message Service (MNS) callback.
-
When the workflow task is complete, the system triggers a Workflow Task Completed event and pushes the results through the configured HTTP or Message Service (MNS) callback. Key fields include:
-
Status: The overall status of the task (SucceedorFailed). -
ActivityResults: A JSON string that contains the execution details of each node, such asVideoDelogo. TheResultfield contains key information from the icon removal output, such asMediaIdandJobId. -
TaskInput: The original input media information, such as theMediaID and filename.
-
-
Parse the
ActivityResultsin the callback message body to extract theMediaIdof the processed video for subsequent playback or distribution.
API
You can call the GetMediaProducingJob operation to query the task result. Pass the JobId of the icon removal task (obtained from ActivityResults.Result.JobId in the workflow task) to get the status and output of the icon removal job.
-
JobId: The job ID returned when the workflow internally calls the SubmitMediaProducingJob operation to submit the icon removal task.
Sample response:
{
"RequestId": "****20b48fb04483915d4f2cd8ac****",
"JobId": "****20b48fb04483915d4f2cd8ac****",
"FunctionName": "VideoDelogo",
"Input": {
"Type": "OSS",
"Media": "oss://example-bucket/input.mp4"
},
"Output": {
"Type": "OSS",
"Media": "oss://example-bucket/output.mp4"
},
"Status": "Success",
"CreateTime": "2024-09-24T06:17:09Z",
"FinishTime": "2024-09-24T06:17:31Z",
"OutputUrls": [
"http://example-bucket.oss-cn-shanghai.aliyuncs.com/output.mp4"
]
}
-
A
StatusofSuccessindicates that video icon removal is complete. -
You can access the processed video from the
OutputUrls.
By using an API
During upload
-
The CreateUploadVideo operation only obtains upload URLs and credentials, and creates basic media asset information. It does not upload files. You must implement the upload logic yourself. For a complete example of uploading files by using an API, see Upload media files by using ApsaraVideo VOD APIs.
-
When you call the CreateUploadVideo or UploadMediaByURL operation to upload an audio or video file, set the
WorkflowIdparameter to the ID of the workflow that you created. After the upload is complete, ApsaraVideo VOD automatically processes the audio/video according to the specified workflow.
After upload
Call the SubmitWorkflowJob operation and set the WorkflowId parameter to the ID of the workflow that you created to immediately process the media with that workflow.