Wowza Community

Problem with On-The-Fly PlayReady Encryption

Hi,

I’ ve read the following article:

How to secure smooth streaming using PlayReady DRM (Silverlight)

and did follow the steps in it, but I got stuck playing video.

Using Wowza Media Server 3, I tried both the key file way and server-api way, but I always got an error message on wowza server saying “PlayReadyEncryptor.encryptChunkCTR: java.lang.NullPointerException”, and stuck in a “media error 3192” message when trying to play with Silverlight player.

I logged some messages at license server(PlayReady) and it showed that the license issuing functions correctly.

Are there anything I missed?

Any suggestions?

Thanks in advance,

Weichung

Any one? Please help~

Is smooth streaming enabled? You have to add “smoothstreamingpacketizer” to the Application.xml /LiveStreamPacketizers

Find that line in the access log, then look above it to see what was happening just before.

Richard

weichung,

If you are doing live streaming, make the StreamType “live”.

If you are doing video on demand (vod) streaming, use StreamType “default” and make the LiveStreamPacketizers emtpy.

Richard

I’m not sure what this is. Does this video play in Silverlight smooth player without encryption?

What version of Wowza are you using? What player? Have you tested using Wowza example players?

Richard

Is it a particular file? Have you tried Wowza sample.mp4?

Detail the steps you have taken so that I can follow and reproduce.

Richard

A thought suddenly comes to my mind. Can content-id and checksum of single random ismv file be used in key to apply to all?

Should I pre-encrypt each video into ismv, then get the content-id and the checksum from its WRMHeader,

finally use these elements in the key file to do on-the-fly encryption?

I don’t know, have you tried that?

Richard

hi Richard,

I’m streaming vod using “default” StreamType, enabling smoothstreamingpacketizer leads to errors on server reboot.

Is on-the-fly mechanism only for live streaming? or should I do any further settings in configuration?

Thanks,

weichung

hi Richard,

Currently I’m streaming vod, so I use StreamType “default” and left LiveStreamPacketizers empty. This is the original setting I use when the error situation occured.

Thanks for answering,

weichung

Yes, the video plays without encryption both in example player and a self-developed testing player.

When it’s protected by on-the-fly encryption, error occurs in both of the players as well.

I’m using Wowza 3.1.2.

Everything works fine when I pre-encrypted the video into ismv.

weichung

sorry for missing details.

I’ve tried several different video files, including sample.mp4.

All videos are placed directly under /content, and corresponding .key file directly under /keys, no sub-directories.

Key file contains all five elements and five elements only: key-id, license-url, content-id, checksum, and algorithm.

Content-id, checksum and algorithm are extracted from WRMHeader of a random pre-encrypted ismv.

Key file is saved from .txt file to .key file in ANSI encoding, other encoding seem to disable the key.

Then I played the video with url like: http://localhost/vod/sample.mp4/Manifest

A thought suddenly comes to my mind. Can content-id and checksum of single random ismv file be used in key to apply to all?

Should I pre-encrypt each video into ismv, then get the content-id and the checksum from its WRMHeader,

finally use these elements in the key file to do on-the-fly encryption?

weichung

Hi Richard,

I just tried playing two ismv files which were pre-encrypted by same key-seed and key-id. The WRMHeader info showed that they have identical content-id and checksum.

It seems like one key pair generates only one group of key infos for on-the-fly encryption. So one .key file is applicable for all ismv as long as they are encrypted by the same key pair.

weichung

I just found out where the problem might be, but still confused about why.

The data of tag in the manifest of on-the-fly encrypted video is different from it of pre-encrypted ismv, and I’m certain that I used same key id for both.

So, it might be something wrong with the info I used in the key file for on-the-fly encryption.

I’m still trying to figure it out.

Anyone have succeeded on-the-fly encryption?

Please advise.

weichung

I found 2 issues with this Feature:

  • It doesn’t work with smil files even if i create all the key files for each mp4 profile. As stated before. If i request the mp4 file alone it comes with the Protection Header.

  • When Protection Header comes it doesn’t have a Base64 structure even with all 5 parameters.

Can anyone help? Using 4.0.3 Server.

I’m trying to stream VOD with PlayReady DRM. I have the 4 mp4 files corresponding to the 4 profiles in the smil.