Skip to content

drmtday:ingest-cenc-key

drmtoday:ingest-cenc-key

Ingests a key to DRMtoday API (v3) and provides the ingested key info as environment variables. The tool always exports these environment variables:

    * [env_prefix]_asset_id: the DRMtoday asset ID in UTF-8

    * [env_prefix]_base64: the CEK as base64 string
    * [env_prefix]_hex: the CEK as hex string

    * [env_prefix]_id_base64: the Key ID as base64 string
    * [env_prefix]_id_hex: the Key ID as hex string

    * [env_prefix]_iv_base64: the FairPlay IV as base64 string
    * [env_prefix]_iv_hex: the FairPlay IV as hex string

        @PlayReady
    * [env_prefix]_pssh_pr_ctr_b64: the PSSH box for PlayReady AES-CTR as base64 string
    * [env_prefix]_pssh_pr_cbc_b64: the PSSH box for PlayReady AES-CBC as base64 string
    * [env_prefix]_pssh_pr_ctr_hex: the PSSH box for PlayReady AES-CTR as hex string
    * [env_prefix]_pssh_pr_cbc_hex: the PSSH box for PlayReady AES-CBC as hex string
    * [env_prefix]_cpe_pr_ctr_xml: the DASH manifest content protection element for PlayReady AES-CTR as XML element string
    * [env_prefix]_cpe_pr_cbc_xml: the DASH manifest content protection element for PlayReady AES-CBC as XML element string
    * [env_prefix]_phe_pr_ctr_xml: the MSS manifest protection header element for PlayReady AES-CTR as base64 string
        * [env_prefix]_exk_pr_cbc_tag: the HLS EXT-X-KEY tag for PlayReady AES-CBC as string
        * [env_prefix]_exsk_pr_cbc_tag: the HLS EXT-X-SESSION-KEY tag for PlayReady AES-CBC as string

        @Widevine
    * [env_prefix]_pssh_wv_ctr_b64: the PSSH box for Widevine AES-CTR as base64 string
    * [env_prefix]_pssh_wv_cbc_b64: the PSSH box for Widevine AES-CBC as base64 string
    * [env_prefix]_pssh_wv_ctr_hex: the PSSH box for Widevine AES-CTR as hex string
    * [env_prefix]_pssh_wv_cbc_hex: the PSSH box for Widevine AES-CBC as hex string
    * [env_prefix]_cpe_wv_ctr_xml: the DASH manifest content protection element for Widevine AES-CTR as XML element string
    * [env_prefix]_cpe_wv_cbc_xml: the DASH manifest content protection element for Widevine AES-CBC as XML element string
    * [env_prefix]_exk_wv_cbc_tag: the HLS EXT-X-KEY tag for Widevine AES-CBC as string
        * [env_prefix]_exsk_wv_cbc_tag: the HLS EXT-X-SESSION-KEY tag for Widevine AES-CBC as string

        @FairPlay
    * [env_prefix]_exk_fp_cbc_skd: the HLS EXT-X-KEY SKD URI for FairPlay AES-CBC as string
    * [env_prefix]_exk_fp_cbc_tag: the HLS EXT-X-KEY tag for FairPlay AES-CBC as string
        * [env_prefix]_exsk_fp_cbc_tag: the HLS EXT-X-SESSION-KEY tag for FairPlay AES-CBC as string

        @ChinaDRM
    * [env_prefix]_pssh_cd_ctr_b64: the PSSH box for ChinaDRM AES-CTR as base64 string
    * [env_prefix]_pssh_cd_cbc_b64: the PSSH box for ChinaDRM AES-CBC as base64 string
    * [env_prefix]_pssh_cd_ctr_hex: the PSSH box for ChinaDRM AES-CTR as hex string
    * [env_prefix]_pssh_cd_cbc_hex: the PSSH box for ChinaDRM AES-CBC as hex string
    * [env_prefix]_cpe_cd_ctr_xml: the DASH manifest content protection element for ChinaDRM AES-CTR as XML element string
    * [env_prefix]_cpe_cd_cbc_xml: the DASH manifest content protection element for ChinaDRM AES-CBC as XML element string
        * [env_prefix]_exk_cd_cbc_tag: the HLS EXT-X-KEY tag for ChinaDRM AES-CBC as string
        * [env_prefix]_exsk_cd_cbc_tag: the HLS EXT-X-SESSION-KEY tag for ChinaDRM AES-CBC as string


Example:

    {
        "parameters": {
            "environment": "{env}",
            ["key_id" : "{uuid}",]
            ["key_seed_id" : "{uuid}" [OR] "key" : "00000000-11111-3333-4444-999999999999",]
            ["env_prefix": "key",]
            "asset_id" : "{assetid}",
            ["variant_id" : "{varintid}",]
            ["iv_seed_id" : "{uuid}" [OR] "iv": "00000000-11111-3333-4444-999999999999", -- only if FairPlay is in use ]
            "stream_type" : "VIDEO_AUDIO",
            "user" : "{api::user}",
            "password" : "{password}",
            "clearkey": "false",
            "overwrite": "false"
        },
        "tool": "DRMtoday:ingest_cenc_key"
    },
Parameter Properties Default Type Choice Description
asset_id required
stream_type required 'VIDEO_AUDIO', 'VIDEO', 'AUDIO', 'SD', 'HD', 'UHD', 'UHD2'
user required
password required
environment optional PROD str 'prod', 'test', 'staging', 'PROD', 'TEST', 'STAGING'
key_id optional key_id is optional. A random key_id will be generated when none given. The key_id will be available in the environment as {[env_prefix]}_id_base64 and {[env_prefix]}_id_hex
key_seed_id optional key_seed_id is optional. A random key will be generated when neither key nor key_seed_id is given.
key optional key is optional. If key_seed_id is given a key will be generated otherwise a random key will be generated. The key will be available in the environment as {[env_prefix]}_base64 and {[env_prefix]}_hex
env_prefix optional key str
variant_id optional
iv optional iv is optional. When given, it'll be ingested along with the key. If not given, a random one will be generated.
iv_seed_id optional iv_seed_id is optional. When given, it's used to derive the actual IV. A random IV will be generated when neither iv or iv_seed_id are given.
overwrite optional false bool Enforce Keyingest by allowing overwriting existing assets.
clearkey optional false bool Keys ingested will be available in clear form, please read for further information https://fe.staging.drmtoday.com/frontend/documentation/integration/player/hlsclearkey.html#player-integration-clearkey