Deepmark

Video Watermarking

Overview

This page covers video-specific features of the DeepMark watermarking API: quality settings that control the robustness/visibility tradeoff, visual comparisons, and supported video formats.

For general API usage (authentication, submitting jobs, downloading results), see the API Key Guide.

Quality Settings

Quality settings let you control the tradeoff between watermark robustness (how well the watermark survives compression, cropping, re-encoding) and visual quality (how invisible the watermark is).

The system automatically selects optimal defaults based on the input video's resolution. You only need to override the parameters you want to change — everything else uses the defaults for your video's resolution tier.

How to pass quality settings

Include quality settings as additional form fields in the POST /client/embed request:

FieldDescription
quality_modeSpeed/quality tradeoff: fast or precise (optional)
embed_strengthWatermark strength, 110 (optional)
dark_suppressionDark region protection, 0.01.0 (optional)
dark_thresholdDark luminance threshold, 0255 (optional)
flat_area_retentionMinimum watermark in flat areas, 0.01.0 (optional)

Example Request (with quality settings)

curl -sS -X POST "https://<your-deepmark-domain>/client/embed" \
  -H "X-Client-Api-Key: <your-api-key>" \
  -F "file=@/path/to/input.mp4" \
  -F "watermark=10101010" \
  -F "model=model-id" \
  -F "quality_mode=precise" \
  -F "embed_strength=4" \
  -F "dark_suppression=0.8" \
  -F "dark_threshold=80" \
  -F "flat_area_retention=0.5"

Each parameter has different defaults depending on which resolution tier the input video falls into:

TierVideo heightTypical resolutions
≤480pup to 480 pixels360p, 480p
480–720p481 to 720 pixels540p, 720p
720–1080p721 to 1080 pixels900p, 1080p
>1080pabove 1080 pixels1440p, 2160p (4K), 2880p (5K)

Parameters

1. quality_mode

Controls the speed/quality tradeoff for perceptual masking — the process that adapts the watermark to the video content so it is less visible in areas where the human eye is sensitive.

ValueBehavior
fastPerceptual masking runs at a low internal resolution. Fastest processing. Good visual quality for high-resolution inputs where pixel density provides natural cover.
precisePerceptual masking runs at the full input resolution. Slower processing. Best visual quality, especially important for low-resolution inputs where every pixel matters.
Defaults
  1. ≤720p — precise (cost is negligible at low resolutions)
  2. >720p — fast

2. embed_strength

Controls how strongly the watermark signal is blended into the video. This is the primary knob for the robustness vs. visibility tradeoff.

RangeEffect
1Minimum strength. Watermark is barely visible but fragile — may not survive heavy compression or re-encoding.
5 (default)Balanced. Watermark is imperceptible in most content and survives standard compression workflows.
10Maximum strength. Watermark survives aggressive transformations but may produce visible artifacts.

Range:1 to 10 (integer or decimal). Default: 5 for all resolutions.

3. dark_suppression

Controls how much the watermark is reduced in dark regions of the video. Dark areas have less perceptual headroom to hide the watermark, so without suppression, artifacts become visible as noise or banding in shadows.

RangeEffect
0.0Off. Watermark is applied at full strength everywhere, including dark regions.
0.5Moderate. Watermark is reduced by half in regions below the dark threshold.
1.0Full suppression. Watermark is completely removed in the darkest regions.
Defaults by resolution tier
  1. ≤480p — 0.0
  2. 480–720p — 0.4
  3. 720–1080p — 0.6
  4. >1080p — 0.95

4. dark_threshold

Controls the luminance threshold below which a region is treated as dark for the purposes of dark_suppression. Higher values mean more of the image is considered dark and receives suppression.

RangeEffect
0Only pure black pixels are protected.
40Pixels below ~16% brightness are protected.
127Pixels below ~50% brightness are protected — roughly the darker half of the image.
255The entire image is treated as dark (not recommended — effectively disables the watermark).
Defaults by resolution tier
  1. ≤480p — 0
  2. 480–720p — 40
  3. 720–1080p — 60
  4. >1080p — 127

5. flat_area_retention

Controls the minimum watermark strength retained in smooth, flat areas of the video — regions with low texture like sky, walls, gradients, and solid backgrounds.

RangeEffect
0.0Watermark can be fully suppressed in flat areas. Best visual quality in gradient-heavy content, but watermark is very weak in those regions.
0.4 (default)Watermark is reduced to 40% strength in flat areas. Good balance between visual quality and robustness.
1.0No reduction. Flat areas receive the same watermark strength as textured areas. Maximum robustness but artifacts may be visible in skies, walls, and gradients.
Defaults by resolution tier
  1. ≤480p — 0.7
  2. 480–720p — 0.6
  3. 720–1080p — 0.4
  4. >1080p — 0.3

Defaults Summary

Parameter≤480p480–720p720–1080p>1080p
quality_modepreciseprecisefastfast
embed_strength5555
dark_suppression0.00.40.60.95
dark_threshold04060127
flat_area_retention0.70.60.40.3

Visual Comparison

The following videos demonstrate why the system uses content-adaptive quality defaults. All examples use 1080p mountain-landscape source, which is a good worst case — it contains large skies (flat, gradient-heavy regions) and deep shadows on the mountain slopes (dark regions).

Original vs. Optimally Watermarked (1080p)

Original
Watermarked (optimal)
<>
Loading video…
0:00
0:00

The watermarked video uses the 720–1080p production defaults:

ParameterValue
quality_modefast
embed_strength5
dark_suppression0.6
dark_threshold60
flat_area_retention0.4

Wrong Defaults vs. Optimal Defaults (1080p)

Low-res tuning
1080p optimal (correct)
<>
Loading video…
0:00
0:00

The left video forces ≤480p-tier quality parameters onto 1080p content. The right video uses the correct 720–1080p production defaults.

Watermark Delta Visualizations

The videos below visualize the watermark signal itself — what the system adds to each frame. Both are amplified 30× and rendered as white on black. Brighter pixels indicate stronger watermark energy.

Pre-Blend Delta (Intended Signal)
Post-Encode Delta (Actual Pixel Difference)

Video Format and Codec Support

Supported Resolutions

360p up to 5K (2880p).

Watermark Length

The video watermark payload supports up to 256 bits. If the provided watermark is shorter than 256 bits, it is automatically tiled (repeated) to fill the full capacity. Detection recovers the full 256-bit payload and folds it back to the original length via majority voting, which improves detection reliability.

Supported Codecs

  1. H.264 (AVC)
  2. H.265 (HEVC)
  3. AV1

Other codecs (VP8, VP9, etc.) are transcoded to AV1.

Supported Containers

  1. MP4
  2. MKV
  3. MOV
  4. WEBM

Other containers are not guaranteed to work and may require remuxing before upload.