0 Replies - 1690 Views - Last Post: 20 August 2012 - 08:12 PM

#1 HiTTman   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-July 12


Posted 20 August 2012 - 08:12 PM

Description: 1. save snippet to an empty .txt file on Desktop.
2. name file Radio.
3. make file executable, enter the fallowing commands. sudo chmod +x Radio.
4. varrify file is executable. ls -l Radio.
5. move executable file to /bin/ folder.
6. from command line enter, Radio 'http://whatever the streaming URL is' 'the name of the .mp3 file'

Thats it, if you have any ?'s just ask, enjoy! This script will play then record streaming radio stations via "url", then convert incoming steam to .mp3 and save it to Desktop.
  # $1
  # $2
set -e
TMP="/tmp/radio-`perl -le 'print localtime()'`"
mkfifo $TMP
DATE=`date +%Y-%m-%d`
MP3="$HOME/Desktop/$2 $DATE.mp3"
lame $TMP -o "$MP3" -V 2 --tt "$DATE" --tl "$2" --ta "Radio" --ty "`date +%Y`" --add-id3v2 --pad-id3v2 --ignore-tag-errors --quiet &
mplayer -playlist "$1" -vc null -vo null -prefer-ipv4 -bandwidth 9000000 -ao pcm:fast:waveheader:file=$TMP &
trap "kill $MPLAYER_PID; echo 'killed recording'; exit" HUP INT TERM
trap "kill $LAME_PID; rm $TMP; exit" EXIT

Is This A Good Question/Topic? 0
  • +

Page 1 of 1