View Full Version : stream ripping

2006-11-22, 15:02
anyone want to develop a plug in for SS that works as a stream ripper?

the code is already available, and it may even be perl:


i've used the plugin they have there for winamp, works great. the drawback tho, is i want to be able to "tivo" my streams, meaning set unattended times and dates for recording.

one really cool thing about this ripper is the relay function, which means you don't need double the bandwidth to listen as well as record.

also, they have a standalone free version called stationripper. haven't tried that tho, and i didn't see scheduling in the feature list.

does anyone else know of or use a free stream ripper that allow you to tivo/schedule recordings unattended?

2006-11-22, 17:17
The scheduling ('Tivo') can easily be handled by the operating system. I remember a post some time back where a user gave his example of recording "Car Talk" every week using the `cron' facility that's standard on unix systems. Even passed the date parameters to be used in the saved filenames.

I'm sure there are free "wincron" utilities to do the same, or one could try using the built-in Windows scheduler, though I doubt the GUI applications lend themselves as well to scripting.

Just found the thread: http://forums.slimdevices.com/showthread.php?t=21344

2006-11-22, 17:25
yeah, its funny i was just thinking of creating point and click macros to setup recording... and then of course each macro would need a scheduler running to trigger it at the appropriate time... (and probably a second macro and trigger to turn it off).

BUT that is a bit cumbersome, and its a bit of a kludge, altho it is a good workaround.

unfortunately, i don't know if XP still has a macro editor that you can use for opening apps and clicking on them, or where it would be. i also don't know anything about an xp scheduler. i haven't messed with any of that since 95-98.

i think LOTS of SS users would love to see such a plugin, something meant to record like tivo or a vcr. it would be a great way for SS to create content for its users, not just play it.

2006-11-26, 18:31
I still think that it would be misguided to write a plugin for what is basically a simple OS-level function (that is somewhat tangential to SS at that). But on the other hand, I suppose the value-added a plugin could offer would be the interface where you specify the recording schedule. You'd need fields for (1) IP for the source, (2) start time, (3) stop time, (4) location/name for saving the stream, and possibly (5) an option for making it weekly/daily/etc. Like a lot of settings, that would be easy using HTML fields in the slimserver web interface, and technically-possible-but-rather-tedious in the remote interface.

One other thing to consider would be how/where to save the ripped stream. For example, like most security-conscious users I run slimserver with very limited privileges, including read-only access to the directory where my music library lives. This isn't an issue if the cron/scheduler job is run as a user that has requisite privileges, but it is a problem if run as a slimserver plugin.

Then there's the issue of the copyright status of the content that is being ripped. A lot of sites that stream expressly forbid ripping of the stream. Of course, that issue is there front and center with streamripper itself, with or without a plugin. But it's worth remembering, imho.

2006-11-29, 12:30
copyright has nothing to do with it imo, b/c 1.its up to the user to follow the law, and 2.i consider recordings made for oneself to be fair use, like a vcr or tivo. but really that is a discussion for another thread.

i also don't consider such a specific music oriented task to be a OS task. i consider it a task of a music app, and thus why i think a plugin for SS would be best.

as to the OS questions you pose, i don't know. like most people, i use windows. i don't program, but if i did and were to design a plugin to allow unattended scheduled recording using the source code of streamripper, i would go on the assumption that the user would have all privs necessary to install and use the plugin, and leave it up to them to configure their system as necessary.

are you saying btw, that such a plugin *must* have an interface via remote? i'm asking b/c i don't know, i could see where such a stipulation would be a big disincentive.

2006-11-29, 15:04
No, I'm not saying a plugin must have an interface via remote. I'm sure several great plugins are web interface only, for the same reason. So that doesn't have to be an impediment.

And I completely agree that software doesn't violate copyright laws, people do. But that doesn't stop people who are only making the tools from getting sued. Surely many developers wouldn't be deterred at all by that vague and distant threat, but I bet it does have a chilling effect on others who otherwise might be willing/able to write the plugin you want. But as you say, that's for another thread.

A huge share of the malware problems that afflict Windows would be avoided if people didn't do things the "Windows way" of running everything with full administrator privileges ("Whaddaya mean I need a password to install software?! This is 'My Computer'!!"). Running server software as 'administrator' or 'root' is especially risky, whatever the OS. I can't think of any existing SS plugin (or SS for that matter) that writes to the music library, and it's at least partly because of basic security. "Leaving it up to the user" doesn't fly. Either it will take some clever coding, or it will only be useful to security-UNconscious users.

Anyway, I really don't mean to be a naysayer. Plugins that do all and sundry are one of the great things about SS. Vive la diversite! Besides, you only one plugin writer to get hooked on the idea and you're all set. I was only trying to point out (a) what you want is pretty easy to do with existing tools (no programming required), regardless of OS, and (b) making it into a plugin might be more challenging than it seems. But I hope someone writes it.

2006-11-29, 22:28
i appreciate the input...

considering the amount of people i'm sure would love such a thing, i'm surprised at the lack of response to the thread.

how would u suggest i go about hooking a 3rd party developer? am i in the wrong forum? i have no idea how to recruit someone to the idea.

and streamripper btw, already has the options in it saying where to write files, and how... i wouldn't have them put directly into SS if thats what you meant, i would have them picked up via automated scan by SS which a lot of people do.

i don't see the priv issue being a big deal, if you can get streamripper to work independently. if you can do that, (and SR already exists as perl code), then all i'm asking for really is a scheduling app for SR that comes wrapped in a SS plugin.

in fact, i bet the "alarm" wakeup code (already in SS) would be very similar.

2006-11-30, 07:36
You could try the 3rd Party Plugins forum or the Developers forum to see if anyone would be interested. FYI, streamripper is written in C, not Perl, but that doesn't really matter.

I think I haven't been clear about the privileges issue. As you noted in your initial post, what is unique about this plugin idea is that it creates content, rather than just playing it. This is where it is completely different from the alarm plugin you mention. Where does SS get it's content? From the internet (radio, podcasts, etc.) or from the music library (ie, the directory specified on the first page of the server settings). In a secure system, the slimserver process cannot write to the music library, because it has no business doing so, and write privileges should be given on a need-to basis. All slimserver and current plugins do is read from the music library. It's not just protection from malicious hackers, but also for protection against coding mistakes.

The plugin you propose would save the stream to somewhere on the hard disk. But if slimserver is set up securely, then it would have to write somewhere other than the music library. And that would be a problem when it came time to play the saved content. The automated scans only scan the user-specified music library directory, not the whole hard disk.

One possible workaround did come to mind. That would be to give slimserver write privileges only to a SUB-directory of the main music directory, and not to any of the higher levels. That way the rest of the content in the music library would still be protected. I did this with my playlist directory for a while, before I realized there was a better way. The main remaining risk would be denial-of-service if you fill your hard disk if somehow streamripper didn't shut off when it was supposed to. But that risk exists whether you do it as a plugin or as a batch file/shell script.

Good luck.

2006-11-30, 11:02

yep, my mistake on the language, i assumed perl too quickly b/c on the homepage for SR it had some perl code there, but its actually a neat metatag fetching script for remote xml data:


(news, 2005, nov 12)

and i had always been thinking to configure SR to write to a sub directory of the directory where one stores their music and has it auto-scanned. SR also has some protections built in, you can tell it not to rip over X amt of megs for example. it will also name files with tag info and create dirs based on dates or whatever u want. its a very neat ripper.

just needs a scheduler. ;) thx, -mdw

2006-11-30, 14:12
its a very neat ripper. just needs a scheduler. ;) thx, -mdw

While you wait for your plugin, try any of the following. You'd be surprised how easy it is:
1) Start > All Programs > Accessories > System Tools > Scheduled Tasks, or
2) www.wincron.com , or
3) simply adapt http://forums.slimdevices.com/showthread.php?p=88978 . The script is nothing more than a simple batch/cmd file in the windows world. No programming needed.