WebRTC on iOS: how to establish multipeer connection (one-to-many video broadcasting)?

1,783 views
Skip to first unread message

Sasha Yakovlev

unread,
Jul 12, 2016, 3:49:43 AM7/12/16
to discuss-webrtc
Is it true that WebRTC supports only one-to-one p2p connection? Do I have to build my own media server to establish one-to-many video broadcasting? Now I'm using libjingle_peerconnectioninstalled with cocoapods in my app and already have working one-to-one connection.

Max Lapshin

unread,
Jul 12, 2016, 4:41:42 AM7/12/16
to discuss-webrtc
You need either to build  mesh topology,  either install media server.

Silvia Pfeiffer

unread,
Jul 12, 2016, 6:46:13 AM7/12/16
to discuss...@googlegroups.com
Peer-to-peer also scales to multi-peer - it's just a full mesh of connections.
HTH,
Silvia.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "discuss-webrtc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to discuss-webrt...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/discuss-webrtc/90f4c14c-8059-4722-ac6a-e468af32f27b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Sasha Yakovlev

unread,
Jul 20, 2016, 4:15:59 AM7/20/16
to discuss-webrtc
Could you explain more in details, please? I've already googled a lot and have found poor information about it.

Utkarsh Singh

unread,
Jul 22, 2016, 6:04:45 AM7/22/16
to discuss-webrtc
WebRTC is peer-to-peer media pipeline. If you want one to many broadcasting:

lets suppose there're five clients - One (Initiator) will broadcast A/V and four will do only receiving.

In this case you need to create 4 peer-to-peer (n-1) connections at initiator side with offer constraints OfferToReceiveAudio=false and OfferToReceiveVideo=false
because broadcaster doesn't want A/V of others.

Other four will create only 1 peer connection with initiator at their sides - offer constraints OfferToReceiveAudio=true and OfferToReceiveVideo=true

Remember those four will not create connections for each other because its one-to-many.


If it's a normal implementation like broadcasting to ~ 5 users, this approach would be good.

If you want to implement it at large scale like 10-15 users Media server is required because sending your A/V to 10-15 users is costly for your device but if you use Media server then you'll send your A/V to media server only and server will do the rest.

Sasha Yakovlev

unread,
Jul 25, 2016, 3:23:43 AM7/25/16
to discuss-webrtc
 Thanks for help, I'll try your solutions.

Sasha Yakovlev

unread,
Jul 27, 2016, 3:35:26 AM7/27/16
to discuss-webrtc

On Friday, 22 July 2016 13:04:45 UTC+3, Utkarsh Singh wrote:
WebRTC is peer-to-peer media pipeline. If you want one to many broadcasting:

If you want to implement it at large scale like 10-15 users Media server is required because sending your A/V to 10-15 users is costly for your device but if you use Media server then you'll send your A/V to media server only and server will do the rest.

What architecture will be in this case, could you explain it with some scheme or links with reading? Should I do offer / answer dance directly with servers? What ICE I should accept, server's ICE or other peer's ICE? Should I run WebRTC on server? 

Silvia Pfeiffer

unread,
Jul 27, 2016, 4:00:35 PM7/27/16
to discuss...@googlegroups.com

https://bloggeek.me/webrtc-multiparty-video-alternatives/ has a good high level overview.

Here's an example of using a full mesh approach with only per to peer multipeer calls: http://blog.mgechev.com/2014/12/26/multi-user-video-conference-webrtc-angularjs-yeoman/

This will work for maybe 3-8 endpoints with video and maybe 20 endpoints with audio only.

If you want to scale beyond that, you need either a SFU (selective forwarding unit) or a media server/MCU (media control unit). There are a few open source servers around: jitsi, kurento, ibm's media server, meedooze, Janus.

If you want the other peers to just receive and not send, you can also use broadcasting. Here is an example: https://www.webrtc-experiment.com/broadcast/.

So, you first need to understand your use case and architecture before going on to choosing/implementing your solution.

Best Regards,
Silvia.


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.

Sasha Yakovlev

unread,
Jul 28, 2016, 1:53:47 AM7/28/16
to discuss-webrtc
On Wednesday, 27 July 2016 23:00:35 UTC+3, Silvia Pfeiffer wrote:

https://bloggeek.me/webrtc-multiparty-video-alternatives/ has a good high level overview.


Thanks a lot for help! 
Reply all
Reply to author
Forward
0 new messages