Skip to main content

Encryption

NameTypeDescription
idstringEncryption id, used for referencing encryptions
enabledbooleanEnable or disable encryption.
schemaenum                          
aes-128-cbc
sample-aes
mpeg-cenc
mpeg-cbc1
mpeg-cens
mpeg-cbcs
none
The chosen encryption schema. Encryption keys will be generated by Hybrik.
default: aes-128-cbc
drmarray enum                          
playready
fairplay
widevine
clearkey
An array specifying the types of DRM that will be used.
rotationinteger
The encryption rotation interval. Every N file segments, a new encryption key will be generated.
default: 12
external_key_filebooleanUse the externally created key file with path from key_location. Do not store key file.
key_locationobjectThe optional key location. This will override any location defined within the parent of this task.
key_file_patternstring
This describes the key file name. Placeholders such as {source_basename} for source file name are supported.
keystringThe actual key, if pre-supplied.
ivstringThe initialization vector, if pre-supplied.
key_idstringThe Key ID. Used for MPEG-CENC only.
key_seedstringThe Key seed.
content_idstringThe Content ID. Used for MPEG-CENC only.
widevine_providerstringThe Widevine provider.
widevine_psshstringA Widevine PSSH string.
playready_urlstringThe PlayReady licensing authority URL.
playready_psshstringA PlayReady PSSH string.
playready_versionenum                          
4.0
4.1
4.2
4.3
The PlayReady version.
fairplay_uristringThe FairPlay URI for the HSL URI attribute.
clearkey_pssh_versionintegerThe PSSH box version for CENC.

Example encryption

{
"uid": "transcode_task",
"kind": "transcode",
"payload": {
"location": {
"storage_provider": "s3",
"path": "s3://my_bucket/my_folder"
},
"targets": [
{
"file_pattern": "{source_basename}_output.{default_extension}",
"existing_files": "replace",
"container": {
"kind": "mp4",
"encryption": {
"enabled": true,
"schema": "mpeg-cenc",
"drm": [
"playready"
],
"key_id": "[32 char hex sequence]",
"key": "[32 char hex sequence]",
"playready_pssh": "[base-64 encoded pssh]...=="
}
},
"video": {
"codec": "h264",
"bitrate_mode": "vbr",
"bitrate_kb": 1000,
"max_bitrate_kb": 1200,
"profile": "main",
"level": "4.0",
"height": 720
},
"audio": [
{
"codec": "aac",
"channels": 2,
"sample_rate": 48000,
"sample_size": 16,
"bitrate_kb": 128
}
]
}
]
}
}