How to record a relayed stream on server using TURN

落花浮王杯 提交于 2020-01-12 17:40:42

问题


So here's the story, I'm building a WebRTC app and I have to record the stream on server.

"WebRTC is p2p dude, choose a media server"

Yes, I know, please avoid this comment ;)

But then I tought about one thing, what if I force all the stream to use the TURN server. The packets are going through the server, so I guess I can take them and save it

The question is how to do this.

Any suggestions?


回答1:


TURN servers are intended to be relayed media, which means that media streams are not decrypted, mux'ed, processed, or recorded. I get that you're asking to avoid the "choose a media server" comment, but that's like saying "I need put in this screw; which hammer should I use? Please don't tell me to get a screwdriver." - The hammer isn't the right tool.

You can still use WebRTC and p2p, but the media server (like Jitsi, for example) acts as a peer in a star topology, where all streams are sent to the media server, and can be recorded, relayed, bundled, etc.




回答2:


You can use a WebRTC gateway like Janus or Kurento (I assume you have figured it out by now :) )



来源:https://stackoverflow.com/questions/26181441/how-to-record-a-relayed-stream-on-server-using-turn

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!