Lame

How to capture an RTSP real audio stream and convert it into mp3

Ubuntu (and probably most other distributions) have all the tools that you'll need: Mplayer and Lame. Use the former to capture the stream into a RM (=Real Media) file:
mplayer "rtsp://server.example.com:554/sometrack.rm" -dumpstream -dumpfile "captured.rm"
Now convert the Real Media file to a WAV:
mplayer -ao pcm:waveheader:file="captured.wav" "captured.rm" -vo null -vc dummy
And finally convert the WAV into an MP3:
lame -h "captured.wav" "captured.mp3"

Syndicate content