Trace leaked content with forensic watermarking
Every other protection in Adaptive Media Delivery tries to stop content from escaping. Watermarking assumes it already has. When a valid user requests content, edge servers serve segments in an "A"/"B" pattern unique to that user. If the stream turns up on a pirate site, you or your vendor can forensically analyze the segments, extract the pattern, and identify who leaked it.
Watermarking doesn't protect your content — it identifies the source that compromised it.
There's an EdgeWorkers alternativeYou can also deploy watermarking programmatically with EdgeWorkers functions.
When to use this
- You license premium content under contracts that require forensic traceability.
- You deliver on-demand content from your own origin or NetStorage. Media Services Live isn't supported.
- You can work with a third-party watermarking vendor, who does the heavy lifting.
Who does what
| Party | Responsibility |
|---|---|
| Your watermarking vendor | Generates and stores watermarking patterns in a watermarking token (WMT), and preprocesses your content into "A" and "B" variants placed on your origin under a strict naming convention. |
| Adaptive Media Delivery | Parses, verifies, and acts on the WMT supplied during segment requests. Edge servers verify the token, then map each request to an "A" or "B" variant based on the segment's sequence number and the user's pattern. |
| Your player | Fetches the WMT from the vendor and passes it to Akamai with each request. |
The end user sees none of this — the viewing experience is seamless.
Supported formats
A format works with watermarking if a request can be mapped to a logical segment number.
- On-demand content is supported. Segments carry an explicit sequence number.
- Live content is supported in a limited way, with a specific watermarking vendor only. Media Services Live isn't supported at all.
| Format | Support |
|---|---|
| HLS | Both segmented and fragmented forms. Akamai also has to deliver the HLS manifest files. |
| DASH | Segmented format only. |
Before you begin
- Get it on your contract. Ask your account representative to add
AdaptiveMediaDelivery::Watermarking. - Budget for the storage. Two variants of every media file means your origin footprint roughly doubles.
- Choose a vendor and a preprocessing method before you touch the environment, because the behavior's settings depend on which method they use.
1 - Have your vendor preprocess your content
Preprocessing converts your unmarked source into "A" and "B" variants, stored on your origin with distinguishable naming or pathing, and produces a manifest that gives no indication the variants exist. There are two naming methods plus one optional refinement.
The filename-prefix AB naming method (recommended)
The easiest to implement. The vendor prefixes each variant segment's filename with a. or b.:
<base_path>/baseball/master.m3u8 ← relative paths to 1080-media.m3u8, 720-media.m3u8
<base_path>/baseball/1080-media.m3u8 ← relative paths to /1080/segment_1.ts
<base_path>/baseball/1080/a.segment_1.ts
<base_path>/baseball/1080/a.segment_2.ts
<base_path>/baseball/1080/b.segment_1.ts
<base_path>/baseball/1080/b.segment_2.ts
<base_path>/baseball/720-media.m3u8 ← relative paths to /720/segment_1.ts
<base_path>/baseball/720/a.segment_1.ts
<base_path>/baseball/720/a.segment_2.ts
<base_path>/baseball/720/b.segment_1.ts
<base_path>/baseball/720/b.segment_2.ts
The directory-prefix AB naming method
The path immediately above the segments carries /A/ and /B/ subdirectories, and filenames stay unchanged:
<base_path>/baseball/1080-media.m3u8 ← relative paths to /1080/segment_1.ts
<base_path>/baseball/1080/A/segment_1.ts
<base_path>/baseball/1080/A/segment_2.ts
<base_path>/baseball/1080/B/segment_1.ts
<base_path>/baseball/1080/B/segment_2.ts
The unlabeled A variant method
An add-on to either method above: the vendor leaves the "A" label off entirely, so the A variant keeps its standard name in the default location the manifest points to. This makes watermarking trivial to switch off later — disable the behavior, point your player at the default location, done.
<base_path>/baseball/1080/segment_1.ts ← unlabeled; the default location
<base_path>/baseball/1080/B.segment_1.ts
If you have separate audio and video segments
- Same file extension for both. Akamai attempts the A-to-B switch on audio as well as video, so your vendor has to prepare A and B audio variants too — even though switching audio gives no watermarking benefit.
- Different file extensions. Audio segments must sit in the default location named in the manifest, because the A-to-B switch is bypassed for them. This is one of the main reasons to prefer filename-prefix naming.
DASH-specific requirements
The only supported DASH variant is SegmentTemplate with $Number$ expansion in the MPD:
- The
$Number$macro must be at the end of the filename, prefixed with an underscore. - Any
initURL must be named<filename>_init.mp4, so edge servers can detect it as an init request and skip AB switching.
<MPD>
<Period>
<AdaptationSet mimeType="video/mp4" contentType="video">
<SegmentTemplate duration="120" timescale="30" startNumber="1"
media="$RepresentationID$/$RepresentationID$_$Number$.m4v"
initialization="$RepresentationID$/$RepresentationID$_init.m4v"/>
</AdaptationSet>
<AdaptationSet mimeType="audio/mp4" contentType="audio">
<SegmentTemplate duration="192512" timescale="48000" startNumber="1"
media="$RepresentationID$/$RepresentationID$_$Number$.m4a"
initialization="$RepresentationID$/$RepresentationID$_init.m4a"/>
</AdaptationSet>
</Period>
</MPD>
Init segment naming is strictDASH
_initsegments that don't follow this naming return 403. The{filename}portion of an_initfile can be at most 247 characters.
You don't modify the manifest. The original, pre-processing manifest is what your player requests, and edge servers use the WMT to resolve each segment request to the right variant.
2 - Add the Watermarking behavior
Add the Watermarking behavior to the appropriate rule and set Enable Watermarking to On. Then enable at least one of the two protections below — Akamai recommends both. Your vendor supplies most of these values.
Perform signature verification
Leave this On (the default). What you set here has to match the <signature> in the WMT your vendor issues. You can disable it, but without a signature in the WMT, watermarking is open to outside attack.
- Verification Key ID #1. A unique identifier for Verification Public Key #1. This value appears in the
kidparameter of the WMT to select that key. - Verification Public Key #1. The full public key used to verify the WMT signature, hashed with the algorithm named in the WMT's
algparameter. - Verification Key ID #2 / Verification Public Key #2. A second ID and key pair, for rotation or added security. The WMT's
kidselects which one applies.
Pattern encryption
Turn this On if your vendor also encrypts each WMT — signalled by the wmidalg and wmifpid parameters in the token.
- Decryption Password ID #1. The unique ID for Decryption Password #1, carried as
wmidpidin the WMT. - Decryption Password #1. The password edge servers use to decrypt the WMT.
- Decryption Password ID #2 / Decryption Password #2. A second pair, for password rotation. The
wmidpidin the WMT has to match the right password.
Miscellaneous settings — match your preprocessing method
| Preprocessing method used | Settings |
|---|---|
| filename-prefix AB naming | A/B Variant Location: Filename prefix |
| directory-prefix AB naming | A/B Variant Location: Parent directory prefix |
| unlabeled A variant | Use Original as A: On, plus the A/B Variant Location that matches the underlying naming method |
3 - Set up your player
Your player has two jobs: get the WMT from the vendor, and pass it to Akamai on every request.
How it obtains the token varies by vendor — ask them. How it passes the token to Akamai is up to you:
| Method | Format | Notes |
|---|---|---|
| Virtual path component (recommended) | http://ss-wmt.akamaized.net/wmt:<WMT>/Stub/HLS/VoD/ToS/ToS.m3u8http://ss-wmt.akamaized.net/wmt:<WMT>/Stub/Dash/VoD/ToS/ToS.mpd | Your CMS retrieves the token and inserts it into the URL, so the player supplies it transparently with no player changes. Edge servers strip it from the path before forwarding to your origin. |
| Authorization header | Authorization: <wmt> | Requires player-side code to fetch and insert the token. |
| Query parameter | https://customer-1.akamaized.net/hls/vod/segment1.ts?wmt=<wmt> | Requires player-side code to fetch and insert the token. |
4 - Handle content that isn't watermarked
Once the Watermarking behavior is enabled in a rule, every request matching that rule must carry a WMT — whether that content needs watermarking or not. Split the traffic:
- Create a rule whose match criteria select only the content you want watermarked, and put the Watermarking behavior there.
- Create a separate rule from the Blank Rule Template whose criteria select the non-watermarked content.
Two things to remember:
- Lower rules take precedence. Place the rule that filters out non-watermarked requests below the watermarking rule.
- Never put Watermarking in the default rule set unless you genuinely want every request watermarked, because the default rule set applies to all requests.
Key considerations
| Issue | Description |
|---|---|
| Akamai must deliver HLS media manifests | The delivery scheme is: the content provider hands over unmarked content; the OTT provider prepares A/B HLS variants on an origin; the OTT provider or client delivers the WMT to the edge; the edge transparently serves segments following the WMT's pattern. Edge servers need to update HLS manifests to perform the switch. |
| Storage footprint increases | Two versions of every media file. |
| Multi-CDN environments aren't supported | The functionality is unique to the Akamai CDN. A request switched mid-stream to another CDN would need a mirror implementation there. |
| Prefetching is not recommended | The origin-assist prefetch model doesn't work well with watermarking, and edge servers can't apply Segmented Media Streaming - Prefetch and Watermarking to a single request. Don't put both in the same rule, and don't put either in the default rule set while the other sits in a lower rule. See Prefetch the next segment. |
| Media Services Live isn't supported | On-demand only. Your origin must be Your Origin or NetStorage. |
| Origin failover doesn't work with watermarking | Currently incompatible. Expected to be fixed in a future release. See Keep streaming when your origin fails. |
| Range requests aren't supported | They cause a range mismatch, and arbitrary range requests against a watermarked stream are a security violation. |
Mixed Mode and watermarkingIf you serve both Media Services Live and other origins from one environment, create a separate rule for the non-MSL requests and put Watermarking there. See Serve live and on-demand traffic from one environment.
Related
- Revoke access to a shared stream — including revoking a flagged WMT
- Protect streams with token authentication
- Encrypt media segments at the edge
- Restrict where your content can be played
Updated about 1 hour ago
