Listen to iheartradio without Flash


If you have ever listened to any Clear Channel FM radio station then I am sure you have heard the ads to listen to the station online through iheartradio. The only problem is that iheartradio is a bulky and slow flash application. On a powerful desktop that isn’t a huge issue, but with my N900 (600mhz cpu, 256MB Ram) it takes over 5 minutes to start streaming the radio station. Of course, iheartradio has an application for the iPod and Blackberry, but no app for the N900.

I went on a quest to figure out how to listen to iheartradio without the bulky flash application and this is what I found.

Step 1:

The url of the a stations stream is can be found in a XML file, at URL “”

If I want to listen to The Fox (call letters: WTFX-FM), the URL of the XML would be “”

Open up the url in a web browser and grab the rtmp url which is between the <stream> tags. rtmp://

Step 2:

Download and Install rtmpdump and mplayer

  • Use your distro’s repositories
  • rtmpdump is in AUR (archlinux)

Step 3:

Lastly open up the terminal and enter the following command: rtmpdump -r $RTMPURL -v | mplayer -

-r tells rtmpdump the url of the stream

-v tells rtmpdump that the stream is a live stream

The | (pipe) directs stdin to mplayer and the – after mplayer tells mplayer to read data from stdin

Example: rtmpdump -r "rtmp://" -v | mplayer -

Things to watch out for:

  • The RTMP url may change/expire. I have not been able to confirm this yet, but if the RTMP url changes you will simply need to open the url of the xml file (step 1) and copy the new rtmp url


Maybe when I get some more time and become more ambitious I will write a small python wrapper that will extract the url from the xml file and start the stream.

3 thoughts on “Listen to iheartradio without Flash

  1. M

    Awesome! I just spent half my evening trying to figure this out before I wised up and searched for it. I’m trying to play audio from the command line and this is EXACTLY what I needed.

    Thanks for posting this.

  2. pswitt

    This can be crammed into a one liner like this:

    mplayer -novideo `wget -q -O- “” | grep -o “rtmp\://[^\”]*”`

    (with WHTZ-FM replaced with any station id)

  3. t47h3

    To force you to play audio in the browser, iHeart has switched to HTTP live streaming (HLS) with DRM-protected “chunk” files or something: the chunk URL or encryption key keeps changing, so you need a script to follow along like the Flash player would, otherwise it only plays for about 25 seconds.

    Note the absence of iHeart desktop apps for Mac, Linux & Windows 7. I wrote to the company and they basically said they just dont care if they lose desktop listeners who refuse to use Flash. (Clear Channel shareholders, take note!)

    If you want to work on a respectable software project, how about writing a module for VLC that parses the scripts on a radio station’s iHeart page and plays the stream in the normal way, like this:

Leave a Reply

Your email address will not be published. Required fields are marked *