[ecasound] recording from jack

From: Jure Pečar <pegasus@email-addr-hidden>
Date: Wed Apr 12 2006 - 13:06:34 EEST

Hi all,

I'm new with all this 'high-end' linux audio stuff, but somehow managed
so far ...

I have a machine with two Maudio Delta 1010LT. The idea is to use its
16 analog inputs to record, compress and later stream on the net 16
stereo channels (radio stations).

I have CentOS 4 installed on a dual xeon server class machine. I began
with .asoundrc from
http://www.sound-man.co.uk/linuxaudio/ice1712multi.html, figured out
how to run jackd on it, hunted down many snippets of ecasound
commandline parameters examples on this mailing list archive and am now
running it like this:

ecasound -f:32,16,48000 -a:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 \
         -i jack_auto,alsa_pcm \
         -a:1 -f:s32_le,2,48000 -o ch1.wav \
         -a:2 -f:s32_le,2,48000 -o ch2.wav \
         -a:3 -f:s32_le,2,48000 -o ch3.wav \
         -a:4 -f:s32_le,2,48000 -o ch4.wav \
         -a:5 -f:s32_le,2,48000 -o ch5.wav \
         -a:6 -f:s32_le,2,48000 -o ch6.wav \
         -a:7 -f:s32_le,2,48000 -o ch7.wav \
         -a:8 -f:s32_le,2,48000 -o ch8.wav \
         -a:9 -f:s32_le,2,48000 -o ch9.wav \
         -a:10 -f:s32_le,2,48000 -o ch10.wav \
         -a:11 -f:s32_le,2,48000 -o ch11.wav \
         -a:12 -f:s32_le,2,48000 -o ch12.wav \
         -a:13 -f:s32_le,2,48000 -o ch13.wav \
         -a:14 -f:s32_le,2,48000 -o ch14.wav \
         -a:15 -f:s32_le,2,48000 -o ch15.wav \
         -a:16 -f:s32_le,2,48000 -o ch16.wav -c

With this I see in qjackconnect that jack ports (alsa_pcm:capture_#)
are connected to ecasound ports (ecasound:in_#). I ecasound shell I see:

ecasound ('h' for help)> engine-launch
(eca-control) WARNING: No chainsetup connected. Trying to connect
currently ... selected chainsetup.
- [ Connecting chainsetup ]
---------------------------------------------------- (eca-chainsetup)
'rt' buffering mode selected. (eca-chainsetup) Audio object
"jack_auto", mode "read". (audio-io) Format: f32_le, channels 16, srate
48000, noninterleaved. (eca-chainsetup) Audio object "ch1.wav", mode
"read/write". (audio-io) Format: s32_le, channels 2, srate 48000,
interleaved. (eca-chainsetup) Audio object "ch2.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch3.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch4.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch5.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch6.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch7.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch8.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch9.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch10.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch11.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch12.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch13.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch14.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch15.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
(eca-chainsetup) Audio object "ch16.wav", mode "read/write".
(audio-io) Format: s32_le, channels 2, srate 48000, interleaved.
- [ Chainsetup connected ]
-----------------------------------------------------
(eca-control-objects) Connected chainsetup: "command-line-setup".
ecasound ('h' for help)> - [ Engine init - Driver start ]
----------------------------------------------- (eca-engine) Using
realtime-scheduling (SCHED_FIFO:50).

ecasound ('h' for help)> start
- [ Controller/Processing started ]
-------------------------------------------- ecasound ('h' for help)> cs
### Chain status (chainsetup 'command-line-setup') ###
Chain "1" [bypassed]
Chain "2" [bypassed]
Chain "3" [bypassed]
Chain "4" [bypassed]
Chain "5" [bypassed]
Chain "6" [bypassed]
Chain "7" [bypassed]
Chain "8" [bypassed]
Chain "9" [bypassed]
Chain "10" [bypassed]
Chain "11" [bypassed]
Chain "12" [bypassed]
Chain "13" [bypassed]
Chain "14" [bypassed]
Chain "15" [bypassed]
Chain "16" [bypassed] [selected]
ecasound ('h' for help)> engine-status
running
ecasound ('h' for help)> ai-status
### Audio input/output status (chainsetup 'command-line-setup') ###
Input (1): "jack_auto,alsa_pcm" - [JACK interface]
 -> connected to chains "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16":
... realtime-device; position 0, delay 0.
 -> open, f32_le/16ch/48000Hz, buffer 1024.
Output (1): "ch1.wav," - [DB => RIFF wave file]
 -> connected to chains "1": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (2): "ch2.wav," - [DB => RIFF wave file]
 -> connected to chains "2": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (3): "ch3.wav," - [DB => RIFF wave file]
 -> connected to chains "3": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (4): "ch4.wav," - [DB => RIFF wave file]
 -> connected to chains "4": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (5): "ch5.wav," - [DB => RIFF wave file]
 -> connected to chains "5": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (6): "ch6.wav," - [DB => RIFF wave file]
 -> connected to chains "6": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (7): "ch7.wav," - [DB => RIFF wave file]
 -> connected to chains "7": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (8): "ch8.wav," - [DB => RIFF wave file]
 -> connected to chains "8": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (9): "ch9.wav," - [DB => RIFF wave file]
 -> connected to chains "9": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (10): "ch10.wav," - [DB => RIFF wave file]
 -> connected to chains "10": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (11): "ch11.wav," - [DB => RIFF wave file]
 -> connected to chains "11": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (12): "ch12.wav," - [DB => RIFF wave file]
 -> connected to chains "12": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (13): "ch13.wav," - [DB => RIFF wave file]
 -> connected to chains "13": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (14): "ch14.wav," - [DB => RIFF wave file]
 -> connected to chains "14": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (15): "ch15.wav," - [DB => RIFF wave file]
 -> connected to chains "15": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (16): "ch16.wav," - [DB => RIFF wave file]
 -> connected to chains "16": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
ecasound ('h' for help)> ao-status
### Audio input/output status (chainsetup 'command-line-setup') ###
Input (1): "jack_auto,alsa_pcm" - [JACK interface]
 -> connected to chains "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16":
... realtime-device; position 0, delay 0.
 -> open, f32_le/16ch/48000Hz, buffer 1024.
Output (1): "ch1.wav," - [DB => RIFF wave file]
 -> connected to chains "1": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (2): "ch2.wav," - [DB => RIFF wave file]
 -> connected to chains "2": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (3): "ch3.wav," - [DB => RIFF wave file]
 -> connected to chains "3": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (4): "ch4.wav," - [DB => RIFF wave file]
 -> connected to chains "4": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (5): "ch5.wav," - [DB => RIFF wave file]
 -> connected to chains "5": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (6): "ch6.wav," - [DB => RIFF wave file]
 -> connected to chains "6": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (7): "ch7.wav," - [DB => RIFF wave file]
 -> connected to chains "7": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (8): "ch8.wav," - [DB => RIFF wave file]
 -> connected to chains "8": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (9): "ch9.wav," - [DB => RIFF wave file]
 -> connected to chains "9": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (10): "ch10.wav," - [DB => RIFF wave file]
 -> connected to chains "10": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (11): "ch11.wav," - [DB => RIFF wave file]
 -> connected to chains "11": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (12): "ch12.wav," - [DB => RIFF wave file]
 -> connected to chains "12": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (13): "ch13.wav," - [DB => RIFF wave file]
 -> connected to chains "13": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (14): "ch14.wav," - [DB => RIFF wave file]
 -> connected to chains "14": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (15): "ch15.wav," - [DB => RIFF wave file]
 -> connected to chains "15": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.
Output (16): "ch16.wav," - [DB => RIFF wave file]
 -> connected to chains "16": position (0.000/0.000) seconds.
 -> open, , s32_le/2ch/48000Hz, buffer 1024.

At this point I'd expect to see something written in the wav files,
however all remain at constant size of 44 bytes. Top shows both jackd
and ecasound munching about 40% of cpu each, so the load is around 0.8.

Questions:

1. Why is the audio not written to wav files? I can see the input
signal if I run evny24control ...

2. Can I afford to run 16 lame processes to compress this to mp3?

3. What is the proper way in this setup to selectively turn on/off some
channel? I'm planning to run ecasound in daemon mode and have a mngmt
app connecting to it and controlling it.

-- 
Jure Pečar
http://jure.pecar.org
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Wed Apr 12 16:15:03 2006

This archive was generated by hypermail 2.1.8 : Wed Apr 12 2006 - 16:15:03 EEST