Re: [ecasound] One more question

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] One more question
From: S. Massy (theanaloguekid_AT_tak.net.dhis.org)
Date: Fri Oct 05 2001 - 04:50:37 EEST


On Thu, 04 Oct 2001, Kai Vehmanen <k_AT_eca.cx> wrote:

> On Wed, 3 Oct 2001, S. Massy wrote:
>
> > The problem with this approach is that it only addresses one feature
> > selection (bitrate). What if someone wants to write one file downmixed
>
> True. But getting around this problem is not entirely straightforward. For
> instance...
>
> > ecasound -a:1,2 -i:/dev/dsp \
> > -a:1 -o:hr_output.mp3,"-b 128" \
> > -a:2 -o:lr_output.mp3,"-b 24"
>
> ... would depend on command shell's features (ie. "-expansion). Doable,
> but not a perfect solution. One thing I've thougth about would be to add
> generic parameters to ~/.ecasoundrc. For instance you could have:
>
> ext-mp3-output-cmd = lame -b %1 -m %2 -x -S - %f
>
> And then with...
>
> ecasound -i /dev/dsp -o output.mp3,128,s
>
> ... ecasound would fork lame as:
>
> lame -b 128 -m s -x -S - output.mp3
>
> Youd could have as many params you like. And the same thing for ogg,
> mikmod and others.

That's a good idea but I see three issues:
- With such setup you would always need to enter all those parameters.
- You won't necessarily want to modify the same parameters each time.
- You can only modify parameters on the fly but not decide whether a
  switch will be present or not.

One answer to the first two issues could be to set up defaults for each
variable parameter such as:
ext-mp3-output-cmd = lame -b %1(128) -m %2(j) -x -S - %f
If a parameter is not specified on the command-line it falls back to
the specified default; you could also make it so that a special
symbol, say a dash, would make this specific parameter resort to the
selected default. For example, assuming the above line in ecasoundrc:
1) ecasound -i:/dev/dsp -o:file.mp3
2) ecasound -i:/dev/dsp -o:file.mp3,112
3) ecasound -i:/dev/dsp -o:file.mp3,-,m
First one forks lame with the default of "-b 128 -m j".
Second one does so with "-b 112 -m j".
Third one is "-b 128 -m m".

Solutions to the third problem are a bit complicated, maybe some
presets would solve it nicely; for example:
mp3 = -b %1(128) -m %2(j) -x -S - %f
mp3_vbr = -v --abr %1(160) -m %2(j) -b %3(32) -B %4(320) -x -S - %f

Then you could do:
1) ecasound -i:/dev/dsp -o:file.mp3
2) ecasound -i:/dev/dsp -o:file.mp3,mp3_vbr,-,s,64
The first one, because no option is specified at all, would default to
the first defined template with all defaults.
The second would fork lame with "-v --abr 160 -m s -b 64 -B 320".

But of course it all becomes a bit complicated... but then, that's the
price to flexibility. :(
As an alternative, I guess one could do:
ext-mp3-output-cmd = lame -b %1(128) -m %2(j) %3("") %4("") [...] -x -S - %f
It would let one enter switches and arguments (coma separated) from
the command-line; it's more of a dirty hack than anything but it would
work and would be more simple than presets.

>
> --
> http://www.eca.cx
> Audio software for Linux!
>
> --
> To unsubscribe send message 'unsubscribe' in the body of the
> message to <ecasound-list-request_AT_wakkanet.fi>.
>

--
To unsubscribe send message 'unsubscribe' in the body of the
message to <ecasound-list-request_AT_wakkanet.fi>.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Oct 05 2001 - 04:46:34 EEST