Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement MCU for Audio conference using Kurento Media Server?

I am able to stream video with Kurento using WebRTC, I need to implement multi party audio conference using MCU feature of Kurento Media server. So audio coming from all clients are merged and send back that combined audio to all clients in efficient manner using WebRTC.

if it will works then we need only two connection(one for send and one for receive) other wise we need peer connection to all clients using WebRTC. It is not feasible to establish peer connection to all all clients.

Please suggest me any sample code which have implemented MCU for audio using Kurento Media Server or guide me to implement same using Kurento Media Server.

like image 791
Nilesh Wagh Avatar asked Apr 01 '16 04:04

Nilesh Wagh


People also ask

Is Kurento a MCU?

Kurento is one of the popular and well-designed media servers that can be configured either as an MCU or SFU.

How does Kurento Media Server work?

Kurento Media Server provides, out of the box, group communications, mixing, transcoding, recording and playing. In addition, it also provides advanced modules for media processing including computer vision, augmented reality, alpha blending and much more.

Is Kurento an SFU?

Given the flexible modular approach that Kurento offers, it is possible to achieve both Selective Forwarding Unit (SFU) and Multipoint Conferencing Unit (MCU) application architectures.


1 Answers

I'm afraid there's no code that allows that un Kurento. There is the Composite media element, but that is usually for audio AND video. It combines streams into a single stream matrix of the required size, usually more than 9 streams may have performance problems. If you only want to process audio, surely it could handle much more than 9 streams. To use only audio just connect AUDIO stream to the HubPort.


EDIT 1

The code to generate the media elements needed, and the correct way establish an audio-only connection is as follows.

WebRtcEndpoint webrtc = new WebRtcEndpoint.Builder(pipeline).build();
Composite composite = new Composite.Builder(pipeline).build();
HubPort hubport = new HubPort.Builder(composite).build();
webrtc.connect(hubport, MediaType.AUDIO);

Please note that the connection is from the WebRtcEndpoint to the HubPort. If you need it to be bidirectional, you'll need to connect that way also.

hubport.connect(webrtc, MediaType.AUDIO);
like image 102
igracia Avatar answered Oct 07 '22 03:10

igracia