Widevine only provided a 64 characters key
and 32 character iv
. If that is the case, what is the key
to be put in encryption[0].key
?
Full error message: Secret config field config.encryption[0].key is invalid, expected a valid 128-bit hexadecimal string of length 32.
Google cloud video transcoder doc
Detail of each field in encryptionKeys
{
"encryptionKeys": [
{
// Key for Widevine configurations.
"keyId": "44ec248b048c43a6a6ee58a752c6f9f8",
"key": "f1967daca83e81f38d80aa741e7b32c2",
"keyUri": "skd://44ec248b048c43a6a6ee58a752c6f9f8",
"matchers": [
{
"muxStreams": [
"fmp4_widevine_cenc_video",
"fmp4_widevine_cenc_audio",
"fmp4_widevine_cbcs_video",
"fmp4_widevine_cbcs_audio"
]
}
]
},
]
Widevine only provided a 64 characters key
and 32 character iv
. If that is the case, what is the key
to be put in encryption[0].key
?
Full error message: Secret config field config.encryption[0].key is invalid, expected a valid 128-bit hexadecimal string of length 32.
Google cloud video transcoder doc
Detail of each field in encryptionKeys
{
"encryptionKeys": [
{
// Key for Widevine configurations.
"keyId": "44ec248b048c43a6a6ee58a752c6f9f8",
"key": "f1967daca83e81f38d80aa741e7b32c2",
"keyUri": "skd://44ec248b048c43a6a6ee58a752c6f9f8",
"matchers": [
{
"muxStreams": [
"fmp4_widevine_cenc_video",
"fmp4_widevine_cenc_audio",
"fmp4_widevine_cbcs_video",
"fmp4_widevine_cbcs_audio"
]
}
]
},
]
Share
Improve this question
edited 2 days ago
HNG
asked Feb 18 at 4:21
HNGHNG
3331 gold badge3 silver badges19 bronze badges
1
- Hi @HNG, I have posted an answer, if you find it helpful, please do consider upvoting and accepting it as per stackoverflow guidelines helping more Stack contributors with their research. If not, let me know so that I can improve my answer. – Sourav Dutta Commented 2 days ago
1 Answer
Reset to default 0The error you are getting because Google Cloud Video Transcoder only accepts 128-bit keys for the encryption[0].key
field , However Widevine provided both 128-bit (16-byte) and 256-bit (32-byte) encryption keys .
- So,if somehow Widevine send 256 bits key , you have to convert it to 128 bit. For that
you can use Python snippet to truncate a 256-bit key to 128-bit , or you can contact widevine support
so that it only sends 128 bit key encryption .
There is an extra comma in your JSON Structure , at the end of 2nd bracket {
(last 2nd line) - which can make it invalid syntax .