[arm-allstar] send up to 10 streams with outstreamcmd
David McGough
kb4fxc at inttek.net
Wed Oct 30 00:52:41 EDT 2019
Okay, here is some code to play with...I've tested it a little and I
*think* it works.
Here is the code:
https://hamvoip.org/downloads/nptee-v-0.1.tgz
untar (cd ; tar xvf nptee-v-0.1.tgz) and cp the nptee binary to
/usr/local/bin
In rpt.conf, usage similar to:
outstreamcmd=/usr/local/bin/nptee,pipe1,pipe2
The stream named pipes in this example are:
/tmp/outsound/pipe1
/tmp/outsound/pipe2
Note that you can have up to 10 named pipes (streams)...So, this would
have 6 streams:
outstreamcmd=/usr/local/bin/nptee,p1,p2,p3,p4,p5,p6
The stream pipe names in this example are:
/tmp/outsound/p1
/tmp/outsound/p2
/tmp/outsound/p3
/tmp/outsound/p4
/tmp/outsound/p5
/tmp/outsound/p6
....Then, from another script:
lame --preset cbr 16 -r -m m -s 8 --bitwidth 16 /tmp/outsound/pipe1 - 2>/tmp/status |
ezstream -qvc /etc/ezstream.xml
....Then, from 2nd script:
lame --preset cbr 16 -r -m m -s 8 --bitwidth 16 /tmp/outsound/pipe2 - 2>/tmp/status |
ezstream -qvc /etc/ezstream.xml
....And, repeat for up to 10 scripts or as many streams as you've
defined.
The nptee program isolates asterisk/app_Rpt from the client applications.
So, if lame or ezstream need to get restarted, just kill and restart them.
Asterisk shouldn't be affected, HOPEFULLY!
Source code is included and should work with modern Linux versions.
Once this code is tested (and refined some more), I'll package it with
HamVoIP for easier distribution.
Have fun.
73, David KB4FXC
On Tue, 29 Oct 2019, "David McGough via ARM-allstar" wrote:
>
> A little 'C' (or python, etc.) program to buffer between the outstreamcmd
> in app_rpt and the remainder of the audio processing chain has been on the
> to-do list for a while now--that would solve other problems, too.
>
> I'll try to hack this together, unless someone else want to give it a go?
>
> My thoughts had been basically a program that reads a single stream via
> STDIN and the tees that stream to 1 or more output named pipes. Then,
> other applications would read audio coming from its named pipe.
>
>
> 73, David KB4FXC
>
>
More information about the ARM-allstar
mailing list