Subject: Re: [ecasound] ogg / streaming / ecasound
From: janne halttunen (jhalttun_AT_pp.htv.fi)
Date: Sun Oct 13 2002 - 02:14:14 EEST
On Sat, 12 Oct 2002 18:43:22 +0300
Smoerk <smoerk_AT_gmx.de> wrote:
> janne halttunen wrote:
> >>I want to mix several ogg network streams together. so there is mainly
> >>one thing to solve:
> > ecasound can automatically invoke such programs (ogg123) for you. So you type:
> > ecasound -i some_file.ogg
> > and get it to play.
> > If you want more than 1 file, you must use chains. Like so:
> > ecasound -a 1 -i some_file.ogg \
> > -a 2 -i other_file.ogg \
> > -a 1,2 -o /dev/dsp
> the last time I asked, Kai told me that it's not possible to do this
> with streams from the net, like:
> ecasound -i http://musiikki.fi/livestream.ogg
Oh yes. You need to use named pipes (fifos).
$ mkfifo myfifo.raw
$ ogg123 -d raw -f - http://musiikki.fi/livestream.ogg > myfifo.raw
$ ecasound -i myfifo.raw
Ofcourse you have to make sure that the formats match in stream and ecasound.
> also I need to open and close streams without restarting ecasound.
For this you need to make a script:
1. make as many fifos as max number of streams
2. initialize and start ecasound on the fifos
3. loop over:
- open and close streams
- read data from streams
- write data to fifos
- write silence to fifos that are not receiving data (*
4. exit cleanly
*) Ecasound blocks if there is no data available from input.
This archive was generated by hypermail 2b28 : Sun Oct 13 2002 - 02:20:22 EEST