To record a stream (mms for example) use the following command:
$ vlc mms://server/path \ --sout #transcode{acodec=mp3} :duplicate{dst=std{access=file,mux=raw, dst="radio.mp3",select=novideo}} --run-time=<time to record (in seconds)>