muaz-khan / WebRTC-Experiment

WebRTC, WebRTC and WebRTC. Everything here is all about WebRTC!!
https://www.webrtc-experiment.com/
MIT License
11.65k stars 3.95k forks source link

many-to-many with NAT traversal #65

Open tilllt opened 10 years ago

tilllt commented 10 years ago

Hi, on my brief research on WebRTC, i was looking into the possibility to do prerecorded and live broadcast, reducing bandwitdh by incorporating p2p distribution of the streams.

So: lets say a server is transmitting 1 prerecorded stream and one live stream. if somebody connects to it, the server will stream to that client (1). if more people connect to it, they will start streaming to each other, so the overall bandwidth for the server is always only that of 1 Live and 1 Prerecorded stream.

  1. Question: Have you looked onto that possibility?
  2. Question: How to deal with NAT traversal?

Or do you know of any examples where people do exactly that? Most examples are focused on video conference, which is not what i am looking for.

cheers, t.

muaz-khan commented 10 years ago

NGVX or BigBlueButton seems providing server side stream processing stuff e.g. mix multiple streams together and generate grid like output; and resulting stream can be broadcasted over relevant peers.

Use an external ICE server like this: https://code.google.com/p/rfc5766-turn-server/

Or for quick connections; use STUN over node.js to reduce number of servers and external requests; and to gather ICE candidates in realtime.

There are dozens of voip-based companies doing same thing; their primary focus is media servers. E.g. lynckia etc.