Jan 29

Stream your favorite radio station to your workplace

I want to suggest a trick that worked for me. My work place blocks most of the popular radio stations stream sites in my country.
I can understand why they're doing that, but hey – if you want to save bandwidth I suggest you block YouTube (not that I complain…)
Well, I thought of a way to listen to my favorite radio station from work, by re-streaming it from my home. And it worked!

It can also work for you, in case your IT does not block by protocol, only by address.

So here's how to do it:

STEP 1 – Retrieve the actual link for your radio station

Go to the station's website and try to get a link that you can play in Windows Media Center.
Some stations will let you find it, others won't.
If this is the case, here's what you need to do (At home!)

  1. Download wireshark and install it
  2. Start capturing using this filter: rtsp.request
  3. Try to listen to the station
  4. You should see such an output in wireshark:

    As you can see, there is a url here that looks like this:
    rtsp://someurl/somefile RTSP/1.0

  5. Take this URL, and replace RTSP with MMS and omit the RTSP/1.0 ending.
    Your URL should look like this: mms://someurl.somefile
  6. Try to play this URK in windows media player. If it works – you're half way through

If you can get the link in any other way, it's fine… This is only a suggestion


STEP 2 – Set up VLC as a stream server at your home

I will start with an apology. I didn't find a proper way to do it with the GUI of version 1.0+.
On the past versions it was relatively clear, so that's where I managed to find the command line you need to run in order for it to work
So, at this point, you need to run VLC on your PC with these parameters:

vlc mms://yourserver/yourlink :sout=#transcode{acodec=mp3,ab=64,channels=2}:duplicate{dst=std{access=mmsh,mux=asfh,dst=:8080}}

This will stream the web-radio station to port 8080.
You can test this using Windows Media Player, just open it up, and open the url mms://localhost:8080

Another thing you need to keep in mind, is that you should establish port forwarding if you are behind NAT.

 That's the whole deal… Of course you can improve it by creating a script that will run it, or add the http interface of VLC to remote control it on another port, but I don't want to overload this guide…

keep it simple!

  • http://www.revivo.co.il Avi Revivo

    Everything is blocked in my company as well as you know :) Thanks for the tutorial!