6 ms·
WebRTC with STUN is pure p2p where ffmpeg it requires a rtmp or rtsp server
by bodegajed 6y ago
WebRTC with STUN is pure p2p where ffmpeg it requires a rtmp or rtsp server
- diericx 6y agoAhh I see
- deleted 6y ago[deleted]
- jcelerier 6y ago... how is STUN pure p2p ? you still need to have a STUN server somewhere no ?
- bodegajed 6y agoYou can just use google stun servers they are free to use
- _joel 6y agoHere's a list of public STUN servers (non google too) https://www.voip-info.org/stun/ https://www.voip-info.org/stun/
- j1elo 6y agoSTUN is just for punching holes in your NAT router, and also discovering what is your public IP address. Both things will be needed for the other peer to know where to reach you. And the other way around. Once this NAT thing has been done by both parts, and the actual communication has started directly P2P, STUN is not needed any more.
- jcelerier 6y ago> STUN is just for punching holes in your NAT router, and also discovering what is your public IP address. I know, but what I mean is that "true P2P" on our current internet architecture is not possible, you always need the help of a third party
- bodegajed 6y agoIf we are still in the 90's that definition of "true p2p" would be: two computers with both having public IPs and transferring packets via TCP. But nowadays we are always behind NATs so we became less strict with the definition of what is true p2p
- the8472 6y agoThen bittorrent is transcendent p2p?
- BlueTemplar 6y agoIPv6 is slowly taking over, hopefully in the near future being behind a NAT will be considered abnormal (just like happened with Unicode, we're around 35% = "Unicode 2009", popularity-wise).
- noseratio 6y agoYou'd also need a TURN server if both peers are behind NAT without UPnP, which is very common. STUN alone wouldn't be enough.
- callesgg 6y agoThat is partially incorrect, STUN can punch a hole through even when both sides uses NAT in many cases. That is what I would classify as STUN’s main feature.
- rashkov 6y agoNote that parent said “ if both peers are behind NAT without UPnP”. As far as I know, there’s no way to punch holes / open ports automatically without UPnP.
- uuidgen 6y agoPunching holes doesn't work only when network devices in between are broken or are actively preventing it. From the network point of view it looks the same as two hosts starting an outgoing TCP connection through nat - if that works then hole punching should work too.
- labawi 6y agoNot TCP. UDP - there are no connection in UDP, so the routers / firewalls don't really differentiate between a new connection and packets that happen to have the correct ip+port. Some are trickier than others, as there are 2 IPs and 2 ports in a packet (at any point), and it can be hard to match all of them for the stricter devices, esp. on NATs that do source port randomization.
- a1369209993 6y ago> when network devices in between are broken or are [maliciously] actively preventing it. Those are called "middleboxes" (IIRC) and they're unfortunately somewhat pervasive.
- fulafel 6y agoYour p2p nodes might not be behind NAT. In a lot of populations you can rely on everyone having working v6 for example. I think the question of what's "pure" p2p is somewhat academic. If your app uses DNS, is it p2p, isn't DNS just a distributed p2p database? Does p2p require that every aspect of your app right down to discovery is distributed among nodes running your app? Is it cheating to use an existing DHT? etc.
- sublimefire 6y agoJust for completeness sake this is what docs [1] state: "For most WebRTC applications to function a server is required for relaying the traffic between peers, since a direct socket is often not possible between the clients (unless they reside on the same local network). <...>" [1] https://webrtc.org/getting-started/turn-server https://webrtc.org/getting-started/turn-server
- Sean-Der 6y agoIt’s a little more nuanced than this. https://medium.com/the-making-of-whereby/what-kind-of-turn-server-is-being-used-d67dbfc2ff5d https://medium.com/the-making-of-whereby/what-kind-of-turn-s... fippo pulled the stats and saw 17% This also depends on your clients network. You can determine your NAT mapping type[0] and now ahead of time if you need a TURN server. To understand NAT behaviors more check out [1] [0] https://github.com/pion/stun/tree/master/cmd/stun-nat-behaviour https://github.com/pion/stun/tree/master/cmd/stun-nat-behavi... [1] https://webrtcforthecurious.com/docs/03-connecting/#nat-mapping https://webrtcforthecurious.com/docs/03-connecting/#nat-mapp...
- BlueTemplar 6y agoModern networks use IPv6 only, so don't have NAT.
- tinus_hn 6y agoCareful! P2P streaming video is a (completely non obvious, according to the courts) infringement of the VirNetX patent that for example Apple just had to pay a few billions of dollars for. If you implement p2p video streaming chances are no company will want to touch it with a ten foot pole.
- BlueTemplar 6y agoUm, shouldn't the patent have expired by now ?
- tinus_hn 6y agoProbably not or it would have been on the news and you would start seeing p2p communications again. It’s not rocket science, after all.
- BlueTemplar 6y agoBut p2p streaming has been around since the mid 2000's ?? (Pre-Microsoft Skype, Miro, Joost, Tribler...) And for some recent examples : what about Popcorn Time ? Or PeerTube ? EDIT : Oh, I guess that most of those are technically not "streaming", but "watching while downloading" like YouTube or FTP+VLC ?
- tinus_hn 6y agoThe court does not agree with you. A peer to peer communication service, like FaceTime was originally, violates the patents.
- BlueTemplar 5y agoOk, so : when was this patent approved, and when does it expire ?
- tinus_hn 5y ago