本文介绍了如何使用Kurento Media Server实现音频会议的MCU?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够使用WebRTC与Kurento进行视频流传输,我需要使用Kurento Media服务器的MCU功能来实现多方音频会议.因此,来自所有客户端的音频将被合并,并使用WebRTC高效地将合并后的音频发送回所有客户端.

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.

如果它可以工作,那么我们只需要两个连接(一个用于发送,一个用于接收),否则,我们需要使用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.

请向我建议使用Kurento Media Server实现音频MCU的任何示例代码,或指导我使用Kurento Media Server实现音频的MCU.

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.

推荐答案

恐怕没有允许该Kurento的代码.有 Composite 媒体元素,但这通常用于音频和视频.它将流合并到所需大小的单个流矩阵中,通常9个以上的流可能会出现性能问题.如果只想处理音频,那么肯定可以处理9个以上的流.要仅使用音频,只需将AUDIO流连接到HubPort.

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.

编辑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);

请注意,连接是从WebRtcEndpointHubPort的.如果您需要双向连接,则也需要以这种方式连接.

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);

这篇关于如何使用Kurento Media Server实现音频会议的MCU?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 17:43