Can I record internet radio using OSX Terminal?
May 11, 2010 7:27 AM   Subscribe

Is there a way to record mp3 audio streams (and ideally schedule such recordings) using Mac OSX Terminal?

There's an application called RadioLover that will probably do the job, but if it might be possible to roll my own I'd love to try.
posted by subpixel to Computers & Internet (5 answers total) 2 users marked this as a favorite
 
StreamRipper is free software.
posted by mkb at 7:39 AM on May 11, 2010


Best answer: lame, I think, will do you want, though you will probably need to download it first. Various tutorials out there show how to use the myriad command-line switches.

Once you have the command-line stuff right, use cron to schedule it (instructions are for Ubuntu, but should be nearly identical for OSX).
posted by jquinby at 7:42 AM on May 11, 2010


Best answer: I use MPlayer under linux, this is a mac port. I typically use cron to schedule the job, mplayer dumps the stream to a tmp wav file and then I use lame to encode it to mp3. If it is already in mp3 format you may be able to configure mplayer to dump directly to mp3.

Here's my script with the url and meta-data cleared:

TMP1=`mktemp -p /var/tmp stream.XXXXXX`
OUTFILE=/var/music/mp3/streams/stream_`date +%b_%d_%Y`.mp3

mplayer -quiet -playlist http://XXX/playlist.pls -ao pcm:fast:file=$TMP1 -vc dummy -vo null -endpos 01:05:00

lame $TMP1 $OUTFILE --tt `date +%D` --ta "Artist" --tg "Genre" --tl "Title" --id3v1-only --nohist --preset standard

rm -f $TMP1
posted by beowulf573 at 8:09 AM on May 11, 2010


To dump a stream straight from mplayer, creating a file called "stream.mp3":

mplayer -quiet -playlist http://XXX/playlist.pls -dumpstream -dumpfile stream.mp3
posted by zsazsa at 9:19 AM on May 11, 2010


If you haven't discovered Audio Hijack by Rogue Amoeba, you really should check it out. You can easily schedule recording of audio sources as well as the launching of those sources, not to mention how you want them recorded. It's really superb. I can't recommend it highly enough.
posted by 2oh1 at 12:13 PM on May 11, 2010


« Older What hand-crank, capacitor-based LED lanterns have...   |   Avatar DVD - Canadian - Bilingual? Newer »
This thread is closed to new comments.