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

Audio .pls question

Does anyone know the trick to get streaming audio to function from a url within a .pls file ?
I setup a audio player object and can see the audio progress incrementing but no sound.
Now this is with a url without a type (.mp3), which most of these playlist have.
If the url ends with a valid type, then it plays.
0 Kudos
11 REPLIES 11
TheEndless
Channel Surfer

Re: Audio .pls question

Unfortunately, the Roku doesn't support playlist files aside from m3u8 for HLS. You'll need to programmatically retrieve the pls content and parse it yourself to build a compatible content list for the audio player.
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
greubel
Visitor

Re: Audio .pls question

Yes, I know that. When I parse the playlist, there is a url like - http://someplace.com/someaudiostream
There isn't a type on the stream filename.
0 Kudos
RokuMarkn
Visitor

Re: Audio .pls question

The filename doesn't matter. The player doesn't do anything different depending on the file extension. You must, however, set the StreamFormat to match the actual contents of the file.

--Mark
0 Kudos
TheEndless
Channel Surfer

Re: Audio .pls question

"greubel" wrote:
Yes, I know that. When I parse the playlist, there is a url like - http://someplace.com/someaudiostream
There isn't a type on the stream filename.

Sorry.. I misread the question. You may already know this, too, but if the URL is just a root URL and port (ex. http://my.shoutcast.station:8000), then you'll need to add a trailing slash (ex. http://my.shoutcast.station:8000/), otherwise the audio player will blow up. No idea why that is, but it tripped me up quite a bit at first with my shoutcast channel. The same may be true with URLs that point to a directory instead of a specific file, too, like your example, but I'm not sure.
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
greubel
Visitor

Re: Audio .pls question

Playing with the streams, the only one I can get to anything is mp3. Does aac, wma work with Roku ?

It works with mp3 BUT normally you get back about 15 "startup progress" messages that range from an index of 0 to 1000.
Once you hit 1000, it starts playing. This goes bye fairly fast, 1 or 2 seconds max.

Every once in awhile the Roku goes into mumble mode on a stream that played.
The startup messages come in with an index of 1 to 20 higher than the previous message.
So it takes a looooong time to get to a 1000. (over a minute)
But once it gets there, it starts playing.

I don't know the significance of the message index value but 1000 seems to a ready.
Also when the Roku goes into mumble mode, the only way to clear it, is to turn it off/on.
0 Kudos
TheEndless
Channel Surfer

Re: Audio .pls question

"greubel" wrote:
Playing with the streams, the only one I can get to anything is mp3. Does aac, wma work with Roku ?

Nope, just MP3 for streams.

"greubel" wrote:
It works with mp3 BUT normally you get back about 15 "startup progress" messages that range from an index of 0 to 1000.
Once you hit 1000, it starts playing. This goes bye fairly fast, 1 or 2 seconds max.

Every once in awhile the Roku goes into mumble mode on a stream that played.
The startup messages come in with an index of 1 to 20 higher than the previous message.
So it takes a looooong time to get to a 1000. (over a minute)
But once it gets there, it starts playing.

I don't know the significance of the message index value but 1000 seems to a ready.
Also when the Roku goes into mumble mode, the only way to clear it, is to turn it off/on.

Startup progress is buffering. GetIndex() / 10 gives you the buffer percentage. I get the same results you're seeing with Shoutcast streams, with slower buffering the more stations you play. I haven't seen the "mumble mode" you're talking about, though. Have you noticed any similarity with the streams you're seeing this on? Maybe it's a really low bitrate stream or something?
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
greubel
Visitor

Re: Audio .pls question

Thanks for letting me know that mp3 is it !
Have you noticed any similarity with the streams you're seeing this on? Maybe it's a really low bitrate stream or something?


I can have a playlist that plays fine, starts right up. I can switch between streams in the playlist, forward and previous, no problem.
Then it goes into this "mode" and without leaving the playlist, streams will take over a minute to start or change between the streams.
I can get out of the channel, go back and the "mode" continues. The only way to clear it, is power off.

Is it possible that the Roku forgets to close down a stream and keeps buffering ?
0 Kudos
greubel
Visitor

Re: Audio .pls question

Anyone know of anything I can use to monitor the traffic data going through a router ?
I would like to verify that the Roku isn't leaving a stream up when it goes into "mumble" mode.
0 Kudos
kbenson
Visitor

Re: Audio .pls question

"greubel" wrote:
Anyone know of anything I can use to monitor the traffic data going through a router ?
I would like to verify that the Roku isn't leaving a stream up when it goes into "mumble" mode.


That would really depend on the router. If it's a wireless connection to the Roku, you might have some luck eavesdropping through some standard security tools, but it's been a long time since I really looked into that. Assuming once you are authenticated on the same wireless network you can see all the traffic (?), wireshark should be more than enough tool to tell you what's going on, and actually deconstruct the HTTP packets, provided it's not HTTPS.
-- GandK Labs
Check out Reversi! in the channel store!
0 Kudos