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

M3U8 streamUrl(s) with QueryStrings causing parse failure

I'm getting "Can't parse feed" errors when trying to provide streamUrls with query strings. Are these not supported? Here's a sample of my m3u8 url.

http://127.0.0.1:8000/abcde78ea80e4afb8 ... ca77e323ac

And without the protocol prefix...

192.168.1.118:8000/abcde78ea80e4afb8f86d935153bb182.m3u8?iph=abcde7c58f8365fbafd7cc4d47d23dff99d4b393e070801c2e125336755e1b78&oid=abcde9e9198f4b16b927c8a5abe3fd5c&cid=abcde78ea80e4afb8f86d935153bb182&exp=1336757011&ct=a&sig=abcde0fc639ac464b6f520632f40c2c2f872a8806e6e953455db9cca77e323ac

We use the query string for token auth, etc. The server is hosted locally on my machine, hence the localhost IP. When the query string is removed the feed parses fine and my channel roPosterScreen is populated as expected.
upLynk
http://uplynk.com
One encode. Many devices.
tyler+roku at uplynk dot com
0 Kudos
6 REPLIES 6
RokuJoel
Binge Watcher

Re: M3U8 streamUrl(s) with QueryStrings causing parse failur

Your server needs to replace the & with &

- Joel
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: M3U8 streamUrl(s) with QueryStrings causing parse failur

Joel is right. And more generally, any XML consumed by your channel must be valid and well formed. This tool is pretty good for validating XML: http://www.w3schools.com/xml/xml_validator.asp
0 Kudos
tbye
Visitor

Re: M3U8 streamUrl(s) with QueryStrings causing parse failur

Ahh, of course. Thanks!
upLynk
http://uplynk.com
One encode. Many devices.
tyler+roku at uplynk dot com
0 Kudos
TheEndless
Channel Surfer

Re: M3U8 streamUrl(s) with QueryStrings causing parse failur

If XML escaping the value is more of a hassle than you'd like, you can also wrap the value in a CDATA tag, so it doesn't require escaping..

Example:
<url><![CDATA[http://127.0.0.1:8000/my?url=with&ampersands=true]]></url>
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
tbye
Visitor

Re: M3U8 streamUrl(s) with QueryStrings causing parse failur

Thanks for the response endless. Escaping wasn't a big deal at all.

It does appear I'm not out of the woods yet. My newly escaped URLs now of the format...

http://192.168.1.118:8000/abcde78ea80e4 ... f62c910e67

are now throwing a new error. Here's what I believe is the relevant snippet from the debugger output.


showHomeScreen | msg = | index = 0
showHomeScreen | msg = | index = 24
showHomeScreen | msg = | index = 23
showHomeScreen | msg = | index = 23
showHomeScreen | msg = The format is not supported or the media is corrupt. | index = -5
Video request failure: -5 1
showHomeScreen | msg = | index = 0


I'm thinking it's still looking for valid file extensions for the media, or something along those lines. In my case I think it's looking for the .m3u8 to be on the end. My streams that do not require these tokens and consequently do not include query strings playback great, so I know my problem has to do with these query strings.
upLynk
http://uplynk.com
One encode. Many devices.
tyler+roku at uplynk dot com
0 Kudos
RokuJoel
Binge Watcher

Re: M3U8 streamUrl(s) with QueryStrings causing parse failur

What happens if you setup an roURLTransfer and use gettofile() to download the .m3u8 to tmp:/

Do you get the file you expect to get?

- Joel
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.