Issue with HLS AES encrypted on DVR playback

Hello,

We followed the procedure in https://www.wowza.com/docs/how-to-test-aes-encryption-for-apple-hls-streams but at the point 9, we succeeded in video chunk reading contrary to what it was expected.
With our Wowza-DVR, we created a video without encryption (cupertinoEncryptionAPIBased to false) and we want to read it with a HLS encryption.
For the tests, we are reading video with VLC (type = httpstreamer).
What did we miss?

A few complementary informations:

  • We see in our logs that we see just one time in onHTTPCupertinoEncryptionKeyLiveChunk that we override (IModuleOnHTTPCupertinoEncryption interface). So, the CupertinoEncInfo is set only once.
  • On VLC Message side, we noticed that the decode URL is never called.
  • In our Wowza-dvr Application.xml, we have:
<StreamType>live</StreamType>

<Property>
   <Name>cupertinoEncryptionAPIBased</Name>
   <Value>true</Value>
   <Type>Boolean</Type>
</Property>

Example of our Java logs when reading the video :

2019-05-15 08:43:47,429 | TRACE | RecordModule  | 
Service[RecordApplication] resolvePlayAlias IHTTPStreamerSession > 
IHTTPStreamerSession [HTTPStreamerSessionCupertino]
2019-05-15 
08:43:47,429 | DEBUG | RecordModule  | Service[RecordApplication] 
resolvePlayAlias [LMiy7MBOadaPsl5fxLEMvXJQeqeq] -> [dvrVideoTest-01]

2019-05-15 08:43:47,473 | DEBUG | RecordModule  | Service[RecordApplication] onStreamCreate [] type = httpstreamer
2019-05-15 08:43:47,473 | INFO  | _definst_  | null
2019-05-15 08:43:47,474 | INFO  | _definst_  | null
2019-05-15 08:43:47,474 | INFO  | _definst_  | DvrStreamManagerBase.init archiveStrategy=append
2019-05-15
 08:43:47,474 | INFO  | _definst_  | 
DvrStreamManagerBase.initProperties[RecordApplication/_definst_/dvrVideoTest-01]
 : {Properties: mpegdashPlaylistChunkCount: 3, 
smoothFragmentTargetAudioDuration: 1000, cupertinoPlaylistChunkCount: 3,
 startRecordingOnStartup: true, mpegdashRepeaterChunkCount: 3, 
mpegdashMaxChunkCount: 5, dvrEncryptionSharedSecret: "AGoodSecret", 
mpegdashChunkDurationTarget: 1000, isDvrPacketizer: true, 
cupertinoMaxChunkCount: 6, cupertinoChunkDurationTarget: 2000, 
cupertinoRepeaterChunkCount: 3, cupertinoEncryptionAPIBased: true}

2019-05-15
 08:43:47,474 | DEBUG | RecordModule  | Service[RecordApplication] 
onHTTPCupertinoEncryptionKeyLiveChunk dvrVideoTest-01
2019-05-15 
08:43:47,475 | INFO  | HLSEncryptionHandler  | 
Service[HLSEncryptionHandler DVR] onHTTPCupertinoEncryptionKeyLiveChunk 
dvrVideoTest-01
2019-05-15 08:43:47,475 | DEBUG | 
HLSEncryptionHandler  | Service[HLSEncryptionHandler DVR] 
[setEncryptionAES] sessionId calculated for dvrVideoTest-01
2019-05-15
 08:43:47,475 | DEBUG | HLSEncryptionHandler  | 
Service[HLSEncryptionHandler DVR] [setEncryptionAES] generated key = 
97b472683f2371b2fa57fb7784651a45, 
https://10.46.46.69:8191/decoderecords?sessionId=b3BEc3pxdXBPcERzei4xMg==
2019-05-15
 08:43:47,475 | DEBUG | HLSEncryptionHandler  | 
Service[HLSEncryptionHandler DVR] [setEncryptionAES] generated HEX key =
 [-105, -76, 114, 104, 63, 35, 113, -78, -6, 87, -5, 119, -124, 101, 26,
 69]

2019-05-15 08:43:47,476 | INFO  | _definst_  | 
DvrStreamManagerBase.init[RecordApplication/_definst_/dvrVideoTest-01]: 
Encrypt Cupertino stream: key: *1a45 url: 
https://10.46.46.69:8191/decoderecords?sessionId=b3BEc3pxdXBPcERzei4xMg==
2019-05-15
 08:43:47,477 | INFO  | _definst_  | 
DvrStreamManagerBase.initStorage[RecordApplication/_definst_/dvrVideoTest-01]
 : storeName:dvrfilestorage isRecorder:true hasStorage:true
2019-05-15
 08:43:47,479 | INFO  | _definst_  | 
DvrStreamStoreBase.initProperties[RecordApplication/_definst_/dvrVideoTest-01/dvrVideoTest-01.0]
 : properties:
[dvrWindowDuration:0, dvrChunkGroupingSeconds:600, 
dvrAllowableAVPacketDelta:2000, dvrResetTimePacketDelta:200, 
dvrPacketDeltaToNotify:200]
2019-05-15 08:43:47,479 | INFO  | 
_definst_  | 
DvrStreamStoreBase.ReadCache[RecordApplication/_definst_/dvrVideoTest-01]
 DISABLED
2019-05-15 08:43:47,484 | INFO  | _definst_  | 
MediaStreamMap.getLiveStreamPacketizer[RecordApplication/_definst_/dvrVideoTest-01]:
 Create live stream packetizer: dvrstreamingpacketizer:dvrVideoTest-01
2019-05-15 08:43:47,485 | INFO  | _definst_  | null

2019-05-15
 08:44:21,607 | DEBUG | RecordModule  | Service[RecordApplication] 
onStreamDestroy [dvrVideoTest-01] type = httpstreamer

2019-05-15 
08:48:47,575 | INFO  | _Server_  | DvrStreamManagerBase 
[RecordApplication/_definst_/dvrVideoTest-01] : Timeout occurred.  
Destroying DVR recorder.
2019-05-15 08:48:47,575 | INFO  | _Server_  |
 DvrStreamManagerBase [RecordApplication/_definst_/dvrVideoTest-01] : 
Timeout occurred.  Destroying DVR packetizer.
2019-05-15 08:48:47,575 | INFO  | _Server_  | DvrStreamManagerBase.shutdown[RecordApplication/_definst_/dvrVideoTest-01]
2019-05-15
 08:48:47,576 | INFO  | _Server_  | 
DvrStreamManagerBase.removeStreamStore[RecordApplication/_definst_/dvrVideoTest-01]
 : stream:{DvrStreamStoreBase streamName:dvrVideoTest-01.0 isLoaded:true
 canPlay:true canRecord:true hasEncryption:false isLive:false 
isRecording:false isRecordingPaused:false props:{Properties: 
mpegdashPlaylistChunkCount: 3, smoothFragmentTargetAudioDuration: 1000, 
cupertinoPlaylistChunkCount: 3, startRecordingOnStartup: true, 
mpegdashRepeaterChunkCount: 3, mpegdashMaxChunkCount: 5, 
dvrEncryptionSharedSecret: "AGoodSecret", mpegdashChunkDurationTarget: 
1000, isDvrPacketizer: true, cupertinoMaxChunkCount: 6, 
cupertinoChunkDurationTarget: 2000, cupertinoRepeaterChunkCount: 3, 
cupertinoEncryptionAPIBased: true}].
2019-05-15 08:48:47,576 | INFO  |
 _Server_  | 
MediaStreamMap.removeLiveStreamPacketizer[RecordApplication/_definst_/dvrVideoTest-01]:
 Destroy live stream packetizer: dvrstreamingpacketizer

Thank you for your help,
Regards,
Chloe

Hi @Chloe Gouteron, sorry for the delayed response, I was out of the office. This is interesting and thanks for sharing what you have tried and what the logs showed.

Did you get a final solution for your support ticket 320629?

I spoke with our engineers and they would like to view all the logs and files to run some tests.They can only do this through a support ticket however and you can submit it here:

https://www.wowza.com/support/open-ticket

But, I see you submitted one for something similar. Please let me know. Thanks.