Watermarks¶
Rightra applies three watermark layers to every playback session and every download. All three carry the same 32-bit code, which identifies the session that produced the file.
Layers¶
Each layer survives transformations that defeat the others. Removing all three requires separate processing for the overlay, the video, and the audio.
| Layer | Method | Properties |
|---|---|---|
| Visible overlay | DOM text above the video | Opacity 0.12. z-index: 2147483002. Repositions every 7 seconds. Shows the session code and, when available, the viewer label. |
| Invisible video | Sign modulation of selected DCT coefficients | Survives resizing, re-encoding, edge cropping, and moderate compression. Degrades under heavy compression or strong de-noising. |
| Audio | FSK at 17.5 kHz and 18.3 kHz | 10 bits per second. Each burst carries a sync pattern, the session code, and a CRC. Survives re-encoding, resizing, and moderate compression. |
The overlay is rendered in the DOM, so screen recordings capture it. The video layer runs in two implementations, plain JavaScript (watermark-video.js) and WebGL (watermark-video-gl.js). Both produce the same watermark, and the player falls back to the other if one fails.
Session codes¶
The server derives a 32-bit code from the session ID using RIGHTRA_WATERMARK_SECRET. It stores the code in playback_watermarks and returns it in the session response. The player does not start without it.
Downloads receive a separate code, stored in download_watermarks. Because a download is never tied to a playback code, you can distinguish a downloaded copy from a screen recording.
Extraction¶
Submit a suspected file to the extractor in the console or through POST /engine/extract. The extractor runs in this order:
- Audio scan. If a code with a valid CRC is found, extraction stops. The audio layer is faster and more reliable.
- Video scan. Runs only if the audio scan finds nothing.
Rightra looks the code up in playback_watermarks and download_watermarks and returns:
- Session ID
- Viewer ID and label
- Content ID and title
- Time the code was issued
- Whether the source was a playback session or a download
Each run is stored in watermark_extractions. The console shows the extraction history for each content item.
Attribution¶
A code identifies a session and the viewer identifier you supplied when creating it. Rightra holds no other identity data. To resolve a code to a person, pass a viewer ID that maps to a record in your own system.
Testing¶
- Play a work through the SDK.
- Record a few seconds of the screen.
- Upload the recording to the extractor.
The result should return the session that produced the playback, which confirms all layers work end to end.