4
\$\begingroup\$

Referring to this, the lowest latencies achieved in Bluetooth audio streaming are around 30-40ms. But given the fact that Bluetooth physical layer data rate is of around 2-3 Mbps and today's Bluetooth chipsets support sufficiently high processing power, the source to playback device latencies should be much lower (e.g. within 10ms or so, even by keeping substantial buffering). The audio codecs like AptX claim to add latency by 1.8ms only. So what causes so high latency in Bluetooth audio streaming using Bluetooth A2DP profile?

\$\endgroup\$
  • 1
    \$\begingroup\$ Probably the fact that nobody cares about implementing it as fast as possible \$\endgroup\$ – PlasmaHH Feb 6 '18 at 14:05
  • 2
    \$\begingroup\$ Nothing to do with processing power, all to do with packet size and buffer size. If someone digs up the A2DP spec we can take a look. \$\endgroup\$ – pjc50 Feb 6 '18 at 14:06
  • \$\begingroup\$ @PlasmaHH, you want it as fast as possible if you're watching TV with sound over Bluetooth, which an awful lot of people do. The observable speech lag becomes a problem. \$\endgroup\$ – TonyM Feb 6 '18 at 16:02
  • \$\begingroup\$ @TonyM: 40ms isn't perceivable for the average person, it may push already bad synced audio just a bit beyond the limit of being recognizable, but then you already have another problem. \$\endgroup\$ – PlasmaHH Feb 6 '18 at 16:07
  • 1
    \$\begingroup\$ @PlasmaHH, sure, there's practical minimums and acceptable maximums for audio latency and it's been the subject of much Bluetooth investment and development. "the fact that nobody cares about implementing it as fast as possible" didn't quite capture that for me, though :-) \$\endgroup\$ – TonyM Feb 6 '18 at 20:06
8
\$\begingroup\$

This is just an approximation to what is happening: -

Streaming bluetooth packet size is about 1 kByte. If you are sending MP3 music at 192 kbits per second that's about 24 kB per second so 1 kB represents about one-24th of a second or about 42 ms.

You have to receive the full packet in order to check for errors so latency is tens of ms.

See also this stack overflow question and answer relating to maximum packet size.

As to why there is a packet size limit, consider two opposing requirements: -

  1. Small packet sizes have a payload data size that is inefficient compared to the actual packet length (including headers and checksums) BUT, a small packet stands a good chance of being received without error.
  2. A large packet size has a much more efficient use of payload data but stands a bigger chance of failure over a radio link.

I think Goldilocks had the same problem with the three bears.

\$\endgroup\$
  • \$\begingroup\$ what you mean is the latency is heavily dependent on the time required to fill the packet buffer of 1kByte length. If that is the case then if some type of codec requires higher bit rate,[ see the "aptX low latency" section ] then it should fill the 1kB buffer fast and so should result in reduced latency, which does not seem to be happening in "aptX low latency" which says the latency to be 40ms. \$\endgroup\$ – Ashutosh Feb 6 '18 at 16:26
  • \$\begingroup\$ That should mean that there are some other important factors responsible for the latency, and not just the packet size, right? \$\endgroup\$ – Ashutosh Feb 6 '18 at 17:07
  • \$\begingroup\$ Im not saying there are not other factors but, optimising the packet size to suit the best delivery throughput of data in a radio system is a trade off and is probably the most important factor except when latency becomes too long to be acceptable to the user. \$\endgroup\$ – Andy aka Feb 6 '18 at 17:28
  • \$\begingroup\$ On this basis it sounds impossible to expect live streamed audio until bluetooth 5 kicks off then? I'm wondering if audio is fast enough to be compressed on the fly at that speed, not sure of the feasibility of that. I'm hearing results of <0.1s from people here: reddit.com/r/AndroidQuestions/comments/9su8or/… \$\endgroup\$ – marksyzm Apr 25 '19 at 15:58
  • \$\begingroup\$ And in the meantime I can literally stream games with <30ms over Wifi. Bluetooth really sucks. I bet using Wifi we could stream audio with <5ms latency. Kind of weird that these technologies are so far apart and yet Bluetooth and Wifi are often provided by the exact same chip and even use the same frequency. \$\endgroup\$ – Forivin Jul 29 '19 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.