[ubuntu-uk] Recording web audio in Dapper

Will Cooke will at whizzy.org
Sun Sep 17 20:36:12 BST 2006


On Sun, 2006-09-17 at 20:09 +0100, Tony Arnold wrote:
> On Sun, 2006-09-17 at 19:19 +0100, Stephen Garton wrote:
> > I've done this before with mplayer, but AFAIK it will only dump to
> > wav, you would then have to encode this with lame or similar.
> > 
> > to use mplayer, use something like 'mplayer -dumpstream "<url>"
> > -dumpfile <file.wav>' if my memory serves me correctly.
> 
> I'm interested in this too. A couple of questions. Will mplayer deal
> with real audio streams, which I think is what the BBC use? And can you
> tell it to record for a given amount of time?

Mplayer will handle realaudio, as per the BBC streams, if you have the
Win32 Codecs installed (I think you need them, it might have native
support now) If you do need the codecs then they are 32bit only, so
you're stuck if you use a 64bit kernel, unless you have a 32bit version
of mplayer in a chroot jail.  I may be wrong on this, I've only just
upgraded to 64bit.

If you install the "vorbis-tools" package you'll get oggenc, which you
could then use to convert the raw file from mplayer using named pipes.

So:

mkfifo audiopipe

oggenc --quiet -q2 -oaudio.ogg audiopipe &

mplayer <url> -ao pcm:file=audiopipe

... should do the trick, the mplayer command line might need some
tweaking, this is off the top of my head.  You can probably substitute
lame for oggenc.


As for recording for a given time, mencoder has an "-endpos <time>"
option, but I don't think mplayer does.  There is bound to be a better
way of doing this, but as a quick and dirty hack you could sleep <n>;
pkill mplayer?


Hello list, by the way!

Cheers, Will





More information about the ubuntu-uk mailing list