Forum Discussion

dellsweig's avatar
dellsweig
Visitor
16 years ago

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

20 Replies

  • "dnelms" wrote:
    "dellsweig" wrote:
    "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....



    I was going to mention this to you, but see you already found this out. You were going to lose quality and speed because TVersity will convert your source to what it wants to in order to play. It works fine in other settings, but being able to play a file directly to a box (ie the Roku) with no transcoding (other than the hardware end) will utlmately be faster.


    Agreed - the overhead - both on the quality and the PC was not worth it.

    Now if I can only figure out how to get the Roku to play the stream generated by XMPlayer
  • Is it possible for you to use mp3 output from TVersity? I would suggest using mp3 streams for your "live" radio station and be sure to SetLoop(1) on your audio player so that the audio object isn't torn down at the end of the song.

    Note that the StreamFormat parameter must match the actual encoding ("mp3" or "wma") which is the 4th parameter in your CreateSong() function.
  • "RokuKevin" wrote:
    Is it possible for you to use mp3 output from TVersity? I would suggest using mp3 streams for your "live" radio station and be sure to SetLoop(1) on your audio player so that the audio object isn't torn down at the end of the song.

    Note that the StreamFormat parameter must match the actual encoding ("mp3" or "wma") which is the 4th parameter in your CreateSong() function.


    Kevin

    I downloaded the latest SiriusXMPlayer which supports M3U streams.

    I modified my CreateSong object with this stream

    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:51710/xm?channel=57&format=m3u","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

    Note that this URL plays FINE on my Roku Soundbridge

    When I launch the app - The log indicates no errors and the XM Player log indicates the stream is requested and serviced:

    9:37 AM: Servicing request from '192.168.1.35:60889'...
    9:37 AM: Retrieving stream URL for channel 'XM 57 - The Grateful Dead Channel'...
    9:37 AM: Retrieving M3U for channel 'XM 57 - The Grateful Dead Channel'...
    9:37 AM: Completed request from '192.168.1.35:60889'.

    Still no love.... No audio output from the App on the RokuHD

    Any ideas??
  • Is that URL actually delivering an MP3 file? What do you get if you download that same URL in a browser or via wget/curl? Note that the Roku does not support m3u files. If you say that it's an MP3 file (by passing "mp3" as the parameter to CreateSong), then the file must actually be an MP3 file, not m3u, wma or anything else.

    --Mark
  • dupondt's avatar
    dupondt
    Channel Surfer
    dellsweig,

    I downloaded the latest SiriusXMPlayer which supports M3U streams.

    M3U is not a (streaming) format like MP3, WMA, OGG Vorbis or AAC(plus), but a playlist type (see http://en.wikipedia.org/wiki/M3U). If I have understood RokuMarkn correctly the DVP is not capable of parsing such playlist files.

    Greetings
    dupondt
  • "campbellwang" wrote:
    CDNTwo supports m3u,pls and asx.


    well - when will this be available - either as a private or public offering
  • "RokuMarkn" wrote:
    Is that URL actually delivering an MP3 file? What do you get if you download that same URL in a browser or via wget/curl? Note that the Roku does not support m3u files. If you say that it's an MP3 file (by passing "mp3" as the parameter to CreateSong), then the file must actually be an MP3 file, not m3u, wma or anything else.

    --Mark


    Well I have been working with the author of the SirusXmPlayer and got the following advice:

    The Sirius and XM streams are WMA. In order to get them in an MP3 format, you'll need to have them transcoded. The easiest way to do that is probably via TVersity, since there's built in support for it in SiriusXMStreamer. To do so, just install TVersity on the same machine, and make sure the TVersity IP and port are configured in SiriusXMStreamer. You can then provide the TVersity formatted URLs to your RokuHD app, which should look similar to this: http://<yourip>:51710/xm?channel=100&tversity=mp3


    I made these changes - the new URL plays fine as an MP3 in my web browser - when I use this URL in the CreateSong function with the type set to mp3 - the Roku freezes - requiring a power restart
  • "KennyJ" wrote:
    Roku support WMA though.


    The Roku crashes when I try to play this as a WMA