I'm writing a stream-ripping program that's a wrapper for mplayer. Right now I'm creating wav files and encoding them to mp3 with lame and/or bladeenc. That works ok except for long programs - the wav file gets gigantic and occasionally fills up the drive. Is there a way to use mplayer or mencoder to encode the stream directly to mp3? Or, perhaps there's a way to pipe the output from mplayer/mencoder to lame? Any help appreciated!