Re: [ecasound] how to use ecasound in pipe?

From: Sergei Steshenko <sergstesh@email-addr-hidden>
Date: Sat Oct 11 2008 - 08:25:17 EEST

--- On Fri, 10/10/08, Milos Wimmer <wimmer@email-addr-hidden> wrote:

> From: Milos Wimmer <wimmer@email-addr-hidden>
> Subject: [ecasound] how to use ecasound in pipe?
> To: ecasound-list@email-addr-hidden
> Date: Friday, October 10, 2008, 4:17 PM
> Hi,
>
> at first, please excuse my stupid question...
>
> I would like to stream live ADAT data from my RME
> Hammerfall HDSP card to
> FLAC. Because I have lot of different channels in ADAT, I
> need to split
> them and so I'm using JACK audio server. JACK works
> fine for me.
> Problem is that I don't know any working FLAC stream
> producer with JACK
> input module. New version of vlc supports it, but
> jack_access input module
> is broken :-(
> So my idea was to use some JACK reader/connector which can
> sent WAV data
> to its standard output and then to use 'vlc' which
> will read these WAV
> data on its standard input and will transcode them to FLAC
> stream (and
> will be work as a server for clients too).
> I mean this:
>
> ADAT/RME --> JACK --> reader_from_jack_to_WAV |
> vlc <--- clients
>
> I tried to use ecasound as a
> 'reader_from_jack_to_WAV' component.
> But I don't know how to set it for producing WAV data
> on its standard
> output.
>
> When I type:
> ecasound -i ... -o:sndfile,-,wav > /tmp/output.wav
> in first step, it is ok, I have output.wav file in WAV
> and when I type:
> cat /tmp/output.wav | vlc ....
> in second step, it is ok too, vlc produces output FLAC
> stream.
>
> But I need to use them both together in pipe. In this case:
>
> ecasound -i ... -o:sndfile,-,wav | vlc
>
> does not work.
> In fact -
> ecasound -i ... -o:sndfile,-,.wav | cat >
> /tmp/output.wav
>
> writes:
> ERROR: Connecting chainsetup failed: "Enabling
> chainsetup:
> AUDIOIO-SNDFILE: Can't open file "-" for
> updating (read/write)."
>
> and
> ecasound -i ... -o:stdout,.wav | cat > /tmp/output.wav
>
> writes data in raw format (probably) to output file.
>
>
>
> Please - could I use ecasound with WAV on standard output
> in pipe?
>
> I will appreciate any other idea how to solve my problem
> or recommendation to other readers/producers too ;-)
>
> Thank you very much for your help,
>
> Regards,
>
> Milos
>

Well, if I understand your problems/questions correctly, you need a
number of things:

1) FLAC -> headerless raw audio:

flac \
--force-raw-format \
--endian=little \
--sign=signed \
-d \
-c \
FILE_1.flac ... FILE_N.flac

- the above outputs to stdout;

2) ecasound input from the above:

ecasound -D -z:nodb -f 16,2,44100 -i stdin <the_rest_of_arguments>
.

So, together it may look like

flac \
--force-raw-format \
--endian=little \
--sign=signed \
-d \
-c \
FILE_1.flac ... FILE_N.flac \
| \
ecasound \
-D \
-z:nodb \
-f 16,2,44100 \
-i stdin \
<the_rest_of_arguments>
.

You may also consider using named pipes, but then the ecasound part should
be explicitly started before the flac part.

Anyway, look up the command line options I've given you in the man pages.

The above proposed command lines are edited real life commands I'm using.

Regards,
  Sergei.

      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sat Oct 11 12:15:01 2008

This archive was generated by hypermail 2.1.8 : Sat Oct 11 2008 - 12:15:01 EEST