如何将 kurento-media-server 用于纯音频流? [英] How to use kurento-media-server for audio only stream?

查看:36
本文介绍了如何将 kurento-media-server 用于纯音频流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想在对等点之间进行音频流通信,我更改了 kurento.utils.js 的部分以通过 getusermedia 仅获取音频流但它不起作用
我使用了这个例子 node-hello-world例子

I want to have only audio stream communication between peers , I changed the parts of kurento.utils.js to get only audio stream via getusermedia but it's not working
I used this example node-hello-world example

WebRtcPeer.prototype.userMediaConstraints = {
    audio : true,
    video : {
        mandatory : {
            maxWidth : 640,
            maxFrameRate : 15,
            minFrameRate : 15
        }
    }
};

WebRtcPeer.prototype.userMediaConstraints = {
    audio : true,
    video : false
};

是否可以仅将 kurento 服务用于音频流?

is it possible use kurento service for only audio stream?

推荐答案

这确实可以通过 Kurento 实现.有两种方法可以执行此操作,具体取决于所需的修改范围:

This is indeed possible with Kurento. There are two ways of doing this, depending on the desired scope of the modification:

  1. 每个 webrtc 端点:当您处理客户端发送的 SDP 报价时,您会从 KMS 获得一个必须发回的 SDP 应答.在调用 processOffer 方法调用后,您可以篡改 SDP 以删除所有视频部分.这样,您的客户端将只发回音频.
  2. 全局:您可以编辑 /etc/kurento/sdp_pattern.txt 文件删除所有与视频相关的部分,这将强制 SdpEndpoints(WebrtcEndpoint 的父类)仅使用音频.
  1. Per webrtc endpoint: when you process the SDP offer sent by the client, you get an SDP answer from KMS that you have to send back. After invoking the processOffer method call, you can tamper the SDP to remove all video parts. That way, your client will send back only audio.
  2. Globally: You can edit /etc/kurento/sdp_pattern.txt file removing all video related parts, this will force SdpEndpoints (parent class of WebrtcEndpoint) to only use audio.

<小时>

编辑 1


EDIT 1

文件 sdp_pattern.txt 在 KMS 6.1.0 中已弃用,因此不应使用方法 2.

The file sdp_pattern.txt is deprecated in KMS 6.1.0, so method 2 shouldn't be used.

编辑 2

kurento-utils 库存在问题,客户端未正确设置 OfferToReceiveAudio.前段时间已修复,您现在不需要篡改 SDP.

There was an issue with the kurento-utils library, and the client was not correctly setting the OfferToReceiveAudio. It was fixed some time ago, and you shouldn't need tampering the SDPs now.

这篇关于如何将 kurento-media-server 用于纯音频流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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