Skip to content

Instantly share code, notes, and snippets.

@lazzarello
Created March 31, 2009 16:10
Show Gist options
  • Select an option

  • Save lazzarello/88249 to your computer and use it in GitHub Desktop.

Select an option

Save lazzarello/88249 to your computer and use it in GitHub Desktop.
record sounds and emotions radio show to an mp3
#!/bin/sh
filename="sounds_and_emotions-`date +%d-%m-%Y`.mp3"
dumpfile="stream.dump"
mplayer="/usr/bin/mplayer"
mplayer_args="-dumpaudio"
wget="/usr/bin/wget"
wget_args="-O - -q"
url="http://wm.streampower.be/fmbrussel/webradio/sounds.mp3"
match_key="Ref1="
ref=`${wget} ${wget_args} ${url} | grep ${match_key} | sed "s/${match_key}//"`
${mplayer} ${mplayer_args} ${ref}
mv ${dumpfile} ${filename}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment