On Wed, 2005-03-02 at 08:28 +0100, Eric Dondelinger wrote:
Hi Al,
On Tue, Mar 01, 2005 at 10:38:02PM +0100, Alex wrote:
How can I record a stream?? (Realaudio)?
mp3?
Are there projects doing this?
AFAIK it should be possible using mencoder (comes with mplayer).
$ mplayer -dumpfile <outputfile> -dumpstream <url>
mencoder can do the same while recoding to a different format.
Look at the "-o", "-oac" and possibly "-of" switches. The
man-
page is your friend.
There's also some way of intercepting whatever
goes to the sound
card and encoding that.
How can I pipe an audio stream??
Erm... wasn't there some "buffer" tool or somesuch... sorry,
can't remember. Maybe you'll want to look at "sox", IIRC they
have some interesting stuff for CLI audio processing.
There are probably some tools that can pipe audio streams
through standard unix pipes (or with "|").
But definitely take a look at gstreamer. Get version 0.8 at least.
It's made for piping audio and video through filters and converters.
It comes with a command-line tool called gst-launch (Debian has
a good manpage for it).
It lets you put together a pipeline that will be "executed".
A pipeline has a source, a sink, and some elements in between.
These examples from the manpage should explain it:
Play the mp3 music file "music.mp3" using a libmad-based plug-in and
output to an OSS device:
$ gst-launch filesrc location=music.mp3 ! mad ! osssink
Convert an mp3 music file to an Ogg Vorbis file:
$ gst-launch filesrc location=music.mp3 ! mad ! vorbisenc ! filesink \
location=music.ogg
The "spider" element converts any format to any other format using
all available filters/converters. Simply play a video like this:
$ gst-launch filesrc location=video.mpg ! spider ! sdlvideosink
Use the gst-inspect tool (or gst-inspect-gui) to find out which
attributes the elements support.
There are sources and sinks that use sockets, and the manpage has
an example for streaming mpeg1 video over RTP.
HTH,
Christian Glodt