Listen to iheartradio without Flash

August 24th, 2010, 8:49 am

UPDATE:  http://pyther.net/blog/index.php/2010/08/iheartradio-command-line-mplayer/

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 “http://p2.STATION_NAME.ccomrcdn.com/player/player_dispatcher.html?section=radio&action=listen_live”

If I want to listen to The Fox (call letters: WTFX-FM), the URL of the XML would be “http://p2.wtfx-fm.ccomrcdn.com/player/player_dispatcher.html?section=radio&action=listen_live”

Open up the url in a web browser and grab the rtmp url which is between the <stream> tags. rtmp://cp21366.live.edgefcs.net/live/Lou_KY_WTFX-FM_OR@s7696?auth=daEcEbgdNb4a3bdcKdYcrcgcGara0c1c3cZ-bmC7wi-4q-LM3Y9_7nqEDps4CCulBtyp&aifp=1234&CHANNELID=981&CPROG=_&MARKET=LOUISVILLE-KY&REQUESTOR=WTFX-FM&SERVER_NAME=p2.wtfx-fm.ccomrcdn.com&SITE_ID=2038&STATION_ID=WTFX-FM&MNM=2&TYPEOFPLAY=0

Step 2:

Download and Install rtmpdump and mplayer

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://cp21366.live.edgefcs.net/live/Lou_KY_WTFX-FM_OR@s7696?auth=daEcEbgdNb4a3bdcKdYcrcgcGara0c1c3cZ-bmC7wi-4q-LM3Y9_7nqEDps4CCulBtyp&aifp=1234&CHANNELID=981&CPROG=_&MARKET=LOUISVILLE-KY&REQUESTOR=WTFX-FM&SERVER_NAME=p2.wtfx-fm.ccomrcdn.com&SITE_ID=2038&STATION_ID=WTFX-FM&MNM=2&TYPEOFPLAY=0" -v | mplayer -

Things to watch out for:

Sources:

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.

Tags: , , , , ,
Category: Code, Computers, Linux | 1 Comment »


The Boot Flag

April 23rd, 2010, 1:33 pm

Well it all began when I started to hear a buzzing noise coming from my server. At first I thought it was the fans, but I quickly found out it was the drive. So I figured I would copy everything to a “spare” drive I had around that was being used for backups. Well no matter what I would do I couldn’t get the motherboard to boot from this drive. Oddly, my eeepc and qemu where able to boot from the drive without a problem.

After six hours of trying to swap drives I gave up. The following weekend I remembered that the boot flag needs to be set on the boot partition to get the bios to boot the drive. Sure enough after setting the boot flag in cfdisk the bios booted the drive without a problem.

The BIOS should look for a mbr. If there is a mbr it should attempt to boot the drive. It shouldn’t care about the partition table at all! From what I know, the boot flag is used by the mbr to determine the boot partition. However, grub nor lilo (both linux boot loaders) care about this flag. The windows mbr is the only bootloader in which the flag matters.

My server has an Intel Little Falls board (D945GCLF) which is only about 2 years old so I was quite surprised when I realized the boot flag had to be set.

Tags: , , ,
Category: Computers | Comment


Passed!

July 25th, 2009, 11:57 am

That’s right I passed the RHCT! Woot!


Category: Computers, Linux | 2 Comments »


Learning Dvorak…

March 22nd, 2009, 1:39 pm

First off I want to say I’m not dead yet!

So I decided to learn how to type with the dvorak keyboard layout. I had tried this once before, but I gave up! Surprisingly I remembered some of the layout. You are suppose to be able to type faster with the dvorak layout and I think I see how this is possible. There are many common words which can be typed only using the middle and top rows. Also the majority of the “letter” keys are typed with the right hand, which is easier for everyone who is right handed.

I started this adventurer a few days ago and to my surprise my typing speed is not all that bad. If I had to guess I’d say I am typing at about 25-30 words a minute right now. I presume that with some more practice I’ll be doing 40-50 words in a few more days.

Overall I am happy with the switch. Hopefully once I become more comfortable I will be able to switch between dvorak and qwerty without a problem.

http://upload.wikimedia.org/wikipedia/commons/2/25/KB_United_States_Dvorak.svg

Tags: , ,
Category: Computers | Comment