Strip streams from Shoutcast.com

Basically this is how to grab the direct http address to a specific radio station in shoutcast. That way you can add it to mpc or another streaming radio player without needing a webrowser running.

First things, install the free VLC media player

Then browse to the shoutcast.com page and find the HELP drop down box.

Select SETTINGS

shoutcast01

Select the following option to play it in your own media player

  • Play SHOUTcast stations in default media player ( eg: Winamp / iTunes / Windows Media Player )

Go find a station to play and click on it. You should get the option to open the .pls file. If it doesnt open in vlc you may need to change your default programs so that vlc opens .pls files.

After vlc opens the stream, you should begin to hear the station. Go to TOOLS and open MEDIA INFORMATION.

At the bottom is the stream “location”.

copy this and paste it into your favorite music player.

mpc example:

  1. mpc add http://67.159.60.45:8030
  2. mpc play

Raspberry PI – “Headless” Streaming Radio Build

This is a compilation of various Google searches. A record of the commands i used to turn a raspberry pi model b into a streaming radio player that can be controlled by MPD apps such as the IOS app MPoD. Although these instructions end with the adding of BBC channels 1-6, you can add any stream that is compatible with MPD/MPC.

This is based off the Raspbian “Wheezy” image found here: http://www.raspberrypi.org/

The raw image and the noobs image both work fine.

This is a windows based tut so i used Win32DiskImager to write the image to my SD card.

Once you know the ip of the Raspberry, ssh into it with a program like Putty. If you use the console (screen connected to the raspberry), you will not be able to copy and paste. rc.local is configured to display the IP address on the local console every time it boots up. But you can always type IFCONFIG to find it manually.

Reconnecting with Putty: After each reboot, just click on the putty title bar and “restart”. This way you will not have to keep opening another session and repeatedly typing the IP address.

Putty into Raspberry PI

Username: pi
Password: raspberry

If you have not already done so at the console, enter sudo raspi-config to enter the initial config program

  • Expand the file system
  • Set Hostname to piradio or whatever you want
  • Change the password if you want
  • Go to the Advanced options
    • Enable SSH
    • Update tool
    • Exit to command line

Open each of the following links and copy/paste all the commands in order. Lines with # are comment lines and do not need to be run.

  1. Update and Upgrade Firmware – Some older firmwares have noise “issues” when idling.
  2. Install Audio and MPC/MPD
  3. Add BBC1-6 radio streams and MPC Play Command – or add your own

Setup your mobile device

  1. Install a free MPD app on your mobile device such as MPod on IOS or MPDroid on android. No username/password needed.
  2. If it does not automatically find the device, manually add one using the above HOSTNAME or IP address. I recommend the HOSTNAME as the current setup for IP is DHCP and your IP could possibly change.

Notes: Although it is set to automatically start, sometimes it will not. The simple solution is to just open your mobile app and wait for it to say the station is available and hit play.

If you want to control the player from CLI:

    • MPC : show stats
    • MPC play : umm play
    • MPC stop :  yeah stop
    • MPC help :

Raspberry PI – Add BBC1-6 radio streams and MPC Play Command

# Add BBC channels to MPC
mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio1_p?s=1365376033&e=1365390433&h=a0fef58c2149248d6bff1f7b7b438931
mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio2_p?s=1365376067&e=1365390467&h=d43dc8ae0f888809462a6cb7c389b46b
mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio3_p?s=1365376123&e=1365390523&h=d53cf2a92272f3289b314a2251d23bc8
mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio4_p?s=1365376126&e=1365390526&h=ed9a0642b30c422b07fbcd8683c52335
mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_5live_p?s=1365376271&e=1365390671&h=e0d82133f35ae74d41d5eab6b9c150a6

mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_6music_p?s=1365376386&e=1365390786&h=de40a9915206c4402c73e3766dc3fec0

# Start radio when pi turns on

sudo nano /etc/rc.local

#At the bottom add the following line

mpc play

ctrl-x

Y

Enter

MPC play