What's the easiest way to add internet radio station?

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
cj6666
Posts: 24
Joined: Fri Apr 24, 2009 8:01 am

What's the easiest way to add internet radio station?

Post by cj6666 »

To add stations, I usually visit shoutcast.com and click "tune in" and download .pls file. From that I can look at the ip address and port number. However, I don't know how often, the ip address would change and I would have to go to shoutcast's site again.

My question, is there someway to automate this? Or perhaps someone maintain a centralized yellow page for easy look up?

TIA
ilinux
Posts: 55
Joined: Mon Jul 06, 2009 2:36 am

Re: What's the easiest way to add internet radio station?

Post by ilinux »

Please give us the name of the radio.

Check for example if the radio have his own website so if there is post link maybe I can help you
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: What's the easiest way to add internet radio station?

Post by mightyohm »

cj6666 wrote:To add stations, I usually visit shoutcast.com and click "tune in" and download .pls file. From that I can look at the ip address and port number. However, I don't know how often, the ip address would change and I would have to go to shoutcast's site again.

My question, is there someway to automate this? Or perhaps someone maintain a centralized yellow page for easy look up?

TIA
In my experience, the IPs seldom change, but many do eventually. I usually have to fix a station once every 3-6 months. Some have never changed, and some stations will use an actual domain name instead. I usually just go in and fix them once in a while and I agree it is annoying. But only a little. :)
ilinux
Posts: 55
Joined: Mon Jul 06, 2009 2:36 am

Re: What's the easiest way to add internet radio station?

Post by ilinux »

Hi,

I'm working on pls parse script for check right ip of the server mpd start and I will also include in my firmware as ready

GIve me your radio name I will check with it ;)
cj6666
Posts: 24
Joined: Fri Apr 24, 2009 8:01 am

Re: What's the easiest way to add internet radio station?

Post by cj6666 »

For example, one station I listen to is "525 Power Tracks". On shoutcast.com, the ip and port info used to be: http://64.62.252.136:6670 (in April 23 2009) but now it is: http://64.202.98.133:2250.

And I visit 525powertracks.com, in the "listen now" section, I saw the "tune-in" button actually call this: http://live.str3am.com:2250/listen.pls

It seems, if I add "http://live.str3am.com:2250" to the mpc playlist, the address might be more permanent then using the ip address?

If the internet radio station's address changes too much, how does the WiFi radio vendors deal with it? Do someone maintain a station directory so that consumer can update station list occasionally? Or is it treated as one of the fact in life that must be tolerated?
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: What's the easiest way to add internet radio station?

Post by mightyohm »

I have a couple guesses of how "they" manage this problem:
  • They use a directory of stations vs. letting you select any arbitrary shoutcast stream. If a station changes, they change the directory. Alternatively, if you enter your own station, you may have exactly the same problem.

    Some wifi radios may be able to parse .pls files (this capability would be not too difficult to script), which, if fetched regularly, should always have the right IP address inside.
In your case, I think using http://live.str3am.com:2250/ should be fairly reliable, as this uses an actual domain name, and is also the same stream that is contained within the .pls file.

Code: Select all

[playlist]
NumberOfEntries=1
File1=http://live.str3am.com:2250/
ilinux
Posts: 55
Joined: Mon Jul 06, 2009 2:36 am

Re: What's the easiest way to add internet radio station?

Post by ilinux »

I've solved this problem yesterday. I will publish the script into my firmware and as source code as tested :D
cj6666
Posts: 24
Joined: Fri Apr 24, 2009 8:01 am

Re: What's the easiest way to add internet radio station?

Post by cj6666 »

Hi Jeff, thanks for the explanation.

Hi ilinux, is it possible for you to share the script's code? I'm most curious to see how to deal with pls. In another previous thread by sys-supd, I pick up this link: http://old.nabble.com/Play-internet-rad ... 96649.html that described an enhancement to pls also. But there's no source code and it's for Linux PC. It seems from the script, one then will be able to request an audio stream from the beginning (like a segment of news).

Thanks
ilinux
Posts: 55
Joined: Mon Jul 06, 2009 2:36 am

Re: What's the easiest way to add internet radio station?

Post by ilinux »

Hi,

Yeh I will share ;)

My script is located here: http://www.sandrofabbro.com/wrtradio/scripts/mpc_pls

To install:
wget http://www.sandrofabbro.com/wrtradio/scripts/mpc_pls -O /usr/bin/mpc_pls
chmod +x /usr/bin/mpc_pls

To use:
mpc_pls http://live.str3am.com:2250/listen.pls

It will add the File1 url to mpd.

Run it before mpc play :lol:
cj6666
Posts: 24
Joined: Fri Apr 24, 2009 8:01 am

Re: What's the easiest way to add internet radio station?

Post by cj6666 »

Much obliged, ilinux, :D
Post Reply