Digital watermarks

更新时间:
复制 MD 格式

Digital watermarking imperceptibly embeds information into audio or video files without affecting visual quality or integrity. It supports copyright protection, leak tracing, and file verification. ApsaraVideo VOD provides two types of digital watermarks: copyright watermarks and tracing watermarks.

Use cases

Digital watermarks apply to the following scenarios.

Copyright watermark

  • Copyright protection: Embed copyright information into a video as a watermark. You can later extract this watermark to confirm copyright ownership.

    image image
  • Institution tracing: Trace copyright leaks during distribution to identify the responsible institution. For example, a movie distributor sends copies of a film to several institutions. If the film is leaked, the copyright holder can identify which institution was the source of the leak, stop further unauthorized distribution, and hold the responsible parties accountable.

    image image

Tracing watermark

  • User tracing: Trace copyright leaks back to a specific user during playback. Video leaks commonly occur when end users download or record content. Tracing watermarks allow you to identify the specific user responsible for the leak.

    image image

Features

  • Visually appealing: The watermark is invisible and does not affect the normal playback of the media.

  • Content security: The watermark is imperceptible, which makes it difficult to attack directly. The embedded information is specially encoded, which makes it hard to tamper with or forge.

  • Accurate extraction: The specially encoded watermark ensures accuracy during extraction. The extracted information is both unique and correct.

  • Robust: The watermark is strong and can withstand common piracy attacks. These attacks include video compression, rotation, resolution changes, frame rate changes, screen recording, cropping, and scaling.

  • Encrypted: The watermark information is specially encoded and encrypted. This makes it difficult to modify and ensures its accuracy upon extraction.

Billing

Digital watermarking in ApsaraVideo VOD is a paid service. You are charged for both generating and extracting digital watermarks. For more information, see Digital watermark billing.

Limitations

  • The digital watermark feature is available only in the China (Shanghai) and China (Beijing) regions.

  • Certain features of the tracing watermark, such as calling the Get Play Info API to generate an M3U8 video stream with a tracing watermark, are available only to whitelisted users. You can submit a ticket to apply for these features.

  • When you generate a video with a digital watermark, the following limitations apply:

    • Input

      • The video duration must be 6 minutes or longer.

      • The bitrate must be greater than 1000 Kbps.

      • The HLS format is not supported.

    • Output

      • Copyright watermarks support MP4, HLS, and FLV formats.

      • Tracing watermarks support only the HLS format.

  • When you extract a digital watermark, the following requirements apply to the input video:

    The digital watermark extraction algorithm provides different robustness levels based on video duration. Robustness determines the resistance to factors such as compression bitrate and external recording. Because video content such as motion speed and texture complexity affects watermark robustness, the requirements in the following table apply to videos with relatively static scenes, such as online courses. For high-motion videos such as action movies, the bitrate must be higher than the recommended values in the table.

    Video duration

    6 ≤ Duration < 10

    10 ≤ Duration < 20

    Duration ≥ 20

    Recommended video bitrate (Kbps)

    ≥ 2000

    ≥ 1000

    ≥ 500

    Extraction support for externally recorded videos (for example, from a phone or camera)

    The video is too short. We recommend that you do not use externally recorded videos for extraction.

    External recording can severely degrade watermarks. For extraction from an externally recorded video, we recommend a bitrate greater than 3000 Kbps.

Prerequisites

  • ApsaraVideo VOD is activated. For more information, see Activate ApsaraVideo VOD.

  • The RAM user or RAM role that you use has corresponding permissions to access ApsaraVideo VOD. We recommend that you use a RAM user or RAM role to perform operations to improve the security of your account and resources. For more information, see Create and grant permissions to a RAM user.

Use copyright watermarks

Note

Before you begin, make sure that you understand and meet the requirements in the Limitations section for generating and extracting copyright watermark videos. Otherwise, the operation may fail.

Step 1: Generate a copyright watermark video

  1. Create a transcoding template group with the copyright watermark feature enabled.

    A transcoding template group with the copyright watermark feature can be created only in the ApsaraVideo VOD console.

    Create copyright watermark template group

    1. Log on to the ApsaraVideo VOD console.

    2. In the left navigation pane, go to Configuration Management > Media Processing > Transcoding Template Groups, and click Create Transcoding Template Group to open the Add Transcoding Template Group page.

    3. Set Template Group Name.

    4. On the left, under Video Transcoding Templates, click Add Template to configure transcoding parameters and enable digital watermarking.

      • Encapsulation Format: Only HLS (.m3u8+ts), MP4 (.mp4), or FLV (.flv) are supported.

      • Resolution: You can only select Set by long and short sides or Set by width and height.

      • Digital watermark: Turn on the Digital watermark switch, and select the Copyright watermark type.

      • Watermark Text: Enter the custom watermark text. The text can contain up to 64 characters and supports only English letters, numbers, and Chinese characters. For example: Alibaba Cloud ApsaraVideo VOD copyright watermark.

      • Keep the default settings for other parameters or change them as needed. For more information about the parameters and configuration suggestions, see Transcoding templates.image

    5. Click Save.

      After the transcoding template group is created, you can view the group and its ID on the Transcoding Template Groups page.

  2. Transcode the video and add a copyright watermark.

    Use the transcoding template group that you created in the previous step to transcode the video and add a copyright watermark. For more information, see Submit transcoding jobs or Workflow-based transcoding.

Step 2: Simulate video theft

Common methods of video theft:

  • Direct distribution: Obtain the playback URL of the video with a copyright watermark and download the video to a local device.

  • Screen recording: Use a screen recording tool to record the video while it is playing.

  • External recording: Use a device such as a phone or camera to record the video while it is playing.

Simulate video theft

  1. On the Audio/Video list page in the media library of the ApsaraVideo VOD console, find the video that was transcoded with a copyright watermark in Step 1: Generate a copyright watermarked video.

  2. In the Actions column, click Manage for the target video.

  3. Click the Video URL tab.

  4. Simulate video theft by using one of the following methods.image

    • Direct distribution: For the copyright watermark video stream, click Copy. Paste the URL into a browser to download the video locally.

    • Screen recording: For the copyright watermark video stream, click Preview. While the video is playing, use a screen recording tool to record it.

    • External recording: For the copyright watermark video stream, click Preview. While the video is playing, use a device such as a phone or camera to record it.

Step 3: Extract the copyright watermark

  1. Upload the pirated video to ApsaraVideo VOD.

    Upload the pirated video that you downloaded or recorded in Step 2: Simulate video theft to ApsaraVideo VOD, and save the video ID.

    Note
    • Make sure that the pirated video and the original video from Step 1: Generate a copyright watermark video are uploaded to the same ApsaraVideo VOD region. Otherwise, the copyright watermark cannot be extracted.

    • You cannot upload local M3U8 files by using the ApsaraVideo VOD console. You must use the ApsaraVideo VOD API or an SDK. For more information, see Upload local M3U8 files.

    This section provides an example of uploading an MP4 video in the ApsaraVideo VOD console. For more information about upload methods, see Overview.

    Upload pirated video

    1. Log on to the ApsaraVideo VOD console.

    2. In the left navigation bar, go to Media Files > Audio/Video and click Upload Audio/Video to open the Upload Audio/Video page.

    3. Click Add Audio/Video and configure the upload parameters.

      We recommend that you select Do Not Transcode to save time. For more information about supported formats and parameters, see Upload files by using the ApsaraVideo VOD console.

      image

    4. Click Upload.

      After the video upload is complete, you can view the video ID and status of the uploaded video on the Audio/Video list page. A status of Normal indicates that the video was uploaded successfully and is ready for use. If a different status is displayed, see Status: Audio/Video Status for instructions on how to proceed.image

  2. Extract the copyright watermark from the pirated video.

    Important

    Digital watermark extraction tasks are billed based on the duration of the video being processed. To avoid extra costs, do not submit multiple extraction tasks for the same video.

    Extract using the console

    1. Log on to the ApsaraVideo VOD console.

    2. In the left navigation bar, select Tools > Digital Watermark Extraction Tool to go to the Digital Watermark page.

    3. Submit a copyright watermark extraction task.

      1. In the Digital Watermark Extraction Tool section, configure the parameters for the digital watermark extraction task.

        • Task Type: Select Submit Watermark Extraction Job.

        • Watermark Type: Select Copyright watermark.

        • Video ID: Enter the video ID of the infringing video that you uploaded in the previous step.

      2. Click Submit.

        After the task is submitted, you can click Query Result in the dialog box that appears to view the task processing status. Please wait for the task to be successfully processed, and then query the extracted copyright watermark information.

    4. Query the extracted copyright watermark information.

      Note

      The ApsaraVideo VOD console displays only the most recent extraction result for a video. To query all historical results for that video, call the GetDigitalWatermarkExtractResult operation.

      1. In the Digital Watermark Extraction Tool section, configure the query parameters for the digital watermark extraction results.

        • Task Type: Select Query Watermark Extraction Result.

        • Watermark Type: Select Copyright Watermark.

        • Video ID: Enter the video ID of the infringing video uploaded in the previous step.

      2. Click Submit.

    Extract using OpenAPI

    1. Submit a copyright watermark extraction task.

      Call the SubmitDigitalWatermarkExtractJob operation and set the following required parameters to submit a copyright watermark extraction task.

      • MediaId: Set this parameter to the video ID of the pirated video.

      • ExtractType: Set this parameter to CopyrightMark.

    2. Query the extracted copyright watermark information.

      Note

      After you submit the copyright watermark extraction task, wait about 10 minutes before you query the extracted information.

      Call the GetDigitalWatermarkExtractResult operation and set the following required parameters to query the extracted copyright watermark information.

      • MediaId: Set this parameter to the video ID of the pirated video.

      • ExtractType: Set this parameter to CopyrightMark.

      If the copyright watermark is extracted successfully, a response similar to the following example is returned:

      {
        "RequestId": "974756D4-5CF9-54DA-BF21-62E0E12E0B81",
        "AiExtractResultList": [
          {
            "Status": "Success",
            "ModifyTime": "2024-06-12T11:14:46Z",
            "WaterMarkText": "ApsaraVideo VOD copyright watermark",
            "CreateTime": "2024-06-12T11:14:25Z",
            "JobId": "90f6281bf3c1497eaee79c0842e5****"
          }
        ]
      }

      If the copyright watermark extraction fails, see Why did the extraction of a digital watermark from a pirated video fail? for troubleshooting.

Step 4: Compare watermark information

Compare the extracted watermark text with the watermark text configured in the transcoding template group in sub-step 1 of Step 1 to confirm the video's copyright ownership.

Use tracing watermarks

Note

Before you begin, make sure that you understand and meet the requirements in the Limitations section for generating and extracting tracing watermark videos. Otherwise, the operation may fail.

Step 1: Generate a tracing watermark video

  1. Create a transcoding template group with the tracing watermark feature enabled.

    A transcoding template group with the tracing watermark feature can be created only in the ApsaraVideo VOD console.

    Create tracing watermark template group

    1. Log on to the ApsaraVideo VOD console.

    2. In the left navigation bar, go to Configuration Management > Media Processing > Transcoding Template Groups, and click Create Transcoding Template Group to go to the Add Transcoding Template Group page.

    3. Set the Template Group Name.

    4. On the left, under Audio and Video Transcoding Templates, click Add Template, and configure the transcoding parameters and enable the digital watermark.

      • Encapsulation Format: You can only select HLS (.m3u8+ts).

      • Resolution: You can only select Set by long and short sides or Set by width and height.

      • Digital Watermark: Turn on the Digital Watermark switch and select the Tracing Watermark type.

      • Keep the default settings for other parameters or change them as needed. For more information about the parameters and configuration suggestions, see Transcoding templates.image

    5. Click Save.

      After the transcoding template group is created, you can view the group and its ID on the Transcoding Template Groups page.

  2. Transcode the video and add a tracing watermark.

    Use the transcoding template group that you created in the previous step to transcode the video and add a tracing watermark. This generates A/B streams for the tracing watermark. For more information, see Submit transcoding jobs.

  3. Call the GetPlayInfo operation to request video playback and generate an M3U8 video with a tracing watermark.

    When a user requests playback, a watermarked M3U8 video with a unique sequence is assembled based on the video ID of the A/B streams.

    Call the GetPlayInfo operation and set the following required parameters to generate an M3U8 video with a tracing watermark.

    • VideoId: Set this parameter to the ID of the video that was transcoded with a tracing watermark.

    • Definition: The video definition. This must be the same as the definition that you configured for transcoding. You can view the definition in the tracing watermark transcoding template group.

    • DigitalWatermarkType: Set this parameter to TraceMark.

    • Trace: The custom watermark text. Example: Tracing watermark-User B.

    • You can set the ResultType parameter to Single or leave it empty. You cannot set it to Multiple.

    The PlayURL returned by the operation is the playback URL of the video with a tracing watermark.

Step 2: Simulate video theft

Common methods of video theft:

  • Direct distribution: Obtain the playback URL of the video with a tracing watermark and download the video to a local device.

  • Screen recording: Use a screen recording tool to record the video while it is playing.

  • External recording: Use a device such as a phone or camera to record the video while it is playing.

Simulate video theft

  1. Obtain the playback URL of the video with a tracing watermark that was generated in Step 1: Generate a tracing watermark video. This is the PlayURL returned by the GetPlayInfo operation.

  2. Simulate video theft by using one of the following methods.

    • Direct distribution: Copy the video playback URL and paste it into a browser to download the video locally.

    • Screen recording: Enter the video playback URL into the online demo of ApsaraVideo Player (Aliplayer) and use a screen recording tool to record the video as it plays.

    • External device recording: Enter the video playback URL into the online demo of ApsaraVideo Player (Aliplayer) to play the video. While the video is playing, use a device such as a mobile phone or camera to record it.image

Step 3: Extract tracing watermark information from the pirated video

  1. Upload the pirated video to ApsaraVideo VOD.

    Upload the pirated video that you saved locally or generated by recording in Step 2: Simulate piracy of the tracing watermark video to ApsaraVideo VOD, and save the video ID.

    Note
    • Make sure the pirated video is uploaded to the same service region in ApsaraVideo VOD as the source tracing watermark video from Step 1: Generate a tracing watermark video. Otherwise, the tracing watermark information cannot be extracted.

    • Local M3U8 files cannot be uploaded from the ApsaraVideo VOD console. You can upload local M3U8 files by using the ApsaraVideo VOD API or SDKs. For more information, see Upload local M3U8 files.

    The following steps describe how to upload an M3U8 video from the ApsaraVideo VOD console. For more information about other upload methods, see Media upload.

    Upload the pirated video from the console

    1. Log on to the ApsaraVideo VOD console.

    2. In the navigation pane on the left, choose Media Files > Audio/Video. Click Upload Audio/Video.

    3. Click Add Audio/Video and configure the upload parameters.

    4. Select No Transcoding for the upload to save time. For more information about supported formats and parameter descriptions, see Upload files from the ApsaraVideo VOD console.

      image

    5. Click Upload.

      After the video is uploaded, you can view the video ID and status of the pirated video on the Audio/Video page. If the status is Normal, the video is uploaded and ready to use. If the status is different, see Status: Audio and video statuses for troubleshooting.image

  2. Extract the tracing watermark information from the pirated video.

    Important

    Digital watermark extraction tasks are billed based on the duration of the extracted video. Do not repeatedly submit tasks for the same video to avoid extra costs.

    Extract from the console

    1. Log on to the ApsaraVideo VOD console.

    2. In the navigation pane on the left, choose Tools > Digital Watermark Extraction Tool to go to the Digital Watermark page.

    3. Submit a tracing watermark extraction task.

      1. In the Digital Watermark Extraction Tool section, configure the parameters for the extraction task.

        • Task Type: Select Submit Watermark Extraction Task.

        • Watermark Type: Select Tracing Watermark.

        • Video ID: Enter the video ID of the pirated video that you uploaded in the previous step.

      2. Click Submit.

        After you submit the task, click Query Result in the dialog box that appears to view the task status. Wait for the task to succeed before you query the extracted tracing watermark information in the next step.

    4. Query the extracted tracing watermark information.

      Note

      The ApsaraVideo VOD console shows only the result of the latest digital watermark extraction task for a video. To query the results of all historical extraction tasks for the video, call the QueryAiExtractJob operation.

      1. In the Digital Watermark Extraction Tool section, configure the parameters to query the extraction result.

        • Task Type: Select Query Watermark Extraction Result.

        • Watermark Type: Select Tracing Watermark.

        • Video ID: Enter the video ID of the pirated video that you uploaded in the previous step.

      2. Click Submit.

    Extract by using OpenAPI

    1. Submit a tracing watermark extraction task.

      Call the SubmitAiExtractJob operation and set the following required parameters to initiate a tracing watermark extraction task.

      • Set the MediaId parameter to the video ID of the pirated video.

      • Set the ExtractType parameter to TraceMark.

    2. Query the extracted tracing watermark information.

      Note

      After you submit a tracing watermark extraction task, wait for about 10 minutes before you query the extracted tracing watermark information.

      Call the QueryAiExtractJob operation and set the following required parameters to query the extracted tracing watermark information.

      • Set the MediaId parameter to the video ID of the pirated video.

      • Set the ExtractType parameter to TraceMark.

      If the tracing watermark is extracted, the following response is returned:

      {
        "RequestId": "6D402250-3A4D-590D-A58A-8DD2711E099C",
        "AiExtractResultList": [
          {
            "Status": "Success",
            "ModifyTime": "2024-06-12T10:50:37Z",
            "WaterMarkText": "Tracing watermark-User B",
            "CreateTime": "2024-06-12T10:49:58Z",
            "JobId": "f1e12c4dec6a45e57ae52141****"
          }
        ]
      }

      If the tracing watermark fails to be extracted, see the FAQ Why did the system fail to extract the digital watermark from the pirated video? for troubleshooting.

Step 4: Compare watermark information

Compare the tracing watermark text extracted in the previous step with the watermark information provided in the Trace field when calling the GetPlayInfo API in Step 1: Generate a video with a tracing watermark - Substep 3 to identify the user who leaked the video.

Frequently asked questions

Why does digital watermark extraction from a pirated video fail?

If digital watermark extraction fails, check the following:

  • Verify that the video for distribution has been transcoded with a digital watermark.

    After digital watermark transcoding succeeds, go to the Video URL page of the video (log on to the VOD console, and then choose Media Files > Audio/Video > Manage > Video URL) to view the generated video stream marked with Copyright Watermark or Tracing Watermark.image

  • Verify that the video URL for distribution is the copyright watermark stream URL or the tracing watermark stream URL. Do not use the source file URL or a URL generated by another transcoding process.

  • Verify that the pirated video is at least 6 minutes long and its bitrate meets the requirements. For more information, see Usage limits.

  • Verify that the watermark type set for extraction is correct.