简体   繁体   English

Node.js EasyRTC视频记录

[英]Node.js EasyRTC video record

I'm using easyrtc framework for node.js in order to provide web site with video chat. 我正在为node.js使用easyrtc框架,以便为网站提供视频聊天。 I need to record the video from each chat session. 我需要记录每个聊天会话中的视频。 Unfortunately easyrtc doesn't have such option. 不幸的是easyrtc没有这种选择。 I suppose it's because node server playing role of "signaling" server. 我想这是因为节点服务器扮演着“信令”服务器的角色。 Does anybody know whether the solution of this issue exists? 有人知道这个问题的解决方案是否存在吗? Maybe I should dynamically send video from client back to server or something else? 也许我应该将客户端的视频动态发送回服务器或其他东西? I would appreciate all your advice! 我会很感激您的所有建议!

WebRTC was created to generate p2p video conferences, this means that the media will go from a client directly to the other without stopping in the server. WebRTC的创建是为了生成p2p视频会议,这意味着媒体将直接从客户端传播到另一个客户端,而无需在服务器中停止。

In order to capture the media at the server, you can do any of the following: 为了在服务器上捕获媒体,您可以执行以下任一操作:

  1. Let the clients record the video and upload it to the server (can be done with EasyRTC), or 让客户端录制视频并将其上传到服务器(可以通过EasyRTC完成),或者
  2. Let the server stay in the middle using a WebRTC gateway: How to record a relayed stream on server using TURN 使用WebRTC网关让服务器位于中间: 如何使用TURN在服务器上记录中继流

The first option is easier to implement but will require the users to send the videos using their bandwith. 第一个选项易于实现,但是将要求用户使用其带宽来发送视频。 If they send the video while on the conference, it will result in quality loss since they will be sending video twice. 如果他们在会议期间发送视频,则会导致质量下降,因为他们将发送两次视频。 If they send the video once the conference is done, you have the risk on them leaving the page before the upload is completed. 如果他们在会议结束后发送视频,则有风险让他们在上传完成之前离开页面。

The second option will require you to deploy a WebRTC gateway which will require huge processing and bandwith resources but it will solve all the problems at client level. 第二个选项将要求您部署WebRTC网关,这将需要大量处理和带宽资源,但是它将解决客户端级别的所有问题。 You may want to take a look at Janus and/or Kurento . 您可能想看看Janus和/或Kurento There are other more complex WebRTC gateways which will allow you to connect WebRTC with SIP (VoIP) like Asterisk , Kamailio or FreeSWITCH . 还有其他更复杂的WebRTC网关,使您可以将WebRTC与SIP(VoIP)连接,例如AsteriskKamailioFreeSWITCH

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM