How to record from Grooveshark

I definitely prefer Grooveshark to Last FM as it seems to have far more music and does not seem to have some of the annoying “features” of Last FM like the fact that a lot of tracks are truncated to 30 seconds in Last FM.    Also Last FM has a lot of “dead” tracks which will not play at all, even for 30 seconds.

Grooveshark is mainly aimed at online usage and you listen to the tracks “live” over the net, which is fine and good, but not so good if you loose your internet connection, say on a 3G signal and you go out of range as the tracks will simply not play any more.

The answer here seems to be to capture the mp3 stream, as it normally gets deleted after each playing.

There seems to be a lot of software that will do this for you, but I don’t really want to have to install special software when there are tools already available which will do the same task.

Another thing to be very cautious about is that some of these tools are “closed source” so by installing them you could be putting your computer at risk if the software has hidden “features” which do extra things you might not want or even be aware of.

Wireshark is a well respected open source network tool so there is no risk in using it.

One of my favorite tools is Wireshark as this will capture just about anything and everything which makes it pretty cool ;-)

What I do is set wireshark to capture and then “play” the track in Grooveshark.    The beauty of grooveshark is that you do not have to wait for the song to finish playing as if you have a fast connection the mp3 stream will be written to the cache in only a few seconds, and there is a nice little progress bar in grooveshark to let you know when this is done.

Once this is done it is time to “save” the live capture as an mp3 file.

To do this you select one of the packets and “follow tcp stream” like this:

You might notice that I have added an extra column of “size” to the capture windows as the packets containing the audio stream generally seem to be 1514 bytes in length.

You then “save” the stream like this:

and save (using the “save as” button) it as a file ending in “.mp3″. You can then play the file without needing a “live” internet connection.

One thing that is not clear is if it is against the terms of service to save a stream. I have read through the lengthy legal document on their website and I could not see any wording that banned the saving of a stream. Most of the restrictions seemed to be aimed at UPLOADING music rather than downloading.

About these ads

16 Comments

  1. WC
    Posted April 6, 2010 at 8:29 am | Permalink

    Using IE you can also just listen the mp3 from your temporary internet files\Content.IE5\(some folder with wierd name)\listen[1].mp3 (believe its a path like that)

  2. justin
    Posted May 9, 2010 at 2:46 am | Permalink

    The temp folder trick only works if the “nocache,nocopy’ field is absent. They seem to randomly assign this option afaik.

  3. BC
    Posted August 12, 2010 at 7:42 pm | Permalink

    This has worked for me in the past (granted it wasn’t the same exact sequence of steps), but now when I go to my cached files they show up as flash objects rather than audio files.

    Even worse, the flash files don’t even contain sounds, but rather sprites – so standard swf to mp3 conversion utilities aren’t effective.

    Any ideas?

  4. Grateful
    Posted October 10, 2010 at 8:30 am | Permalink

    Wow! Thank you so much for providing this information. Brilliant!

  5. Supernatendo
    Posted December 20, 2010 at 4:40 pm | Permalink

    @ #3 BC

    Sounds like you followed the TCP stream of the SWF song queue that grooveshark uses. Follow a different TCP stream until you find the right one.

  6. kingzfn
    Posted March 20, 2011 at 12:31 am | Permalink

    Awesome tutorial works great!

  7. Anonymous
    Posted May 27, 2011 at 11:20 pm | Permalink

    Or you could simply use Audacity to record using your computer’s audio out.

  8. John Smith
    Posted July 7, 2011 at 7:16 pm | Permalink

    Download Audacity for free (google it) then plug a wire from out to in in your sound card, start audacity recording, play the song, when finished stop recording and go file > export and save it

  9. Pontus
    Posted July 15, 2011 at 9:46 am | Permalink

    This works, but the files are always broken for me. I believe packets are dropped/retransmitted or something. The application reading the stream gets the correct data, but wireshark doesn’t. Grooveshark mp3:s are always randomly a few 100k too short, compared to the Content-length header, and contain skips.

    Is there any similar way to catch a TCP stream, which actually captures what ends up in the application?

  10. jo
    Posted August 26, 2011 at 2:47 pm | Permalink

    Hi there, im a complete n00b to linux in any form – im using ubuntu natty and i cant get the program to find any interfaces on which to capture.. i know this is some issue with not having some privilidges set up somewhere but i need a step by step guide as to how to aloow those priviliges. if i run wireshark as sudo it gives an error message and crashes…

    anyone wanna help a noob out? :) really want to capture from grooveshark!

    ps also have outrec and audacity but cant get either of those to rec either – just silence.

  11. U R Great , Miguel
    Posted September 7, 2011 at 3:20 pm | Permalink

    WOW !

    I had already used wireshark before (i used it when it had other name :)) but this was just very very intelligent!

    Congrats, excellent post! So simple and very enlightening :)
    Good tcp and streams knowledge too.
    Of course not everyone can do this…

  12. Chloe
    Posted October 19, 2011 at 5:36 am | Permalink

    I have to edit the file with a text editor that can handle large binary files like Notepad++ and delete the HTTP headers before it will play in my music player Gom.

    I’ve tried Proxomitron to remove the Pragma: No-cache, Cache-control, and Expires headers, but that still didn’t work and I could not find the music in the cache directory. Not with Chrome and not with Opera. However, the log window in Proxomitron showed that it was working and other cache files appeared.

  13. Ian
    Posted December 31, 2011 at 6:22 pm | Permalink

    Worked for me. I used Notepad++ to remove the HTTP header.

    Thanks!

  14. Nom DeGuerre
    Posted April 1, 2012 at 2:08 pm | Permalink

    FYI:

    The terms may not have addressed this when you wrote this blog, but this is clearly against Grooveshark’s terms as of today.

    “Any musical work made available via the Service is intended for Streaming only. Streaming meaning the transmission of an audiovisual work via the Internet from the Service to a user’s device in such a manner that the data is intended for real-time listening and not intended to be copied, stored, permanently downloaded, or redistributed by the user. Accessing any musical work for any purpose or in any manner other than Streaming is expressly prohibited.”

    See http://www.grooveshark.com/terms.

  15. bartus man
    Posted January 27, 2013 at 3:44 am | Permalink

    Wonderful man! I think I will try to make a little c#.NET program to capture all my playlists! Thanks buddy!

  16. Jur
    Posted April 7, 2013 at 12:14 am | Permalink

    Worked perfectly! Thanks so much for sharing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: