问题标签 [mediasoup]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
306 浏览

javascript - 安装 mediasoup 时显示错误

尝试在window7 64位中通过命令提示符安装

npm 我媒体汤

npm cache --force clean在此处输入图像描述

0 投票
0 回答
31 浏览

kotlin - 无法在 kotlin 中使用协程在覆盖的方法中返回所需的值

我是 kotlin 和协程的新手。我一直在研究 android 应用程序的客户端-服务器部分。我为此使用了 mediasoup-client-android库。

我正在尝试使用 createSendTransport() 方法初始化 sendtransport。该方法确实有一个 sendTransportListener,它具有抽象方法。其中一个是 onProduce(),它返回一个 producerId,它是一个字符串。awaitEmit() 是一个异步操作,我在 onProduce() 中需要它。要使用 awaitEmit(),我使用了协程。但我需要 String 作为返回类型而不是 Deferred。还有其他方法可以实现上述逻辑吗?下面是我的代码

}

而且我不确定这里使用协程的方式。如果我错过了一些核心内容,请纠正我。

0 投票
1 回答
516 浏览

ffmpeg - 如何配置 ffmpeg 管道以进行流式传输

我想获取实时流数据(使用 mediasuop)并通过 ffmpeg 将其发送到 nginx-rtmp-server,但是如果我通过管道运行它,则在记录后出现错误,如下所示。我通过OBS studio程序检查了rtmp服务器是否运行良好,但是当我使用我准备好的管道运行时,出现错误。你知道这个问题发生在哪里吗?

管道有问题?Sdp有问题吗?或者是其他东西?

我的管道

和我的 sdp 文件

和错误日志

如果你能告诉我为什么不,我将不胜感激......

0 投票
0 回答
34 浏览

node.js - 为什么在网站中启用 ssl 时 Mediasoup 停止通信

我们在 UBUNTU 中部署的 NodeJS 应用程序中使用 MediaSoup。它使用 http 安全连接,但没有有效的 SSL 证书。当我们为我们的网站启用 SSL 证书时,MediaSoup 会停止通信。

有什么解决办法呢?

0 投票
0 回答
28 浏览

typescript - Typescript 类在用作另一个类的属性中的类型时出现故障

我在快速服务器应用程序中使用 mediasoap 和 typescript,这Broadcast是我定义的类型,它具有类型属性Router(在 mediasoup 模块中定义的类),问题是:
在创建广播实例时,没有创建路由器正确,这就是为什么:

  1. 我无法在控制台中记录创建的对象(console.log输出[object Object]:)
  2. 路由器对象中有一个数组作为第三级嵌套属性,称为codecs,这非常重要,并且在创建时不会设置。

但是当我单独创建路由器对象时,它工作得很好!即使我为路由器创建了一个空值的广播对象,然后使用单独创建的正常工作的路由器对象设置路由器属性,它再次停止正常运行

广播类:

这是一个演示问题的场景

广播服务类:

分离实例化:

0 投票
1 回答
81 浏览

node.js - 制作群组视频通话应用程序 wrtc vs mediasoup

我正在制作一个群组视频通话 nodejs 应用程序。

我了解了两个 npm 包

  1. wrtc - 来自这个视频https://www.youtube.com/watch?v=GMbdEnK8h3U
  2. 媒体汤

与 wrtc 82kb ( https://www.npmjs.com/package/wrtc ) 相比,mediasoup非常大 167 mb ( https://www.npmjs.com/package/mediasoup )。

我想知道为什么会有这么大的差异,哪个更适合开发组会议webapp的目的。

0 投票
1 回答
147 浏览

node.js - Error - transports.recv.connectionState stuck in new status - Mediasoup (3.7)

Trying to deploy https://github.com/fmeringdal/nettu-meet which uses mediasoup lib. Medisoup version tried are 3.7 and 3.8

When a user turns on his/her video or audio in the meeting room then getting this message on the console "transport connstate new" and then it stays stuck in this state.

Here is the code snippet which prints the above output.

Attaching below the transport related parameters in case it helps.

When the first user joins I am getting these transport options on the client.

When the second user joins the meet room, I am getting these transport options on the client.

Below is the data being sent from the server which is used in code snippet pasted above when newConsumer event happens.

Deployment infra info.

Frontend and backend are deployed as docker containers along with nginx on aws multi docker container .

For testing purposes I opened up all tcp and udp ports on the load balancer as well as the ec2 instance.

Frontend Docker File

Backend Docker File

Nginx Docker File

Https is enabled on the load balancer and node server is running as a http server.

Below is the mediasoup config file

Ip is set to 0.0.0.0 and announcedIp is set to the public ip of the ec2 instance.

EDIT

Changed docker-compose to run the containers on host network_mode as shown below:

Ip is set to private ip of the ec2 instance and announcedIp is set to the public ip of the ec2 instance.

Now the transports.recv.connectionState moves to connecting state and after a while gets disconnected.

I am new to Webrtc and mediasoup. I am stuck with this error for quite some time. Any help would be appreciated. Thanks in advance.

0 投票
0 回答
560 浏览

node.js - 使用 FFmpeg for Firefox 录制 mediasoup RTP 流

我正在尝试使用 mediasoup 录制 WebRTC 流。我可以在 2015 年 13 月 14 日在 chrome 和 safari 上成功录制。但是在 Firefox 上不起作用。

客户端代码是一个 vue js 组件,它使用 socket.io 获取 rtp-compabilities 并在服务器创建传输后创建生产者。这在 chrome 和 safari 上效果很好。

我的 ffmpeg 进程的 console.log:

FFmpeg 说dimensions not setCould not write header for output file当我使用 Firefox 时。这可能足以理解问题,但如果您需要更多信息,您可以阅读服务器端的执行情况。总结起来,服务器端可以是这样的:假设我们在运行时使用以下函数初始化了工作程序和路由器。

我们传递router.rtpCompatibilities给客户。客户端获取rtpCompatibilities并创建设备并加载它。之后,必须在服务器端创建传输。

然后在客户端也创建了传输之后,我们在事件发生时监听连接事件,我们请求服务器创建连接。

类似的事情发生在生产事件上。

对于录制,首先我为音频和视频制作者创建简单的传输。

那么 rtp 传输必须连接到端口:

然后还必须创建消费者。

之后,我们可以使用以下代码开始录制:

0 投票
1 回答
153 浏览

java - react-native 的 Mediasoup 比特率限制问题

我一直在尝试为 mediasoup 设备产生的比特率设置一个限制,但它没有用。我确实使用了多种方法,仍然没有得到任何结果。使用 google chrome 上的 webrtc-internal 观察者,我注意到其他客户端收到的比特率正在达到。比如2Mbit/s,不适合我。

以下是我使用过的两种方法:

- - - - - - - - - - - - - - - - -第一 - - - - - - - - ------------------

- - - - - - - - - - - - - - - - -第二个 - - - - - - - - ---------------

任何人都可以帮忙吗?提前致谢。

0 投票
1 回答
77 浏览

express - Mediasoup 即使在本地主机中也需要 SSL?

我正在使用 mediasoup 开发一个项目,在所有示例中,服务器都在 ssl 下运行,即使在 localhost 中也需要这样做吗?我猜证书是针对远程对等方可以使用媒体资源的,但浏览器允许在 http://localhost 中使用媒体资源