Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rcelestino
Visitor

Trying HLS+AES Encryption

Hi,

We are trying HLS with AES encryption, but we can not do it work in the Roku.

We have the encrypted media working correctly on IPOD/IPAD but in the Roku if the content is encrypted it is not working.
Our content metadata example structure is:
m.StreamBitrates=[0]
m.StreamUrls=["url_to_m3u8multibitrate_file"]
m.StreamContentIds=["ourid"]
m.StreamQualities=["HD"]
m.StreamFormat="hls"

The Variant Playlist (m3u8 multibitrate) example is:
#EXTM3U
#EXT-X-STREAM-INF: PROGRAM-ID=1, BANDWIDTH=772000, RESOLUTION=408x272
772000/enc/index_772000.m3u8
#EXT-X-STREAM-INF: PROGRAM-ID=1, BANDWIDTH=369000, RESOLUTION=216x144
369000/enc/index_369000.m3u8
#EXT-X-STREAM-INF: PROGRAM-ID=1, BANDWIDTH=64000
64000/enc/index_64000.m3u8

The Playlist (m3u8 with the segmented or chunks) example is:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-KEY:AES-128, URI="772000/enc/key.dat",IV=0x00000000000000000000000000000000
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10,no desc
772000/enc/772000.00.ts
#EXTINF:10,no desc
772000/enc/772000.01.ts
#EXTINF:10,no desc
772000/enc/772000.02.ts
...more chunks..
#EXTINF:9,no desc
772000/enc/772000.29.ts
#EXT-X-ENDLIST

Then if the content is un-encrypted it work correctly, but when we use the encryption with AES 128 CBC PKCS7 it does not work.
Url: http://tools.ietf.org/html/draft-pantos ... reaming-02

Any idea or help?

Thanks and regards.
Roberto.
0 Kudos
3 REPLIES 3
RokuMarkn
Visitor

Re: Trying HLS+AES Encryption

"rcelestino" wrote:

The Playlist (m3u8 with the segmented or chunks) example is:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-KEY:AES-128, URI="772000/enc/key.dat",IV=0x00000000000000000000000000000000
#EXT-X-MEDIA-SEQUENCE:0


The syntax for the EXT-X-KEY line doesn't look right. The "METHOD" keyword is missing. It should be

#EXT-X-KEY:METHOD=AES-128,URI="772000/enc/key.dat",IV=0x00000000000000000000000000000000


--Mark
0 Kudos
rcelestino
Visitor

Re: Trying HLS+AES Encryption

Hi Mark,
Thanks a Lot! it is working now.
We did not see that the EXT-KEY was without the "METHOD=" string as the Draft Pantos required, and as in the IPOD/AD it was working previously we did not suspect of that.

Thanks again! and regards from Argentina.
Roberto.
0 Kudos

Re: Trying HLS+AES Encryption

Hi

I have similar problem, i cant play encrypted HLS stream. Is there any other data i have to put in the playlist?
My playlist is described below.

Thanks

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:12
#EXT-X-MEDIA-SEQUENCE:1813
#EXT-X-KEY:METHOD=AES-128,URI="http://192.168.100.100/live/_definst_/testtv.stream/key.m3u8key"
#EXTINF:10.24,
media-uonk23wy4_1813.ts
#EXTINF:9.6,
media-uonk23wy4_1814.ts
#EXTINF:10.72,
media-uonk23wy4_1815.ts
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.