miroslavpejic85 / mirotalk

🚀 WebRTC - P2P - Simple, Secure, Fast Real-Time Video Conferences Up to 8k and 60fps, compatible with all browsers and platforms.
https://p2p.mirotalk.com
GNU Affero General Public License v3.0
3.03k stars 558 forks source link

Unstablity if I connect with 6 users at the same time #24

Closed mmodi97 closed 3 years ago

mmodi97 commented 3 years ago

can you please tell how to make a stable connection for more than 6 users. its disconnecting after sometime and remove peer reconnect with the stun or turn server. Is there any server requirement and other configuration that you can suggest me ? Thanks in advance

miroslavpejic85 commented 3 years ago

Hi @mmodi97 welcome! The 6 connected users to the same room are from 6 different devices?

mmodi97 commented 3 years ago

yes

miroslavpejic85 commented 3 years ago

Mirotalk has no intermediate media server for audio-video communication, they are pure peer to peer connections between browsers, therefore it requires a good Bandwidth - CPU.

mmodi97 commented 3 years ago

yes i have tested this i also tested on ec2 instance 72V cpu 192gb ram and 100 gbps bandwidth turn server but its still unstabling can you suggest me what can be the configuration to make it smooth for more than 6-7 users.

miroslavpejic85 commented 3 years ago

I meant that peer devices must all have a good Bandwith - CPU. Anyway is not a turn server the problem, but from the fact that current WebRTC Mesh architecture is not optimal for conferences with more than 6-8 users in the same room. The quality of the call is inversely proportional to the number of people on the call. The approximative users supported in a single room should be around 6-8 in an average high-speed connection. The solution could be to have a support media server and change the current architecture to MCU (MultiPoint Control Unit) or SFU (Selective Forwarding Unit), Which also requires maintenance costs for those servers. I could do it in the future if the project grows.

mirotalk-mesh

Thank to you for reporting this issue. 😉

mmodi97 commented 3 years ago

Ok understand @miroslavpejic85 Thanks for your support and for your repository. I learnt a lot .I am trying to solve the issue also contribute if I got something . I hope you also will try to fix it 😃 ✌

Jaideep25 commented 3 years ago

Hey @mmodi97 welcome! Actually for @miroslavpejic85 it's working perfectly... and even for me... as you can see in the image below! I tried connecting using local host using 4 differrent browsers and it crashed.... but with different laptops it worked good! image

mmodi97 commented 3 years ago

@Jaideep25 Hey you are connected with different network or same network when we connect with different network different devices its reconnect again and again so not running 6 at the same time it removes the peer connection and connect again.

Jaideep25 commented 3 years ago

This is with different connections... This is the pic which @miroslavpejic85 had taken ;)

mmodi97 commented 3 years ago

ok I am facing this issue in my region I dont know why its happening may be because of low bandwidth in connectivity . I also have connected with 6 but it remove anyone after sometime not maintain the stability. Is it working fine with 6 there or not remove and reconnect anyone? 🙂 @Jaideep25 Thanks

miroslavpejic85 commented 3 years ago

@mmodi97 Just out of curiosity try mirotalk here too: https://mirotalk.up.railway.app/ tell me if anything changes? And thanks to you for using mirotalk, I'm glad you find it useful. ❤️ Any contribution is always welcome! 💪

Jaideep25 commented 3 years ago

ok I am facing this issue in my region I dont know why its happening may be because of low bandwidth in connectivity . I also have connected with 6 but it remove anyone after sometime not maintain the stability. Is it working fine with 6 there or not remove and reconnect anyone? 🙂 @Jaideep25 Thanks

@mmodi97 hey, sorry for replying so late I was down with fever, For me at 1st it wasn't working fine if I connected 6 peers in the same laptop, but if I connected with 6 devices it worked good! Thanks!

mmodi97 commented 3 years ago

hey @Jaideep25 I hope you are well now I got your point and I read about peer to peer and mcu/sfu based web rtc .Mirotalk is based on peer to peer if any peer have low bandwidth it will disconnect from the others and other peers will disturb because it devides the bandwidth as per the peers . if 6 peers are connected and each peer takes 1 Mb bandwidth . now other peers have connection of which have 6mb bandwidth of downloading and uploading of 1mb. but in sfu there internet connection matters but not that much. and load balance can be manage using sfu device. I was looking for sfu based video calling. video conferencing platforms like zoom, google meet uses media servers to manage the load and quality of streams . I appreciate and thankful to @miroslavpejic85. he tried best for peer to peer. Thanks @Jaideep25

miroslavpejic85 commented 3 years ago

A very nice step would be to integrate an SFU server such as mediasoup or similars on mirotalk , to have more large number of users connected in the same room using less bandwidth. This will be a very next nice goal! 🏆 Alone it's more challenging but together we can reach the goal without problems. 💪 The collaborators are always welcome and thank you all guy that they believe in this project! ❤️🥰😍

Alone we walk fast, but together we go far....
miroslavpejic85 commented 3 years ago

I go to close this task and create a new one to achieve this goal! ;) https://github.com/miroslavpejic85/mirotalk/issues/35