简体   繁体   中英

How do I create CENC-encrypted xml file for mp4box?

Where the XML file specifies clearKey encryption. It's taken from GPAC's website https://gpac.wp.mines-telecom.fr/mp4box/encryption/common-encryption/

But Don't know how to create this xml file and where i get cipherkey, systemId, cipherIV, BS ID128, Key KID and value? I try to create this file manually but I'm not able to create. Beacause I'm confused where i get all value and how to used those value?

I try to create manually xml file for mp4box and know that clear concept

The PSSH SystemID comes from the DRM vendor. Here are some examples for DRM vendors:

  • Fairplay (Apple)
  • Widevine (Google)
  • PlayReady (Microsoft)
  • clear' DRM System (GPAC)

Some of the vendors will provide you with keys and key IDs others will let you create your own keys and key IDs. You have to follow the vendors instructions.

You can use openSSL to generate keys. For example:

$ openssl rand -hex 16
ecd0d06eaf884d8226c33928e87efa33

GPAC 'clear' DRM is only for system testing since the secrete key is embedded in clear text.

  • cipherkey or key is the encryption key. Generate your own or get from DRM vendor
  • systemId is basically an identifier for the DRM system - just like a name
  • cipherIV is the initialization vector which is a random number to provide a random initial state of the encryption process for security purpose - you choose the initialization vector use openSSL.
  • key identifier (KID) is used to retrieve a certain key when a commercial DRM system is used
  • BS ID128 - indicates a binary object of 128 bits expressed in 16 bytes hex

For 'clear' GPAC use the sample XML file and change IV, keys and KIDs. For all other DRM vendors follow their instructions for getting systemID, keys and KIDs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM