Share

Scrobble Internet Radio using Winamp and Audioscrobbler plugin

31 Dec 2008, 18:01

This is the description of a way to scrobble traditional internet radio (shoutcast/icecast streams) with Last.fm, using Winamp with the Audioscrobbler plugin, the Last.fm for Windows application, and the Streamripper plugin for Winamp.

The problem: Though the Audioscrobbler plugin works very well on transferring the data of currently played local tracks to the Last.fm for Windows application (and thus to Last.fm), it can not do the same for streamed tracks, even when correct artist and title information is sent within the stream.

A way to a solution: Before actually playing the streamed track(s) with Winamp, have them converted to single tracks. This is done by utilizing the free Streamripper plugin for Winamp, which at the same time adds time-shifting functionality to the playback. "Time-shifting" means, that you can skip back and forward during playback and repeat tracks, a functionality known from modern "personal video recorder" set-top boxes for digital TV.

How to: First, Winamp and the Last.fm for Windows application have to be installed, and the Audioscrobbler plugin must be present in Winamp. Easiest way to install the Audioscrobbler plugin is to use the installation wizard of the Last.fm application (menu: Tools/Get Plugin...). Check if scrobbling works for local files.

Note: The following setup will work as well with the alternative Winamp plugin "AWAAS - ActiveWinAmpAudioScrobbler" (without the Last.fm application), but it won't display "Now playing" at Last.fm while you are listening to a song; instead, the songs will be shown after they each have finished playing. More about this, see comments.

Next is to install Streamripper, a free Open Source software. It includes a Winamp plugin. When Streamripper and its plugin is installed, it will automatically load when Winamp is started. Streamripper adds an icon ("SR") to the tray area, which provides control of the Streamripper window and settings. The Winamp plugin allows to control whether Streamripper is automatically started and enabled with Winamp. Now, use these settings in Streamripper options:

Connection
Try to reconnect to the stream if it drops [yes]
Create relay stream [yes if you want to be able to get playback on another computer]
Don't rip over X megs [yes and a value if your hard disk space is quite limited]
Local Machine Name: localhost
File
Output directory [choose a directory on a drive with at least 1 GB of free space, preferably not the system drive (C: usually) - or set "don't rip over X megs" to a value of at least ~1000 MB less than your free space]
Rip to seperate files [yes]
Rip to single file [no]
Overwrite tracks in complete: Always
Add ID3 V2.3 info to the tracks [yes]
Add finished tracks to winamp playlist [yes]
Number of initial songs to leave incomplete: 0
Pattern
Output file pattern: %1q
Skins
[as you wish]
Splitting
[leave at default]
Ext/Codeset
[leave at default]

Usage: Choose and start playback of an internet radio station with Winamp as usual: By clicking a link on a website, i.e. http://www.shoutcast.com/, http://somafm.com/ and many others, a Winamp bookmark, a saved .pls or .m3u file, through the shoutcast radio page of Winamp's media library, or by entering an URL.

Make sure the radio station is playing and delivering correct artist and title information. The track info shown in Winamp must comply with this scheme:
Track Artist - Track Title (Station Name and Information)

When the station is playing that you want to scrobble, click on "Start" in the Streamripper window. Note that now two streams of the same station will be received: One playing "live" in Winamp, one for recording by Streamripper. To reduce load to your favourite station, you could now switch to another station in Winamp, just temporarily for the next few minutes. You also can stop playback in Winamp right before you start Streamripper.

As soon as one track of your recorded station ends, it will be added to the actual playlist in Winamp. But do not start playback of the first recorded track immediately, because playback will likely end (and set Winamp to stop) when it ends before the next track is complete. Wait until 2 or more recorded tracks are added automatically to the playlist. Also note, that the playlist window will be cleared, if you open some file or other radio station now.
As soon as several tracks from your ongoing Streamripper recordings are in Winamp's playlist, you can pause, skip or replay tracks at will!

Streamripper will continue recording the station until stopped, or until your hard disk is full (or until the station stops playing of course). If you applied the settings correctly, Streamripper will automatically delete old tracks. Otherwise a simple script or scheduled Windows task could be set up to clear the download directory.

Comments

  • T-Kir wrote:
    12 Jan 2009, 16:26
    Great workaround, I can finally scrobble my shoutcast streams.... woohoo. (I still think it should and can be done in the Last.fm app, but hey ho).

    Leave T-Kir a shout

  • Dissonanced wrote:
    18 Jan 2009, 00:12
    Thank you so much for this!

    Leave Dissonanced a shout

  • schnurrel wrote:
    16 Feb 2009, 11:49
    nice one thx dude :)

    Leave schnurrel a shout

  • saxols wrote:
    19 Feb 2009, 23:45
    thanks master!!:)

    Leave saxols a shout

  • cabone wrote:
    22 Feb 2009, 12:32
    great manual! thanks w-sky!!!!!!

    Leave cabone a shout

  • aufkeinenfall wrote:
    15 Mar 2009, 20:59
    Thank You!

    Leave aufkeinenfall a shout

  • H0T0 wrote:
    18 Mar 2009, 12:44
    i´m getting SR_ERROR_INVALID_URL, i have double checked the setup is correct but still this error comes up, anyone can help ?

    Leave H0T0 a shout

  • lastbogart wrote:
    25 Mar 2009, 00:03
    Interestingly, when I do this, everything works except the ID tags. The title and track are even correct in the playlist (if I change the %1q to %A - %T) but not in the metadata so nothing is scrobbled. This for Radioparadise and SomaFM

    I tried stationripper and for some reason, it works. But there is no auto-enqueue so it is not as convenient.

    All this to scrobble some music!

    Leave lastbogart a shout

  • [deleted-user] wrote:
    25 Mar 2009, 14:28
    I have a problem with the tags too, the ripped track in the playlist show as "0001", "0002" etc'. Does anyone know how to solve this? I double-checked the settings and everything seems fine.
  • w-sky wrote:
    25 Mar 2009, 15:09
    "0001", "0002" etc. are the file names, set by "Output file pattern" in this way so new recordings will overwrite old ones, and disk space never gets full (unless you make it run for weeks!) ;-)
    Are you sure you enabled "Add ID3 V2.3 info to the tracks"? Maybe you could try enabling "Add ID3 V1 info to the tracks" also.

    But there are quite some stations which don't deliver correct artist and title tags. For example, it could be the name of the show, mix or program in either of the tags, or station ID only. One of my favourite stations sadly always gives the original track number as artist, and "Artist - Title" inside the title tag. With any of those problems or like these, it will not scrobble.

    Leave w-sky a shout

  • [deleted-user] wrote:
    25 Mar 2009, 18:21
    Thanks for your quick answer, and for letting me know in a private message :P

    I checked the settings again, and it seems okay.. so its probably the station. ew, that really sucks. but nvm, last.fm isnt god. :)
    Thank you anyways.
  • lastbogart wrote:
    25 Mar 2009, 21:13
    I think it's actually streamripper that has the problem translating the tags. I tried a couple different streams, and although the tags come into the playlist (if i use the proper % delimiters) they do not get into the "Now Playing" which is used by the scrobbler. Instead, I have one funny character that looked something like ά.

    StationRipper (also by the streamripper people, or at least on their site) correctly converts and embeds not only the tags, but the album art as well into both stations that failed with StreamRipper.

    Leave lastbogart a shout

  • Violet_Gray wrote:
    3 Apr 2009, 09:01
    thank you for posting! the detailed instructions were very welcomed.
    *hugs*

    Leave Violet_Gray a shout

  • [deleted-user] wrote:
    12 Apr 2009, 19:07
    Sweet tip!

    Nice music taste btw
  • OtZman wrote:
    15 Apr 2009, 20:41
    Thanks for the tip! I've been wondering how to do this for ages.

    A word of advice to others: Don't tick the "Don't rip over X megs" tick box and leave the value at 0. I spent an hour trying to figure out why the heck no tracks were recorded. =)

    Leave OtZman a shout

  • tomivav wrote:
    8 May 2009, 13:39
    Thank you so much for this! :D

    Leave tomivav a shout

  • Fleasfan wrote:
    10 May 2009, 13:24
    Even more useful now that last.fm ended the free radio service! Thanks.

    Leave Fleasfan a shout

  • RedPanther9 wrote:
    18 May 2009, 15:23
    Greaaaat ! your a genius !!! thanx thanx thanx

    Leave RedPanther9 a shout

  • Therendil wrote:
    22 May 2009, 11:59
    Thanks a lot for this solution :)

    Leave Therendil a shout

  • GyroFoyster wrote:
    6 Jun 2009, 16:49
    << Note: I don't know if the following setup will work with the alternative Winamp plugin "AWAAS - ActiveWinAmpAudioScrobbler" (without the Last.fm application), but it probably does. I'd love to get reports. >>

    I have just tried this with AWAAS, so I can confirm StreamRipper cooperates with it just fine. However: there seems to be some delay about scrobbling those StreamRipper files to last.fm. During my tests, I believe no StreamRipper file managed to get displayed with the "Now listening" icon. Ripped files usually only got displayed on last.fm after they finished playing, with "Just listened" attached. When I tried alternately playing local files from standard directories and the ripped radio files, local files got immediately scrobbled to last.fm and displayed the "Now listening" icon, but the ripped files did not. Well, maybe things will behave differently tomorrow or in a week from now. ;-) The non-appearance of the "Now listening" icon is a cosmetic issue for me; the main thing is that the overall statistics are correct.

    What does *not* seem to work for me according to the manual is that if you stop recording or streaming a station before a song finishes playing, the incompletely ripped file is left in the Incomplete folder, despite the "0" in Setttings, and even after you restart WinAmp and StreamRipper. Do we, then, need to clear the Incomplete folder manually from time to time? Why is the zero setting ignored by StreamRipper?

    Finally, thank you very much for this great Anleitung! :-D

    Leave GyroFoyster a shout

  • GyroFoyster wrote:
    6 Jun 2009, 18:14
    OK, I've found out about the delay now. AWAAS is Media Library-based: it only scrobbles whatever tracks are contained in Media Library. There doesn't seem to be an easy way to include the files ripped by StreamRipper in WinAmp's Media Library immediately. There is a setting "Add played files to Library", but those files are only added after they *finish* playing, and that's when they get scrobbled ("Just listened"). It would probably be too heavy on the PC's resources to perform scans of all MediaLibrary folders every 2 minutes or so. (If there was a way to specify those scans only for the StreamRipper forlder, it would be fine, but it looks like it's a global setting for *all* Media Library folders.)

    Leave GyroFoyster a shout

  • GyroFoyster wrote:
    7 Jun 2009, 07:47
    Oh, and one more question. Is there a way to make StreamRipper work with last.fm channels??? You know, AWAAS allows you to listen to last.fm channels directly from WinAmp, but recording a last.fm stream seems impossible with StreamRipper, even after experimenting with the UserAgent field, or after switching off the playback in WinAmp so that there's no double access, etc. StreamRipper just can't access the last.fm channels and produces a failure message.

    Leave GyroFoyster a shout

  • w-sky wrote:
    12 Jun 2009, 15:50
    Hello GyroFoyster, thanks a lot for the new information and all the experimenting you've done. I am happy to learn that it works with AWAAS, and I will edit that part. About the incomplete files inside the folder named "incomplete": Yes, you're right. The "0" setting for incomplete files affects only the beginning of Streamripper activity - if you would like not to have the first song added, which probably always is incomplete because it starts somewhere in the middle, you would enter "1" here. During recording, Streamripper always writes the new file to the "incomplete" folder until the track has finished; then it is renamed according to the scheme and moved to the main folder. The last (unfinished) song, when you stop Streamripper, will just stay there. So it might be a good idea the clear the "incomplete" folder, or even better, clear the output folder completely from time to time, though it would probably need months of heavy Streamripper usage, until more than maybe 100 MB of remains have accumulated (which still is not much at all, when we have HDD sizes counted in hundreds of GB). However, to change this, Streamripper would have to be improved, which the people working on Streamripper could do. You could ask for a solution in the Streamripper forum at Sourceforge, or - if you are a software engineer - improve the Streamripper source. About the problems with Last.fm channels: Sorry, I have no idea. As I understand, you already tried stopping Winamp playback before starting Streamripper, which would be the first suggestion I can think of. Maybe the channels use some dynamic URL that Streamripper can't "understand", or an unique session ID inside the URL, than can be used only once?

    Leave w-sky a shout

  • GyroFoyster wrote:
    12 Jun 2009, 16:21
    Thanks for replying, w-sky. Yeah, these things will remain a bunch of mysteries for now. :-)

    Leave GyroFoyster a shout

  • Zafyron wrote:
    21 Jul 2009, 14:41
    it works totally fine thank you

    Leave Zafyron a shout

See all 43 comments
Leave a comment. Log in to Last.fm or sign up (it’s free).