Session Manager

After pre-processing of watermark embedding, the ‘0’ and ‘1’ versions of content (DASH or HLS) are mixed in real time and delivered to the client on the user’s playback request. PallyCon Forensic Watermarking service provides the session manager which generates the mixed content URL with the information of the playback session.

The service site streams the mixed content to the client according to the mixed URL through the CDN’s watermark mixer integration. For a description of the CDN mixer module, please refer to the Mixer Guide.

sequenceDiagram participant B as Service site participant D as PallyCon service B ->> D: Content URL, Session data Note right of D: Session manager D -->> D: Generate session key(payload) and store session data D ->> B: Send Session URL

The session manager can be integrated through the following HTTP API.

PallyCon Cloud HTTP API Specification

The HTTP API requests used by the PallyCon service follow the specifications below.

Request

  • HTTP Method : GET, POST

Body

Key Value
pallycon-apidata base64 Encoding ( JSON Data string )

JSON Data Format

{
    "data":"<base64 encode(*aes256 encrypted(*request data) by site key)>",
    "timestamp":"<yyyy-mm-ddThh:mm:ssZ>",
    "hash":"<base64 encode(sha256(message format))>"
}

SHA256 message Format

<site access key> + <site_id> + <data> + <timestamp>

request data specification

request data refers to JSON data that is passed to the specified URL to execute the following APIs.

  • Get Session URL API : API for obtaining playback session URL for applying session-based watermark

aes256 encrypted by site key

Encryption standard for transmission data protection. (See the specification below)

site access key

It is the access key value that is issued when creating PallyConsole Cloud service site. It can be checked on the PallyCon Console page.

AES256 Encryption

Aes256 encryption / decryption processing is performed as below using the site key value issued when joining PallyCon service. (Check PallyCon Console site)

  • mode : CBC
  • key : 32 byte (Site key issued from PallyCon Console site)
  • iv : fixed 16 byte (0123456789abcdef)
  • padding : pkcs7

Get Session URL API

  • Called by PallyCon Cloud HTTP API spec.
  • URL : watermark.pallycon.com/a/v2/session/watermarkUrl/<site_id>
  • Method: GET

You need to replace ‘site_id’ part with your siteID issued by PallyCon console.

JSON Data Format

{
  "domain": <CDN domain>,
  "output_path" : <output path>,
  "cid": <content ID>,
  "streaming_format": <"dash"/"hls">,
  "forensic_mark" : <forensic mark data>,
  "gop": <30/60/120>
}
  • Request data spec

    Name Value Required Description
    domain String Y Domain of content URL (e.g. cdn.yoursite.com)
    output_path String Y Path of content packaging output
    cid String Y Unique content ID
    streaming_format String Y Streaming protocol (“dash” or “hls”)
    forensic_mark String Y Session data to be embedded in watermark (such as end-user ID), max 255 byte alphanumeric characters
    gop Number N GOP of original video (support 30, 60, 120 GOP, default 60)

Response data

JSON Data Format

{
  "url":<Watermark Playback URL>,
  "error_code":<error code>,
  "error_message":<error massage>
}
  • Response data spec

    Name Value Required Description
    url String N If succeeded, returns the Session URL

    Please see below for detailed Session URL format

    error_code String Y “0000” if succeeded, alphanumeric error code if failed
    error_message String Y Error message
  • Session URL format: <content CDN domain>/dldzkdpsxmdnjrtm/<encrypted payload>/<output_path>/<cid>/<stream format>/<manifest file>

  • Session URL spec

    Item Description
    content CDN domain Domain name of content’s CDN. Set based on the domain in the request data
    dldzkdpsxmdnjrtm Pre-defined keyword
    encrypted payload Encrypted session key (payload)
    output_path Path of the packaging output on the storage.
    cid Unique ID of the content (ContentID)
    stream format Streaming protocol of content. (‘dash’ or ‘hls’)
    manifest file Manifest filename (‘stream.mpd’ or ‘master.m3u8’)