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

help playing stream

I have an app on my PC - XMTuner - which creates streams for my XM radio stations. I can listen to these streams with my Roku Soundbridge by giving them the path:

http://192.168.1.98:19081/streams/57/high - where 57 is the XM channel number.

I built a test app using the sample AudioApp in the SDK.

I create a poster item with the following fragment:

Category = CreatePosterItem("GD","GD","XM Radio Station")
Category.Process = DoGd
aa.PosterItems.push(Category)

and added the following BRS module:

'**********************************************************
'** Audio Player Example Application - Audio Playback
'** November 2009
'** Copyright (c) 2009 Roku Inc. All Rights Reserved.
'**********************************************************

' NPR support routines

Function CreateGdSongList() as Object
aa = CreateObject("roAssociativeArray")
aa.posteritems = CreateObject("roArray", 10, true)
song = CreateSong("GD","Live XM Radio Stream","Grateful Dead", "mp3", "http://192.168.1.98:19081/streams/57/high","http://2.bp.blogspot.com/_kFK17fWz8Ts/R5fB090pTEI/AAAAAAAAAC4/WNdywVeBQ9A/s400/grateful_dead-steal_your_face-sailfastchicago.jpg")
aa.posteritems.push(song)
return aa
End Function

Sub DoGd(from as string)
'Since there is only one item, go right into playing the XM stream
SongList = CreateGdSongList()
Show_Audio_Screen(songlist.posteritems[0], from)
End Sub


The App loads with no errors - when I select the poster to play - I get the following denug output:

posterscreen get selection typemsg = roPosterScreenEvent
------ Running ------
Entering Main
Enter PosterScreen getsel
posterscreen get selection typemsg = roPosterScreenEvent
list selected: 0
picture at:http://2.bp.blogspot.com/_kFK17fWz8Ts/R5fB090pTEI/AAAAAAAAAC4WNdywVeBQ9A/s400/grateful_dead-steal_your_face-sailfastchicago.jpg
*** ERROR: Invalid or missing PHY in path "http://192.168.1.98:19081/streams/57/high"
AudioPlayer Status Event - startup progress
AudioPlayer Status Event - startup progress
AudioPlayer Status Event - startup progress
failed to play song: 0
FullResult: End of Playlist
AudioPlayer Status Event - end of playlist
end of playlist (obsolete status msg event)

Any help as to why to App does not like the stream??

Thanks
Going where the wind don't blow so strange
0 Kudos
20 REPLIES 20
dellsweig
Visitor

Re: help playing stream

"RoadRanger" wrote:
"dellsweig" wrote:
http://192.168.1.98:19081/streams/57/high - where 57 is the XM channel number.
Try http://192.168.1.98:19081/streams/57/high/.wma
Please let us know if that works :).


OK - tried that - no audio was played.

Attached is the screen shot of the Roku debugger and the XM Streamer log showing the stream request was received



posterscreen get selection typemsg = roPosterScreenEvent
------ Running ------
Entering Main
Enter PosterScreen getsel
posterscreen get selection typemsg = roPosterScreenEvent
list selected: 0
picture at:http://2.bp.blogspot.com/_kFK17fWz8Ts/R5fB090pTEI/AAAAAAAAAC4/WNdy
BQ9A/s400/grateful_dead-steal_your_face-sailfastchicago.jpg
AudioPlayer Status Event - startup progress
AudioPlayer Status Event - startup progress
AudioPlayer Status Event - startup progress
starting song: 0
AudioPlayer Status Event - startup progress
AudioPlayer Status Event - startup progress
AudioPlayer Status Event - startup progress
AudioPlayer Status Event - startup progress
AudioPlayer Status Event - startup progress


11:04:23 Configuration Loaded
Please wait... logging in
11:04:26 Logged in as xxxxxxxx@hvc.rr.com
11:04:26 Loading channel lineup...
11:04:26 Channel lineup loaded successfully (from cache).
11:04:27 Starting server...
11:04:27 Server started
11:04:27 Listening on port 19081
11:05:33 Incoming Stream Request for XM57 - THE GRATEFUL DEAD CHANNEL
11:05:36 Incoming Stream Request for XM57 - THE GRATEFUL DEAD CHANNEL
11:10:52 Incoming Stream Request for XM57 - THE GRATEFUL DEAD CHANNEL
11:10:55 Incoming Stream Request for XM57 - THE GRATEFUL DEAD CHANNEL
Going where the wind don't blow so strange
0 Kudos
KennyJ
Roku Guru

Re: help playing stream

I have live streams that have no file extension as part of the url that work fine. In fact the NPR example included with the Sample works fine.

No idea what no PHY in path is.
0 Kudos
dellsweig
Visitor

Re: help playing stream

"KennyJ" wrote:
I have live streams that have no file extension as part of the url that work fine. In fact the NPR example included with the Sample works fine.

No idea what no PHY in path is.


Agreed - the NPR example works fine and I used the NPR BRS script to create my GD BRS script.

The stream URL plays just fine on my local network where I also have a Roku Soundbridge - I just configure the URL as a preset for the Soundbridge.

Could there be something funny in the stream format where the RokuHD cannot deal with it?
Going where the wind don't blow so strange
0 Kudos
dellsweig
Visitor

Re: help playing stream

"dellsweig" wrote:
"KennyJ" wrote:
I have live streams that have no file extension as part of the url that work fine. In fact the NPR example included with the Sample works fine.

No idea what no PHY in path is.


Agreed - the NPR example works fine and I used the NPR BRS script to create my GD BRS script.

The stream URL plays just fine on my local network where I also have a Roku Soundbridge - I just configure the URL as a preset for the Soundbridge.

Could there be something funny in the stream format where the RokuHD cannot deal with it?


JUST FIGURED IT OUT

It seems the stream output from the XM Tuner app is some form of WMA - when I set the type to WMA in the App it crashes XM Tuner when it connects.

I added the free TVersity server to convert the WMA stream to MP3 and now all works fine!!!

I think TVersity has some cool other uses too like streaming YouTube to my Roku - I will be playing with that later.
Going where the wind don't blow so strange
0 Kudos
KennyJ
Roku Guru

Re: help playing stream

"dellsweig" wrote:
"dellsweig" wrote:
"KennyJ" wrote:
I have live streams that have no file extension as part of the url that work fine. In fact the NPR example included with the Sample works fine.

No idea what no PHY in path is.


Agreed - the NPR example works fine and I used the NPR BRS script to create my GD BRS script.

The stream URL plays just fine on my local network where I also have a Roku Soundbridge - I just configure the URL as a preset for the Soundbridge.

Could there be something funny in the stream format where the RokuHD cannot deal with it?


JUST FIGURED IT OUT

It seems the stream output from the XM Tuner app is some form of WMA - when I set the type to WMA in the App it crashes XM Tuner when it connects.

I added the free TVersity server to convert the WMA stream to MP3 and now all works fine!!!

I think TVersity has some cool other uses too like streaming YouTube to my Roku - I will be playing with that later.


Cool. Let us know what you figure out.
0 Kudos
KennyJ
Roku Guru

Re: help playing stream

I downloaded TVersity and I wish I had the coding skills, because it seems like a full-fledged TVeristy channel would be possible and maybe even relatively easy.

While I haven't tried, it looks like it would be simple enough to link directly to a video or audio file. I think that's something even I could do.

What I don't understand how to do yet, is to link to RSS/XML data. TVersity provides RSS links, so I think you could potentially load a list of videos automatically as episodes, etc.
0 Kudos
KennyJ
Roku Guru

Re: help playing stream

I can't seem to get a video to stream through TVersity. I used the Simple Video example and put the TVeristy link in there and it wasn't working. I did successfully pull up the jpg on my network through TVersity though.

I had set TVersity up to transcode to WMV and tried playing a Youtube video. Not only does it not play, it reboots my Roku.
0 Kudos
dellsweig
Visitor

Re: help playing stream

"KennyJ" wrote:
I can't seem to get a video to stream through TVersity. I used the Simple Video example and put the TVeristy link in there and it wasn't working. I did successfully pull up the jpg on my network through TVersity though.

I had set TVersity up to transcode to WMV and tried playing a Youtube video. Not only does it not play, it reboots my Roku.


I just gave up on the TVersity solution.. It seems it is taking the stream from the XM player and writing the conversion to a file. When I connect to the "tversity" feed I always go to the beginning of the file - instead of the real time feed. Thee seems to be a huge amount of I/O as well - the disk light is lite up on my quad core PC and cpu is all over the place.

Well - back to square one....

The XMPlayer feed appears to be wma. Using the NPR example - when I try to connect to the stream, nothing plays.

Function CreateGdSongList() as Object
aa = CreateObject("roAssociativeArray")
aa.posteritems = CreateObject("roArray", 10, true)
song = CreateSong("GD","Live XM Radio Stream","Grateful Dead", "mp3", "http://192.168.1.98:19081/streams/57/high","http://2.bp.blogspot.com/_kFK17fWz8Ts/R5fB090pTEI/AAAAAAAAAC4/WNdywVeBQ9A/s400/grateful_dead-steal_your_face-sailfastchicago.jpg")
aa.posteritems.push(song)
return aa
End Function

When I change the 4th parameter in the CreateSong object to "wma" - the XMPlayer app crashes when the Roku connects to the stream.

Has anyone been able to play a stream from the XMPlayer App via the Roku??
Going where the wind don't blow so strange
0 Kudos
buaboo
Visitor

Re: help playing stream

I am not sure if this will help you or not, but below are a couple of threads I created which helped me better understand working with streams. In the end, I have a music stream that uses the url -- httpl//ipaddress:9000/stream.mp3 and I was able to stream that to the Roku. (Squeeze center server stream)

I hope it helps..



http://forums.roku.com/viewtopic.php?t=24545

http://forums.roku.com/viewtopic.php?t=24704
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.