I wanted to record Internet radios to listen to it later on (say at work), with fixed length files, and the name of the radio in the file names. I was not totally convinced by Radio Lover.
Here is my solution based on streamripper, an open-source tool.
You will need to save the following script as “ripstream-fake-trackinfo”:
#!/bin/sh DELAY=1200 # in seconds START=`date +%s` LASTCOUNT=-1 # Force a track change at the beginning echo "TITLE=BEGINNING"; echo "ARTIST=BEGINNING"; echo "." sleep 1 while true ; do NOW=`date +%s` COUNT=$(((NOW-START)/$DELAY)) if [[ $COUNT -ne $LASTCOUNT ]] ; then DATESTR=`date +%Y-%m-%d-%H-%M-%S` echo "ARTIST=$1"; echo "TITLE=$DATESTR"; echo "." LASTCOUNT=$COUNT fi sleep 1 done
The following script is “ripstream” :
#!/bin/sh TRACKINFO=~/bin/ripstream-fake-trackinfo cd ~/Desktop/Downloads/Radio || exit 1 streamripper $1 -D "%S-%d" -E "$TRACKINFO $2"
And here is how to call it :
ripstream URL Name
Keywords : record mp3 stream fixed length internet radio