Hi - I've seen the odd query on the list about building and scaling large audio conferences. Given that most callers will be listen-only, it's possible to scale up by transmitting a single RTP stream to multiple callers. Here's some proof-of-concept code, which roughly halves the CPU usage for a 200-user (plus one speaker) conference, written in that highest of performance languages, Perl: http://www.softivr.com/wiki/index.php/HP_Conferencing --Dave
You know freeswitch conferencing already has this stuff built into C... You just tag the users you don't want as speakers to be muted and it never calls the mixer for those streams, it only mixes the talkers then muxes those frames out to the other callers. Using this mechanism and an external call director its possible to have 1000s of 'listeners' spread across multiple boxes with talkers all confined to a 'master' box that also provides shoutcasting etc On 3/27/10 7:50 PM, "David Knell" <dave@3c.co.uk> wrote:
Hi -
I've seen the odd query on the list about building and scaling large audio conferences. Given that most callers will be listen-only, it's possible to scale up by transmitting a single RTP stream to multiple callers.
Here's some proof-of-concept code, which roughly halves the CPU usage for a 200-user (plus one speaker) conference, written in that highest of performance languages, Perl: http://www.softivr.com/wiki/index.php/HP_Conferencing
--Dave
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Ken, Yes, to an extent. But FS still has to transcode from L16 to whatever codec each caller is using separately, run a thread for each caller, etc., etc. The test case which I ran used G.711 to minimise transcoding time, and the 200 listeners didn't generate any RTP, which should have roughly the same effect (looking at the code) as muting them in the conference. I suspect that there would be much more of a difference with a more complex codec and/or listeners which generated RTP. --Dave
You know freeswitch conferencing already has this stuff built into C... You just tag the users you don't want as speakers to be muted and it never calls the mixer for those streams, it only mixes the talkers then muxes those frames out to the other callers. Using this mechanism and an external call director its possible to have 1000s of 'listeners' spread across multiple boxes with talkers all confined to a 'master' box that also provides shoutcasting etc
On 3/27/10 7:50 PM, "David Knell" <dave@3c.co.uk> wrote:
Hi -
I've seen the odd query on the list about building and scaling large audio conferences. Given that most callers will be listen-only, it's possible to scale up by transmitting a single RTP stream to multiple callers.
Here's some proof-of-concept code, which roughly halves the CPU usage for a 200-user (plus one speaker) conference, written in that highest of performance languages, Perl: http://www.softivr.com/wiki/index.php/HP_Conferencing
--Dave
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
the copy the encoded frame trick is nice, BUT it can't really be used for any codec that has state. On Sunday, March 28, 2010, David Knell <dave@3c.co.uk> wrote:
Hi Ken,
Yes, to an extent. But FS still has to transcode from L16 to whatever codec each caller is using separately, run a thread for each caller, etc., etc.
The test case which I ran used G.711 to minimise transcoding time, and the 200 listeners didn't generate any RTP, which should have roughly the same effect (looking at the code) as muting them in the conference. I suspect that there would be much more of a difference with a more complex codec and/or listeners which generated RTP.
--Dave
You know freeswitch conferencing already has this stuff built into C... You just tag the users you don't want as speakers to be muted and it never calls the mixer for those streams, it only mixes the talkers then muxes those frames out to the other callers. Using this mechanism and an external call director its possible to have 1000s of 'listeners' spread across multiple boxes with talkers all confined to a 'master' box that also provides shoutcasting etc
On 3/27/10 7:50 PM, "David Knell" <dave@3c.co.uk> wrote:
Hi -
I've seen the odd query on the list about building and scaling large audio conferences. Given that most callers will be listen-only, it's possible to scale up by transmitting a single RTP stream to multiple callers.
Here's some proof-of-concept code, which roughly halves the CPU usage for a 200-user (plus one speaker) conference, written in that highest of performance languages, Perl: http://www.softivr.com/wiki/index.php/HP_Conferencing
On Sun, 2010-03-28 at 13:22 -0500, Michael Jerris wrote:
the copy the encoded frame trick is nice, BUT it can't really be used for any codec that has state.
Not sure that this particularly affects things: any codec which retains state from packet to packet still has to be able to recover from packet loss, and so the decoder has somehow to converge towards the encoder's state. G.729 (just to take an example) typically takes 100ms for this to happen - http://www.cs.columbia.edu/techreports/cucs-016-01.pdf - a video stream would be corrupt until the next I-frame. --Dave
On Sunday, March 28, 2010, David Knell <dave@3c.co.uk> wrote:
Hi Ken,
Yes, to an extent. But FS still has to transcode from L16 to whatever codec each caller is using separately, run a thread for each caller, etc., etc.
The test case which I ran used G.711 to minimise transcoding time, and the 200 listeners didn't generate any RTP, which should have roughly the same effect (looking at the code) as muting them in the conference. I suspect that there would be much more of a difference with a more complex codec and/or listeners which generated RTP.
--Dave
You know freeswitch conferencing already has this stuff built into C... You just tag the users you don't want as speakers to be muted and it never calls the mixer for those streams, it only mixes the talkers then muxes those frames out to the other callers. Using this mechanism and an external call director its possible to have 1000s of 'listeners' spread across multiple boxes with talkers all confined to a 'master' box that also provides shoutcasting etc
On 3/27/10 7:50 PM, "David Knell" <dave@3c.co.uk> wrote:
Hi -
I've seen the odd query on the list about building and scaling large audio conferences. Given that most callers will be listen-only, it's possible to scale up by transmitting a single RTP stream to multiple callers.
Here's some proof-of-concept code, which roughly halves the CPU usage for a 200-user (plus one speaker) conference, written in that highest of performance languages, Perl: http://www.softivr.com/wiki/index.php/HP_Conferencing
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
David Knell
-
Ken Rice
-
Michael Jerris