如何使用 Kurento Media Server 实现音频会议的 MCU? [英] How to implement MCU for Audio conference using Kurento Media Server?

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

问题描述

我可以使用 WebRTC 通过 Kurento 流式传输视频,我需要使用 Kurento 媒体服务器的 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 实现相同的代码.

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.

推荐答案

恐怕没有代码可以允许 un 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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆