[NBLUG/talk] Grabbing streaming audio to file

Scott Doty scott at sonic.net
Fri Jun 4 10:33:54 PDT 2004

On Fri, Jun 04, 2004 at 09:48:32AM -0700, Glen Gunsalus wrote:
> Scott,
> Thanks for the pointer - works exactly as advertised! I captured from 
> http://streamer.krcb.org:7778.  I managed to find the correct url for krcb by 
> scratching around in .RealNetworks_* files.
> 1) Now if I can figure out the correct URL for KQED.  I have only invoked it 
> from their webpage and I don't get any information as to stream source - just 
> reference to kqed_spd-x.ram files in /tmp.    kqed.org:8000 doesn't work.  Any 
> ideas on were to look?

In the .ram file itself:

_[/tmp]_(scott at tsk)_
$ lynx -dump -source http://www.kqed.org/w/streamingfiles/kqed_real.ram

So if you run:

   mplayer rtsp://rmbcast.kqed-us1w.speedera.net/alias_sjose_abovn/encoder/rrmbcast.kqed-us1w/rmbcast_kqed-us1w_jan112002_1500_46193.rm

You'll get the live output.  (At least, I hope that's the live output -- the
date in the URL has me wondering...)

> 2) I need to RTFMP for mplayer, but off the top of your head is there a way to 
> take the e.g. 40kbps stream krcb puts out and capture at lower sampling rate 
> on the fly? I'm looking to capture voice so a) don't need all that info, b) 
> don't need multi Mbyte files!.

I was going to suggest mencoder, the companion to mplayer -- but it expects
a video stream, and won't take "no" for an answer...

Since the krcb stream is shoutcast (mp3), it seems like you could do
something with ffmpeg or lame to transcode the stream on the fly.  (ffmpeg
may be able to do it, seems to be just a matter of finding out the option to
set _output_ bitrate for mp3's).

   ffmpeg -f mp3 -i http://streamer.krcb.org:7778 test.out.mp3

 ...does indeed write the stream to disk, but various applications of the
"-ab" option don't seem to change the output bitrate.

Hopefully this will give you an idea...


More information about the talk mailing list