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: 
zuber
Visitor

secured m3u8 can't play with Roku but with VLC

Why Roku doesn't support secured m3u8 link? I am able to play this in VLC fine.
example...
http://*****_*********_hl-lh.akamaihd.net/i/**_****_hls_1@175738/master.m3u8?hdnea=st=1410478550~exp=1410514550~acl=/*~hmac=7ed6be672a3df528f55369b0b90b076736cce98cd2d886592f6f69133352507f&play-only=backup&jwstreamtype=hls
0 Kudos
13 REPLIES 13
RokuJoel
Binge Watcher

Re: secured m3u8 can't play with Roku but with VLC

That isn't enough information to let anyone help you troubleshoot. How are you setting up playback of the URL? Did you set the stream format to "hls"?

- Joel
0 Kudos
zuber
Visitor

Re: secured m3u8 can't play with Roku but with VLC

no I do not set the stream. I grab the stream link from other public site. I want to add this m3u8 stream to XML stream to play on Roku.
0 Kudos
RokuJoel
Binge Watcher

Re: secured m3u8 can't play with Roku but with VLC

Again, more information needed for anyone to help you here, I suggest writing longer sentences and including some excerpts from your Brightscript code, and also your XML to show what you are doing so people can help you. If there is anything specifically you don't want to share publicly then obscure that part of the code like you did in your first post.

- Joel
0 Kudos
zuber
Visitor

Re: secured m3u8 can't play with Roku but with VLC

I am using roku SDK template. I was able to successfully able to play regular m3u8 streams on my roku via this videoplayer app.

but when I try to play this secured m3u8 stream in roku it doesn't recognize it, but it works fine in VLC player.

Here is XML code.

<item sdImg="http://www.ddpunjabi.in/images/logo%20new2.png" hdImg="http://www.ddpunjabi.in/images/logo%20new2.png">
<title>Test Channel</title>
<contentId>98200</contentId>
<contentType>MUSIC</contentType>
<contentQuality>HD</contentQuality>
<streamFormat>hls</streamFormat>
<media>
<streamQuality>HD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>http://*****_*********_hl-lh.akamaihd.net/i/**_****_hls_1@175738/master.m3u8?hdnea=st=1410478550~exp=1410514550~acl=/*~hmac=7ed6be672a3df528f55369b0b90b076736cce98cd2d886592f6f69133352507f&play-only=backup&jwstreamtype=hls</streamUrl>
</media>
<synopsis>Test</synopsis>
<genres>EDU</genres>
<runtime>11260</runtime>
</item>
0 Kudos
TheEndless
Channel Surfer

Re: secured m3u8 can't play with Roku but with VLC

"zuber" wrote:
I am using roku SDK template. I was able to successfully able to play regular m3u8 streams on my roku via this videoplayer app.

but when I try to play this secured m3u8 stream in roku it doesn't recognize it, but it works fine in VLC player.

Here is XML code.

<item sdImg="http://www.ddpunjabi.in/images/logo%20new2.png" hdImg="http://www.ddpunjabi.in/images/logo%20new2.png">
<title>Test Channel</title>
<contentId>98200</contentId>
<contentType>MUSIC</contentType>
<contentQuality>HD</contentQuality>
<streamFormat>hls</streamFormat>
<media>
<streamQuality>HD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>http://*****_*********_hl-lh.akamaihd.net/i/**_****_hls_1@175738/master.m3u8?hdnea=st=1410478550~exp=1410514550~acl=/*~hmac=7ed6be672a3df528f55369b0b90b076736cce98cd2d886592f6f69133352507f&play-only=backup&jwstreamtype=hls</streamUrl>
</media>
<synopsis>Test</synopsis>
<genres>EDU</genres>
<runtime>11260</runtime>
</item>

You haven't XML encoded the URL there, so the ampersands are almost certainly causing the parsing of the XML to fail. Run the XML through an XML validator like this one: http://www.w3schools.com/xml/xml_validator.asp
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
zuber
Visitor

Re: secured m3u8 can't play with Roku but with VLC

Sorry, is this what you meant?


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed>
<!-- resultLength indicates the total number of results for this feed -->
<resultLength>3</resultLength>
<!-- endIndex indicates the number of results for this *paged* section of the feed -->
<endIndex>3</endIndex>
<item sdImg="http://www.ddpunjabi.in/images/logo%20new2.png" hdImg="http://www.ddpunjabi.in/images/logo%20new2.png">
<title>Test Channel</title>
<contentId>98200</contentId>
<contentType>MUSIC</contentType>
<contentQuality>HD</contentQuality>
<streamFormat>hls</streamFormat>
<media>
<streamQuality>HD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>http://*****_*********_hl-lh.akamaihd.net/i/**_****_hls_1@175738/master.m3u8?hdnea=st=1410478550~exp=1410514550~acl=/*~hmac=7ed6be672a3df528f55369b0b90b076736cce98cd2d886592f6f69133352507f&play-only=backup&jwstreamtype=hls</streamUrl>
</media>
<synopsis>Test</synopsis>
<genres>EDU</genres>
<runtime>11260</runtime>
</item>
</feed>
0 Kudos
TheEndless
Channel Surfer

Re: secured m3u8 can't play with Roku but with VLC

This line in your XML:
<streamUrl>http://*****_*********_hl-lh.akamaihd.net/i/**_****_hls_1@175738/master.m3u8?hdnea=st=1410478550~exp=1410514550~acl=/*~hmac=7ed6be672a3df528f55369b0b90b076736cce98cd2d886592f6f69133352507f&play-only=backup&jwstreamtype=hls</streamUrl>
should be:
<streamUrl>http://*****_*********_hl-lh.akamaihd.net/i/**_****_hls_1@175738/master.m3u8?hdnea=st=1410478550~exp=1410514550~acl=/*~hmac=7ed6be672a3df528f55369b0b90b076736cce98cd2d886592f6f69133352507f&amp;play-only=backup&amp;jwstreamtype=hls</streamUrl>
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
zuber
Visitor

Re: secured m3u8 can't play with Roku but with VLC

You are Genius ma.. can you please explain why it works this by adding amp; please ?

also if I can set aspect ratio to stretch or 16:9.

Thanks again
0 Kudos
TheEndless
Channel Surfer

Re: secured m3u8 can't play with Roku but with VLC

"zuber" wrote:
You are Genius ma.. can you please explain why it works this by adding amp; please ?

also if I can set aspect ratio to stretch or 16:9.

Thanks again

The ampersand (&) is a reserved character in XML, so anytime it's used in a value (barring CDATA, but that's a different topic) it has to be encoded as &amp;. Here's a blog post that does a decent job explaining it: http://www.microshell.com/programming/p ... ampersand/

As for changing the aspect ratio, I'm afraid that's not possible. It'd certainly be nice, but either the chipset doesn't support it, or Roku decided not to expose it for some reason.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos