A really nice listener hipped me to this programming object called wget (what...I think programming objects are hip). It simply lets you download files from the internet and do cool stuff to em. So I taught my computer using wget and cron to record a minute of FMU's live stream every 15 minutes. It's still running and I'll air the full thing on my radio show tonight, but here's a little sample of what you might've missed earlier today on the radio.
Not surprisingly, it starts off with Joe Belock congratulating all our amazing listeners for putting us PAST our goal for the first time in years! Amazing! It does restore my faith in humanity...kinda...
A minute from wfmu's live stream, recorded every 15 minutes on a Tuesday afternoon
How did you manage the 2nd part of the cron job? "killall wget" is kind of like using a sledgehammer and concrete block to press flowers.
Posted by: Scott Anger | March 06, 2012 at 10:33 PM
I did have a 2nd cronjob launch one minute later with a killall script. There's an alternative to wget called curl, maybe that works better. But wget can't cut-off streaming media with any of its built-in flags as far as I can tell. Pretty dumb.
Posted by: Nat | March 07, 2012 at 12:29 AM
Ah! Here's better advice on that:
"I don't know if you can easily install FFmpeg or libav, but here is how
I would limit each to 60 seconds, rather than using killall (also adds
an MP3 header):
wget -q -O - http://stream0.wfmu.org/freeform-128k | ffmpeg -i - -t 60 -acodec copy -y out.mp3
or
wget -q -O - http://stream0.wfmu.org/freeform-128k | avconv -i - -t 60 -acodec copy -y out.mp3
FFmpeg is good for a lot of other general-purpose codec hacking too."
Posted by: Nat | March 07, 2012 at 05:07 AM
just found out about wget?
don't tell him about vsound!
Posted by: bruceleh | March 07, 2012 at 02:53 PM
If the show is archived, you can just wait for it to show up in the archive directory, http://archive.wfmu.org:5555/archive/, and slurp the mp3 file directly, without having to pipe a stream through ffmpeg/aconv. Then you can slice and dice the file as you wish. I do this with special shows, and delete the DJs talk, e.g. Monica's Blossom Dearie tribute. You can make, I mean steal, great mixes this way.
Posted by: bruceleh | March 07, 2012 at 03:24 PM
Bruceleh. I owe you one. That is so helpful.
More of this stuff to come, this is just the start.
Posted by: Nat | March 07, 2012 at 08:36 PM