14 August, 2008

How to record streaming net radio in Ubuntu / Linux

How to record streaming net radio

The script below enables easy recording of an internet stream. Copy and paste the following into a file called: rec Make it executable, and then use sudo to move it to /usr/bin.

The command works like this: rec http://XX.XXX.X.XXX jazz, where http://xx.. is the IP of the station you want to record. The file will be saved as /home//jazz.mp3


Code:

#!/bin/bash
#
# script to record MP3 broadcast stream
# The command is all on one line ending with a semi-colon
#
# $1 is the station
# $2 is the name of the music
#
#Replace with your user name

/usr/bin/mplayer $1 -dumpstream -dumpfile
/home//${2}.mp3 -vc dummy -vo null ;


.....that's all...enjoy...

No comments: