Help regarding playing radio stream

To play a stream from a server that operates an internet radio station, is the url to have mp3 on the end?

I have a stream that was provided to me but it has the server address as an ip with 8000 on the end.

As long as it’s an MP3 stream it doesn’t matter what the URL is.

Be sure to add a trailing slash to the URL. For some reason, the audio player doesn’t like mp3 streams that end in a port number unless the have a trailing slash (e.g., http://my.radio.url:8000/)

Oh…

Thank you The Endless. Will try it.

The radio stream so far is not working. (It’s a radio station that is on shoutcast and I have permission to add it.) I have been trying the following:

<item sdImg="http://xxxxx.net/xxx/images/xxxx.jpg" hdImg="http://xxxx.net/xxx/images/xxxx.jpg">
<title>xxxxxxx</title>
<contentId>10031</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<media>
<streamFormat>mp3</streamFormat>
<streamQuality>SD</streamQuality>
<streamBitrate></streamBitrate>
<streamUrl>
http://xxx.xx.xx:8000/
</streamUrl>
</media>
<synopsis>
LIVE Radio stream from xxxxxxx.
</synopsis>
<genres>Music</genres>
<runtime>1790</runtime>
</item>

Any tips on what the problem might be or where I should look for more information on this type of code?

Thanks in advance.

I assume in your actual streamUrl value, you have something after the last slash? The top level directory of a web site isn’t likely to be an mp3 file.

–Mark

The url is like http://17x.xxx.17x.5x:8000/

all numbers with the / at the end

That doesn’t sound right. You’re saying the website contains nothing but one mp3 file? And the root directory of the web site redirects to that file? I think you’re missing something in the URL. I would think it should at least look like http://17x.xxx.17x.5x:8000/yyyy.mp3.

If you enter that URL in your browser, what happens? Do you go to a web site or does it just start playing an mp3 file? If the former, then your URL is incomplete.

–Mark

“RokuMarkn” wrote:
That doesn’t sound right. You’re saying the website contains nothing but one mp3 file? And the root directory of the web site redirects to that file? I think you’re missing something in the URL. I would think it should at least look like http://17x.xxx.17x.5x:8000/yyyy.mp3.

If you enter that URL in your browser, what happens? Do you go to a web site or does it just start playing an mp3 file? If the former, then your URL is incomplete.

–Mark
Mark, that’s normal for a SHOUTcast stream. In this instance, the url is pointing to a SHOUTcast server, not a website.

newchannel, based on the XML posted, it looks like you might be trying to use the video format for your content. Are you parsing that and passing it to an roAudioPlayer component, or are you trying to use the same code you use for video? The latter is unlikely to work.

I pasted it into the browser. Takes me to a page for the info about the shoutcast station. If I add listen.pls after the 8000/ then it loads and plays the stream on the computer.

TheEndless,

It’s added to the same code I’ve been using for other videos and just changed the streamformat and url…so looks like I need to make some changes. Any tips?

“newchannel” wrote:
TheEndless,

It’s added to the same code I’ve been using for other videos and just changed the streamformat and url…so looks like I need to make some changes. Any tips?
This example might help.. viewtopic.php?f=34&t=50618&p=343513#p343513

TheEndless,

Thank you for the link to thread.

If I understand correctly:

  1. copy the simpleposter
  2. rename the simpleposter as simpleaudio
  3. edit the source brs file by copying the code from the thread and pasting it into the brs file. Do I take out all of the information in the original simpleposter brs file and then paste the provided code?
  4. plug-in the station info ie: streams etc
  5. add this to the zipped file already built for the channel and sideload to test.

Best Regards.

It would be good to have an external xml to manage too.

Right …being able to make changes from xml and not just brs file for adding or deleting channels works best.

I would certainly like to get this radio stream to work. Trying to piece it together with code when not a coding person is difficult. I am about ready to submit for the first phase of the channel but getting the radio stream to work is the holdup.

I have a category of “live radio” while the rest of my categories are all video related. Does anyone have coding to share to make the a shoutcast radio stream to play in a category? Feel free to PM is you prefer.

Thank you.

It has been brought to my attention that the stream I have been trying to play is aac and not mp3. Apparently a change was made in the configuration on the server side. Working on having this changed back to mp3.

Provided it goes back to being a shoutcast mp3 radio stream, what is the best way to get it added to the channel? If audio is one category and the rest of my cateogories are all for video, can my zipped channel folder have both audioplayer and videoplayer? Where do I find out how to add the audioplayer without messing up what I have already built?

I have a zipped copy of audioapp that I tested on my device playing a live radio stream.

When my channel opens I have categories and for one of these categories it is called “live radio”. I want a viewer to click the live radio and then click the radio station name in the feed and then click play. Right now I have one radio stream listed in the feed. Later I may add more after I get this one to work properly.

My channel is built using the videoplayer example. My thinking is I need to somehow reference that it is audio instead of video but where to do I do this and how? And in the xml for the radio feed, right now it is setup like the video xml. I realize that may not work and that I will need to change the xml for the radio.

Any help on this would be great. I’m trying to learn this so I can get my channel submitted. The radio is the one thing that is holding me up from submitting. I have more plans for the channel but right now it’s just getting a basic channel submitted that has categories with audio and one category with a live radio stream

Thank you!

Thank you Bandal for the help on the radio stream.

RokuJoel also thank you for coding you sent me recently.

The radio stream is playing great!

Always nice when you can meet up with those that are willing to help get things working smoothly.

newchannel,

Thanks for the input.

DA

Hello, I think I am in the same situation newchannel was some time ago, I was trying to figure out what was the solution but, I still can not, I am using the videoplayer example, with two categories, one for video and the other one for audio (or Radio streaming), the video streaming is working fine, is the audio part witch I need help with, I tried just to change the parameters in one of the .xml files referenced from categories.xml with no success.

so how and where do I reference the audioplayer, to be able to play the mp3 stream, and where you guys able to make an xml to change the streame link in case I got a new stream provider?, thanks in advance, I have been holding to summit the channel for approval since the audio part is key.

Thanls again.

“john.h.e” wrote:
Hello, I think I am in the same situation newchannel was some time ago, I was trying to figure out what was the solution but, I still can not, I am using the videoplayer example, with two categories, one for video and the other one for audio (or Radio streaming), the video streaming is working fine, is the audio part witch I need help with, I tried just to change the parameters in one of the .xml files referenced from categories.xml with no success.

so how and where do I reference the audioplayer, to be able to play the mp3 stream, and where you guys able to make an xml to change the streame link in case I got a new stream provider?, thanks in advance, I have been holding to summit the channel for approval since the audio part is key.

Thanls again.
This might be what you’re looking for: http://forums.roku.com/viewtopic.php?f=34&t=51192&start=0