This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

A more efficient recording method.

Posted by: Anonymous [ip: 139.153.15.17] on October 30, 2007 10:48 AM
The method described for encoding to mp3 would work, but requires three passes and potentially a lot of disk space. The following will convert a stream to mp3 using two parallel passes.

First create a fifo:

mkfifo radip.pipe

This creates a special file that can be used as the output file for one program and the input file of another.

Next, assuming that you have a ram file execute these two commands in seperate terminal windows.

mplayer -vo null -vc dummy -ao pcm:waveheader:file=radio.pipe `cat ramfile.ram`

lame -h -ms radio.pipe show.mp3



mplayer will send its output to radio.pipe, and lame will receive it as it arrives and output the mp3, thus your mp3 will be encoded faster without needing to use up as much disk space as you would creating the rm and wav files.

#

Return to Listening to and recording audio and video streams with MPlayer