All Products
Search
Document Center

ApsaraVideo Media Processing:Media fingerprinting

Last Updated:Apr 11, 2024

A media fingerprint is a binary string that uniquely identifies a video. You can use the media fingerprinting feature to compare image or audio information from different videos. This feature applies to scenarios such as plagiarism identification, duplication identification, quick review, ad revenue sharing, and video source tracing.

Overview

Scenarios

  • Plagiarism identification: identifies whether a video uses original content or plagiarizes other creators. This provides technical support for copyright protection and helps build a healthy video ecosystem in which the rights of video producers and short video platforms are protected.

  • Duplication identification: creates a media fingerprint library to compare video fingerprints with those in the library. This helps identify duplicate videos and duplicate clips. This also prevents excessive duplicate or similar videos from being pushed to users and affecting user experience in content delivery or personalized recommendation scenarios.

  • Quick review: compares video fingerprints with those in the blacklist to determine whether the video contains prohibited content. You can create a custom blacklist or modify the existing blacklist. Compared with traditional video moderation methods, this method provides higher efficiency, higher accuracy, and lower costs in processing large numbers of videos.

  • Ad revenue sharing: uses the media fingerprinting technology to monitor and identify specific ads from the ad library. This facilitates ad revenue sharing in real time and provides an easier method to specify the time and frequency to deliver ads. This way, the benefits of ad producers and advertising platforms are protected.

    Note

    The media fingerprinting feature of ApsaraVideo Media Processing (MPS) supports only the identification of ads that are uploaded to the media fingerprint library. To identify specific ads, upload the ads to the media fingerprint library first.

Feature description

For more information, see the "Media fingerprinting" section of the Functions and features topic.

Limits

  • The media fingerprinting feature is supported in the China (Beijing), China (Hangzhou), China (Shanghai), and Singapore regions.

  • For more information about the concurrency limits on MPS queues, see the "Limits" section of the Overview topic.

Prerequisites

The following configurations are performed before you start a media fingerprinting job:

  • Create an MPS queue for media fingerprinting. For more information, see Create an MPS queue. If no MPS queue for media fingerprinting exists in the MPS queue list, create an MPS queue for media fingerprinting first.

  • Create a media fingerprint library based on your business requirements by calling the CreateFpShotDB operation.

  • Upload the video to be processed to OSS.

    • If you want to create a job, directly upload the video to OSS. For more information, see Upload a video.

    • If you want to create a workflow and automatically trigger the workflow, you must add media buckets and create a workflow before you upload the video. After you specify the input and output media buckets and upload a media file to the input media bucket, MPS receives a message about the upload and triggers the associated workflow. After the workflow is complete, the processed media file is uploaded to the output media bucket. For more information, see Add media buckets.

  • Optional. Enable the notification feature. If you want MPS to send notifications on jobs and workflows to MNS topics or queues, configure an MNS queue or topic as required. For more information, see Enable the notification feature for MPS jobs or workflows.

Create a media fingerprinting job in the MPS console

Note

You cannot specify a media fingerprint library when you create a media fingerprinting job in the MPS console. By default, the media fingerprint library that is most recently created is used.

Create a media fingerprinting job

  1. Log on to the MPS console.

  2. In the top navigation bar, select a region from the drop-down list.地域

  3. In the left-side navigation pane, choose Tasks > Job Management.

  4. On the Tasks page, click the Video DNA tab. On the Video DNA tab, click Create Task.

  5. On the page that appears, configure the parameters. The following table describes the parameters.

Parameter

Description

Input File URL

The path of the input file that is stored in an Object Storage Service (OSS) bucket. Click Select next to the Input File URL field. In the Select File dialog box, select an OSS bucket from the Bucket drop-down list. Folders of the OSS bucket that you select are automatically displayed in the Path section. Select a file from a folder as the input file.

Video DNA Pipeline

The MPS queue for media fingerprinting. Select an MPS queue from the Video DNA Pipeline drop-down list.

Note

If no MPS queue name is displayed in the Video DNA Pipeline drop-down list, create an MPS queue for media fingerprinting. For more information, see Create an MPS queue.

Inbound Rule for DNA Library

The rule for adding fingerprints to the media fingerprint library. Default value: Save Non-duplicated Content Only.

  1. Click Submit. The media fingerprinting job is created and submitted.

After a media fingerprinting job is submitted, you can view the processing result and details on the Video DNA tab of the Tasks page.image.png

Create a media fingerprinting workflow

  1. Log on to the MPS console.

  2. In the top navigation bar, select a region from the drop-down list.地域

  3. In the left-side navigation pane, choose Workflow > Workflow Orchestration.

  4. On the Workflow Orchestration page, click Create Workflow.

  5. On the page that appears, configure the parameters. The following table describes the parameters.

    Parameter

    Description

    Workflow Name

    The name of the workflow.

    Configuration Plan

    The type of the workflow. Select Custom from the drop-down list.

  6. Configure the Input node of the workflow.

    1. Click the Pen icon next to the Input node. The Input dialog box appears.输入

    2. In the Input dialog box, configure the parameters that are described in the following table.

      Parameter

      Description

      Input Path

      The path of the input file that is stored in an OSS bucket. Click Select next to the Input Path field. In the Select Input Path dialog box, select an OSS bucket from the Bucket drop-down list. Folders in the OSS bucket that you select are automatically displayed in the Path section. Select a folder as the input path.

      Note

      If no bucket name is displayed in the Bucket drop-down list, add media buckets to the specified region. For more information, see Add media buckets.

      Encoding Pipeline

      The MPS queue for transcoding and snapshot jobs.

      Note
      • This MPS queue is used for transcoding and snapshot jobs. You need to select an MPS queue for media fingerprinting when you configure the Video DNA node.

      • If no MPS queue name is displayed in the drop-down list, enable an MPS queue for transcoding and snapshot jobs. For more information, see Create an MPS queue.

      Notifications

      Optional. Specifies whether to send notifications about the workflow. If you turn on Notifications, configure the Message Type parameter and select an Message Service (MNS) queue or topic from the Queue Name or Topic Name drop-down list.

      Note

      If no MNS queue name or topic name is displayed in the drop-down list, enable the notification feature for the workflow based on the MNS queue or topic. For more information, see Enable the notification feature for MPS jobs or workflows.

    3. Click OK. The Input node is configured.

  7. Configure the Video DNA node of the workflow.

    1. Click the Add icon next to the Input node and select Video DNA.

    2. Click the Pen icon next to the Video DNA node.设置

    3. In the Video DNA dialog box, specify the parameters described in the following table.

      Parameter

      Description

      Video DNA Pipeline

      The MPS queue for media fingerprinting.

      Note

      If no MPS queue name is displayed in the Video DNA Pipeline drop-down list, enable an MPS queue for media fingerprinting. For more information, see Create an MPS queue.

      Inbound Rule

      • Save Non-duplicated Content Only: If you select Save Non-duplicated Content Only, MPS adds only fingerprints of non-duplicate videos to the media fingerprint library.

      • Do Not Save Any Media Content: If you select Do Not Save Any Media Content, MPS only compares videos and does not add fingerprints of videos to the library.

      Are you sure you want to terminate the workflow?

      Configure this parameter based on your business requirements.

    4. Click OK. The Video DNA node is configured.

  8. Configure the Publish node of the workflow.

    1. Click the Pen icon next to the Publish node.

    2. In the Publish dialog box, configure the Publish Type parameter described in the following table.

      Parameter

      Description

      Publish Type

      The way in which the output file is published. Select Auto. Valid values:

      • Manual: The output file is unpublished after the workflow is run. You need to manually publish the output file. For more information, see Manage media files.

      • Auto: The output file is automatically published after the workflow is run.

        Note
        • If the output file is published, the access permissions on all resources related to the output file, including playback files and captured snapshots, are the same as those on the OSS bucket in which the output file resides.

        • If the output file is unpublished, all these resources can be accessed only by the current user.

    3. Click OK. The Publish node is configured.

  9. Click Save. The workflow is created.

    If a file is uploaded to the path specified by the Input Path parameter after the workflow is created, the workflow is triggered.

To view the details of the media fingerprinting job of a workflow instance after the workflow is executed, go to the Workflow instance page first. Find the workflow instance that you want to manage, click Details in the Actions column to go to the details page. On the page that appears, move your pointer over the Video DNA node and copy the value of the Task Name parameter. In the left-side navigation pane, click Job Management. On the Video DNA tab, select Search by ID from the drop-down list. Enter the task name that you copy in the search field to search for the media fingerprinting job.

image.png

Create a media fingerprinting job by calling an API operation

image
  1. Create a media fingerprint library.

    Submit a job to create a media fingerprint library. After the job is complete, the information about the new library is returned. The new library enters the active state after it is created. When you submit the job, provide the UID of your Alibaba Cloud account. After the media fingerprint library is created, the UID of your Alibaba Cloud account is bound to the media fingerprint library. For more information, see CreateFpShotDB.

    Note

    A media fingerprint library is used to record and store the media fingerprints of videos. Take note of the following items when you create a media fingerprint library:

    • You must use the UID of your Alibaba Cloud account to create a media fingerprint library.

    • You can use the UID of your Alibaba Cloud account to create multiple media fingerprint libraries based on your business requirements.

  2. Submit a media fingerprinting job.

    • If the total length of your existing videos does not exceed 2,000 hours, you can call the SubmitFpShotJob operation to submit a media fingerprinting job. For more information, see SubmitFpShotJob. If you want to submit a media fingerprinting job to process more videos, submit a ticket to apply for the required resources.

    • If incremental videos are added in real time, you can also call the SubmitFpShotJob operation to compare the media fingerprints of incremental videos. You can compare media fingerprints of incremental and existing videos in one job. Alternatively, you can call the SubmitFpShotJob operation to submit a media fingerprinting job after existing videos are imported.

  3. Query the results of the media fingerprinting job.

    • To query the results of the media fingerprinting job, call the ReportFpShotJobResult operation. The results contain the following information:

      • Whether duplicate videos are found

      • The information about duplicate videos

      • The interval of the timeline of a video during which the video content shows a duplication from another video

      • The duplication degree between two videos, which is specified by a number from 0 to 1

    • After the media fingerprinting job is complete, a callback message is sent to the specified queue or topic if you have enabled the notification feature. For more information, see Receive notifications.