Minimum theoretical latency time over Wifi using webrtc

1,046 views
Skip to first unread message

Pablo Vega

unread,
Sep 18, 2017, 10:10:11 AM9/18/17
to discuss-webrtc
Hi!, I'm trying to find the best technology for my next project, and nobody has given me a straight answer about the minimum theoretical latency time that should be expected between two devices communicating audio/video via wifi, assuming a 0ms glass to glass latency. Since WebRTC is a p2p protocol I would expect a dramatically reduced latency when using WiFi instead of the Internet (which I've seen varies, but mostly between 100-200 ms).

Thanks for helping me!

Eric Davies

unread,
Sep 18, 2017, 3:09:00 PM9/18/17
to discuss-webrtc
The  experienced latency is going to be a function of many variables (amount buffered to deal with jitter, hardware codec support, network speed, resolution, cpu used, ...).
Perhaps the more meaninful question to ask is "what is that function?"

Warren McDonald

unread,
Sep 18, 2017, 10:08:23 PM9/18/17
to discuss-webrtc
I can give you some numbers for testing between workstations on local networks (WiFi and Ethernet) that are using Local ICE candidates, that is not via external network. 

As per Eric's comment this is extremely variable, but the simple answer is between 5 and 10 ms. What is interesting is that there is more variability between devices, than network type of Ethernet or WiFi.

BTW with Internet carried sessions between cities about 1000Km apart we typically see less than 50 ms RTT not 100-200 ms

Pablo Vega

unread,
Sep 29, 2017, 11:55:43 AM9/29/17
to discuss-webrtc
Mr. McDonald, is it possible to establish a WebRTC communication between two devices physically nearby through Wifi Direct? would that decrease the latency? Thanks!!!

Iñaki Baz Castillo

unread,
Sep 29, 2017, 1:03:33 PM9/29/17
to discuss...@googlegroups.com
On Fri, Sep 29, 2017 at 5:55 PM, Pablo Vega <pablo...@gmail.com> wrote:
> Mr. McDonald, is it possible to establish a WebRTC communication between two
> devices physically nearby through Wifi Direct? would that decrease the
> latency? Thanks!!!

WebRTC does not know about which IP network you use, so why not.

--
Iñaki Baz Castillo
<i...@aliax.net>

Taylor Brandstetter

unread,
Sep 29, 2017, 2:36:03 PM9/29/17
to discuss-webrtc

--

---
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-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CALiegfnekrsMDNEiLCdaggPHZU%3Dfnkd3waR-CyYN6rbW-XtXUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Pablo Vega

unread,
Sep 30, 2017, 1:51:22 PM9/30/17
to discuss-webrtc
Thank you so much for your response! I am just an ignorant wantrepreneur trying to find a way to make an idea work, so all that code is like traditional chinese to me. I just need to know if that setup would be a viable option in order to hire someone that can get it done. I have used some examples of WebRTC but none of them are hitting the sweet spot of delay I need (under 100ms). The video communication I want to establish is within a couple feet distance, that's why I thought that maybe Wifi direct was a better way to bypass any external networks. And even though my knowledge of WebRTC is no deeper than my cat's, I believe there is a need to establish the protocol by first going to a server that does some sort of "handshake" and after that is p2p but still the packages go through an external network, potentially adding a few milliseconds. Would it be possible to send the packages via Wifi direct? regardless if the first "handshake" is done using an external network. Would that improve the latency? Thank you so much!!!!!!!!!!!!!!!!!!!!!!


El viernes, 29 de septiembre de 2017, 13:36:03 (UTC-5), Taylor Brandstetter escribió:
On Sep 29, 2017 10:03 AM, "Iñaki Baz Castillo" <i...@aliax.net> wrote:
On Fri, Sep 29, 2017 at 5:55 PM, Pablo Vega <pablo...@gmail.com> wrote:
> Mr. McDonald, is it possible to establish a WebRTC communication between two
> devices physically nearby through Wifi Direct? would that decrease the
> latency? Thanks!!!

WebRTC does not know about which IP network you use, so why not.

--
Iñaki Baz Castillo
<i...@aliax.net>

--

---
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.

Eric Davies

unread,
Sep 30, 2017, 3:16:59 PM9/30/17
to discuss...@googlegroups.com
If I was seeing an unexpected latency, my first question would be what part of the system is it coming from. If the delay is not coming from the network, then it doesn't make sense expending the effort to replace the nature of the network.

Have you tried pinging one machine from the other? If the ping time is low, it would suggest that the problem is not the network, but the performance of your hardware/software.



--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/Ache1jeGWx4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/77c126d2-a819-4d2a-b570-a22900371f19%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Eric Davies

Pablo Vega

unread,
Sep 30, 2017, 4:50:05 PM9/30/17
to discuss-webrtc
Great point. I'll check. Thanks a lot!
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.

Taylor Brandstetter

unread,
Sep 30, 2017, 5:14:40 PM9/30/17
to discuss-webrtc
Would it be possible to send the packages via Wifi direct? regardless if the first "handshake" is done using an external network. Would that improve the latency?

It's definitely possible when you enable that flag I mentioned. And it definitely should be able to reduce latency; it's one less hop, and is what Miracast uses (display mirroring technology I worked on before WebRTC 🙂).

But the bigger question is whether our implementation is optimized for low-latency situations. You may have to do some hacking to make sure our "jitter buffers" take full advantage of the low latency. Someone else would be able to answer that question better than me (it also came up in another discuss-webrtc topic recently).


To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/24b3d957-b045-4ba9-bb89-419c8baa36fe%40googlegroups.com.

Pablo Vega

unread,
Sep 30, 2017, 7:00:37 PM9/30/17
to discuss-webrtc
Thank you so much!!! this info helps me a lot!!!!! I had no idea about Miracast and it sounds exactly like the kind of technology I should use for this project. 

Pablo Vega

unread,
Sep 30, 2017, 8:13:21 PM9/30/17
to discuss-webrtc
I actually have less than 4ms of latency between the devices, and I guess its very unlikely I will ever be able to estimate where the rest of the latency is coming from (if its the processor of one or the other device, or the camera of either, or even the display, or software that I might be running that are slowing down... etc). I need to know the best way to do it though, and that best way will be good enough as long as its the fastest way.


El sábado, 30 de septiembre de 2017, 14:16:59 (UTC-5), Eric Davies escribió:
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.

Eric Davies

unread,
Oct 1, 2017, 2:19:05 PM10/1/17
to discuss-webrtc
Something I learned in grad school from much brighter people: knowing answers is less important than knowing the right questions.
The real question that I think you should be asking is: 
    given the constraint of operating on these ${set_of_devices}
    can I meet these ${tset_of_constraints}, and if so, how.
Reply all
Reply to author
Forward
0 new messages