ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Implement encryption support for HLS

Open andudo opened this issue 12 years ago • 3 comments

METHOD=AES-128

andudo avatar Oct 03 '14 16:10 andudo

In case this could be helpful to others, I wanted to mention that I've ported the support for encrypted streams from the Dailymotion fork of ExoPlayer to the dev-hls branch from Google. The branch is available at https://github.com/perchrh/ExoPlayer/tree/dev-hls-google-crypto-support

This is the encrypted stream I've used for testing: http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes.m3u8

perchrh avatar Oct 22 '14 12:10 perchrh

@perchrh Thank you, this was helpful. We'll push our own changes very soon. BTW, In your stream I noticed that only the first chunk (TS file) has PMT in it, and all the other chunks have no PMT after PAT. This seems broken to me. Where did you get it?

andudo avatar Oct 31 '14 21:10 andudo

@andudo I found the stream in this list of test streams, http://www.jwplayer.com/html5/hls/ I'm not that into the TS format, so I cannot comment on the PMT/PAT. Quicktime plays the video too without any noticeable problems. There are, perhaps, some common encoding mistakes that players tend to work around.

Let me know if you need more encrypted test streams!

Edit: I btw noticed that my normalizeIV() method has a trivial bug, it looks for leading '0x', but it should, according to the spec, also handle '0X' (capital x) in the IV. Fixed in the mentioned branch.

perchrh avatar Nov 01 '14 09:11 perchrh