Saturday, August 21, 2004

Playing/Saving

The script i use to save the stream on Linux.
A cron job kicks it off at 1155 am Monday to Friday.
After Fridays show that ran onto 2.30 pm i think i should set the end time as later just in case.

#!/bin/bash
DIRNAME=~/JonesyJukebox/`date +%Y`/`date +%B`/`date +%V`
URLSTREAM=http://ccdig.liquidviewer.com/indie103
FILENAME=jj_`date +%F`

#set up mplayer suicide :-)
echo "killall mplayer" | at 1420 today

mkdir -p $DIRNAME
mplayer -cache 70 -vc dummy -vo null -dumpfile $DIRNAME/$FILENAME.asf -dumpstream $URLSTREAM

# to convert to wav
# mplayer -vc dummy -vo null -waveheader -ao pcm -aofile $DIRNAME/jj_`date +%F`.wav $DIRNAME/jj_`date +%F`.asf


NOTE this saves the raw stream as i found that was only about 30mb for the whole show. The wav file was > 1Gb and the ogg file(mono) is about 60 mb.

1 comment:

Chris was Anon said...

Makes me wish I had Linux instead of Windoze.