PallyCon Distributor Watermarking Guide


PallyCon Distributor Watermarking is a watermarking solution to track the illegally leaked content when a video content is distributed through multiple channels.

PallyCon Distributor Watermarking inserts the channel information to the original video in the form of an invisible watermark, and can detect the watermark information from the leaked video. It also provides an option to insert an additional visible watermark.

DWM Workflow

PallyCon DWM can be applied by the workflow shown below.

PallyCon DWM Workflow
PallyCon DWM Workflow
  1. Input the original video along with the information of the distribution channels into DWM Embedder.
  2. PallyCon DWM server issues a unique DWM ID for each channel through API integration with the DWM Embedder.
  3. DWM Embedder creates videos with unique watermarks as many as the number of channels to be distributed.
  4. Deliver the corresponding DWM video to each distribution channel.
  5. In the event of a content leak, the leaked copy is sent to PallyCon service to request watermark detection.
  6. PallyCon service detects the watermark in the leaked copy and delivers the channel information (Distributor ID) to the customer.

Supported Specifications

PallyCon DWM supports the below specifications.

Item Specification Remarks
Content Type Supports video contents only
Format and codec MP4/MXF VOD video, H.264/H.265/VP9/XDCAM codec supported Apple ProRes will be added later
Supported Resolution Up to 4K/UHD resolution
Dynamic Range SDR (Standard Dynamic Range), HDR (High Dynamic Range) supported
Number of DWM ID Up to 4095 IDs per content (12bit ID)
Minimum Video Length Need at least 5 minutes of recorded video to detect watermark
Video Quality for Detection Need 480p 1Mbps or higher video quality for detection. 720p video is recommended.

DWM Embedding

PallyCon DWM Embedder is a Linux CLI (Command Line Interface) based DWM embedding tool. It receives the original video and DWM ID information and outputs the DWM video with the corresponding ID.

When using the DWM Embedder executable file alone, the customer must directly manage the DWM ID and distribution channel information without the use of PallyCon server. For server integration, DWM embedding should be performed through a Python script distributed along with the core executable file.

DWM Embedder Modules

You can request PallyCon DWM Embedder after subscribing to PallyCon Distributor Watermarking service, and is composed as follows:

  • DwmEmbedder executable file: This is a core module executed by the Python script below. It inserts a unique watermark (DWM ID) in the original video for each distribution target channel.

  • This is a Python script in charge of communication between DwmEmbedder and the PallyCon server. DWM embedding should be done through this script instead of directly executing the above core module.

  • dwm_info.json: This is a file to input embedding job information such as the original video and output file to insert the DWM ID, and information for each channel.

  • fmkeyDemo.dat: This is a demo version key file used for DWM embedding in a trial account. In addition to the invisible watermark (DWM ID), a visible watermark (‘PALLYCON DEMO’) will be added in the video preprocessed with the demo key. After commercial subscription, you may use a commercial version key file(fmkey.dat) instead.

  • Library files: In the lib folder, there are various libraries used by the DWM Embedder.

Required environments

You need the following environment to run the DWM Embedder.



  • Ubuntu server 18.04, 20.04 or CentOS 7
  • Intel IPP (Integrated Performance Primitives) 2018: Included in the distribution.
  • NVIDIA CUDA Toolkit 9.1 or later (NVIDIA hardware acceleration)
  • Dependency libraries

Installation guide

NVIDIA CUDA Toolkit 10.0

Pallycon CLI Preprocessor supports NVIDIA H/W encoding/decoding. You can check supported GPUs and codecs here.

It supports CUDA Toolkit 9.1, but 10.0 or higher is recommended. You can also install the latest version if there are no compatibility issues with your other programs. If you need to install other CUDA Toolkit version, please refer latest downlaod or archive.

  • Installing on Ubuntu 18.04

    $ distribution=$(. /etc/os-release;echo $ID$VERSION_ID|tr -d '.')
    $ wget${distribution}/x86_64/cuda-repo-${distribution}_10.0.130-1_amd64.deb
    $ sudo dpkg -i cuda-repo-${distribution}_10.0.130-1_amd64.deb
    $ sudo apt-key adv --fetch-keys${distribution}/x86_64/
    $ sudo apt-get update
    $ sudo apt-get install -y linux-headers-$(uname -r)
    $ sudo apt-get install -y cuda-10-0
    $ rm cuda-repo-${distribution}_10.0.130-1_amd64.deb
    $ sudo reboot
  • Installing on CentOS 7

    $ sudo yum install -y
    $ wget
    $ sudo rpm -i cuda-repo-rhel7-10.0.130-1.x86_64.rpm
    $ sudo yum clean all
    $ sudo yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r)
    $ sudo yum install cuda-10-0
    $ rm cuda-repo-rhel7-10.0.130-1.x86_64.rpm
    $ sudo reboot
  • Installing on AWS Linux2

    • Please refer to this link
  • Verification

    $ nvidia-smi
  • References

Install Dependencies

  • Ubuntu 18.04 version

    $ sudo apt update
    $ sudo apt install -y \
            libva-drm2 \
            libvdpau1 \
            libmediainfo0v5 \
  • Ubuntu 20.04 version

    $ sudo apt update
    $ sudo apt install -y \
            libnuma1 \
            libva-drm2 \
            libvdpau1 \
            libmediainfo0v5 \
  • CentOS 7 version

    $ sudo yum update
    $ sudo yum install -y \
            openssl-devel \
            libpng-devel \

DWM Embedder Guide

After unpacking the DWM Embedder distribution in the execution environment prepared through the above installation process, check if there are related files (core executable, Python script, dwm_info.json, key file, etc.) in the bin folder. After that, you can insert the DWM ID into the original video by running DWM Embedder with the steps below.

Create credentials file

In order to communicate with PallyCon DWM server, a credential file should be created with Site ID, Site Key, and Access Key information. Save these values as ~/.pallycon/credentials file in the following format.


The actual values to be entered in the credentials file can be checked on the ‘Distributor Watermarking’ > ‘DWM Settings’ screen after logging in to the PallyCon console.

Create job file

Update the dwm_info.json file, which is the DWM job information file, referring to the example and description below.

    "input": "~/input.mp4",
    "output": "~/output.mp4",
    "visible_watermark": {
      "type": "text",
      "text": {
        "message": "for test",
        "fontsize": 20
      "image": {
        "filename": "~/watermark.png"
      "alpha": 0.3,
      "position": [
        { "x": 200, "y": 100},
        { "x": 300, "y": 200}
      "timing": {
        "interval": "00:05:00",
        "disappear": "00:01:00"
    "distribution": [
            "distributor_name": "distributor 1",
            "distribution_purpose": "test"
            "distributor_name": "distributor 2",
            "distribution_purpose": "for editing"
            "distributor_name": "distributor 3",
            "distribution_purpose": "for auditing"
  • content_id: unique ID for the original content (enter arbitrarily)
  • input: Input the source file name and path to embed the DWM ID.
  • output: Enter the path and default file name to save the DWM-embedded result file.
    • Distribution information (distributor name, distribution purpose, DWM ID) is added after the basic file name to the actual generated file name.
  • visible_watermark: Adds a visible watermark to the resulting video. (optional)
    • In addition to the invisible DWM ID information, an image or text watermark can be displayed on the video.
    • You may omit this keyword and its subitems if you don’t want to add visible watermark.
    • For detailed options that can be entered, please refer to the separate description below.
  • distribution: list of distributor_name and distribution_purpose
    • distributor_name and distribution_purpose: Enter the name of the channel to distribute the video and the purpose of distribution.
    • These values ​​are transmitted to the DWM server and stored in the DB. They are added to the result file name, but are not inserted into the resulting video itself.

The above DWM job information is transmitted to the DWM server API through a Python script, and the DWM ID returned from the server is inserted into the resulting video in the form of an invisible watermark through the DWM Embedder core module.

Run DWM Embedder Python script

During the DWM trial, the demo key file (fmkeyDemo.dat) included with the distribution is used instead of the commercial version key file. In this case, run it by adding the --demo parameter along with the dwm_info.json file name as follows.

$ python3 dwm_info.json --demo

After subscribing to the DWM commercial plan, download the commercial key file (fmkey.dat) from the PallyCon Console and copy it to the bin directory, that is, to the same location as The commercial version runs without the --demo parameter as follows:

$ python3 dwm_info.json

Visible Watermark configuration (optional)

By default, DWM Embedder invisibly embeds a unique DWM ID for each distribution channel into the video. If you want to add a visible watermark to the video, you can set the following options in the visible_watermark item of the dwm_info.json file.

Keyword Type Required Description Example
type String Y Type of visible watermark (“text” or “image”) “type”: “image”
text Json Y (for text type) Options for text type watermark. Not used for image type watermark.
message String Y (for text type) Text message for visible watermark. Alphanumeric, blank, .(dot), and _(underscore) characters are allowed. “message”: “for_test”
fontsize Int N Size of text watermark. “font_size”: 20
image Json Y (for image type) Options for image type watermark. Not used for text type watermark.
filename String Y (for image type) File path of watermark image. “image_file”: “~/watermark.png”
alpha Float N Opacity of visible watermark (default 1) “alpha”: 0.5
position Json Array N Options for watermark positioning. When multiple position items are input, a new position can be specified every time it is displayed on the screen by the interval value below.
x and y Int N X/Y position of the watermark “x”: 200, “y”: 100
timing Json N Options for showing/hiding watermark periodically (watermark interval)
interval String N Set the period to display a watermark in the format of ‘HH:MM:SS’ When “interval”: “00:05:00” is input, it is displayed every 5 minutes and then disappears after the value of disappear. (repeated)
disappear String N Set how long the watermark will be displayed in the format of ‘HH:MM:SS’ When “disappear”: “00:01:00” is input, the watermark will be shown for 1 minute after every interval

DWM Embedding job history

You can review and modify the DWM embedding information transmitted to the server in the PallyCon console.

In the Distributor Watermarking > DWM packaging history screen, you can inquire the distribution channel information entered in the dwm_info.json and edit the information if needed.

DWM Detection

If the watermarked video is leaked and distributed illegally, you can request the DWM detection by sending the video via PallyCon Helpdesk. (Attach a large file transfer service or a cloud storage link to the ticket. A Google Drive link is recommended.)

DWM detection analyzes each frame of the video to detect the original watermark pattern and decrypts the data with the secret key used at the time of insertion. If a DWM ID is found through the detection process, we find the distribution channel information in our database and report it as the detection result.

For DWM detection, a continuous recorded video of at least 5 minutes or longer is required. PallyCon DWM solution is robust against various attacks including resizing, but the actual detection rate of the watermark may vary depending on the video quality (resolution, bitrate, shake, etc.) used for detection. The minimum specification required for detection is 480p 1Mbps or higher, and most of the video over 720p can be detected.
    participant A as Service site
    participant B as PallyCon service
    A ->> B: Suspicious content
    Note right of B: Detect watermark (payload)
    B -->> B: Analyze video frames
    opt Watermark detected
    Note right of B: Session database
    B -->> B: Find session data
    B ->> A: Report detection result

Please contact us for detailed information on watermark detection such as monitoring service.

Contact Us