RTSP Streaming Radio Address Hacking
Whats the REAL address of that radio station's stream? So you can listen directly from your audio player without having to goto the web site, open a popup with advertisments while listening.
CASE EXAMPLE #1
You select a station, such as KLIF AMHD in Dallas, TX that has the program you want to hear as streaming Internet audio.
If you have never noticed, radio station Internet web sites tend to be among the most annoying and amature web sites. After wading though popup advertisments and pictures of obnoxious morons, you find the link to the "LIVE Stream". With this site the link is fortunately on the home page.
Clicking on the link doesn't directly open the windows media player or audio player of your choice as you might expect. Intead, it opens an OBNOXIOUS TO THE EXTREME POPUP window full of nasty frames, a repeating background image of the audio player controls, banners, and advertisments. Right clicking on what appears to be the windows media player in mini mode yeilds no menu options.
- Wow, what an ugly a$$ box of bad HTML, nasty flashing banners, broken stuff, and dopey repeating background images!
How do you find the stream to access direct?
- cannot right click and view properties
- view source does not reveal the true stream source
Easy, using a tool such as tcpdump or Ethereal* for Windows.
* The Ethereal project was forced to change names in May 2006 due to trademark issues. It is now called Wireshark.
Lets do some sniffing and see what our computer is talking to while listining to the streaming audio from the obnoxious windows media player trapped in frames with advertisments browser window. Choose the correct interface, and capture a sample of about 30 seconds. It doesn't require you capture much to find what you are looking for. The less your computer is doing Internet connection wise while you do the capture the better.
Found it. "RTSP Protocol" which stands for Real Time Streaming Protocol.
The entire RTSP address does not show up on the screen. Now choose "Follow TCP Stream" - here you can actually capture and save the audio stream. A Filter is automatically created in the main window of Ethereal.
Right click, select PRINT. Choose Output To File. This will save the RTSP path along with the packet info into a text file.
Grab the RTSP path from the text file
Open Windows Media Player and enter the path... or use your alternative player such as VLAN player. Now you are listening to the audio stream directly in the native player without the obnoxious crap from the web site.
The Real Time Streaming Protocol was developed by Progressive Networks, Netscape Communications and Columbia University. RTSP provides "VCR-style" control functionality such as pause, fast forward, reverse, and absolute positioning.
In the words of the authors, "The Real-Time Streaming Protocol (RTSP) establishes and controls either a single or several time-synchronized streams of continuous media such as audio or video...In other words, RTSP acts a ``network remote control for multimedia servers."
Connecting: The client is initially supplied with an RTSP URL, on the form:
RTSP is an application-level protocol for control over the delivery of data with real-time properties. RTSP provides an extensible framework to enable controlled, on-demand delivery of real-time data, such as audio and video. Sources of data can include both live data feeds and stored clips. This protocol is intended to control multiple data delivery sessions, provide a means for choosing delivery channels such as UDP, multicast UDP and TCP, and provide a means for choosing delivery mechanisms based upon RTP.
RTSP is a text based protocol and uses the ISO 10646 character set in UTF-8 encoding. Lines are terminated by CRLF, but receivers should be prepared to also interpret CR and LF by themselves as line terminators.
CASE EXAMPLE #2
In this example RTSP does not appear in the tcp stream. Using Wireshark (formerly Ethereal) we analyze the interface traffic. Be sure to start the capture prior to clicking the link on the radio station web site that starts the audio.
It's just a matter of following the TCP Stream and looking for the URI of the media resource. In this case we are simply viewing the HTML within the packet and locating the URI. This is convenient when the "view source" option is disabled in the web browser by the site developer. They don't want you to know the direct URI, because they don't want you to bypass their advertisements.
In this example the direct URI is http://streamer3.webstream.net:80/WBCF which will cause the browser to launch Windows Media Player and go directly to the stream.