Answered

Audio delay with Sonos One over AirPlay from laptop/desktop

  • 4 April 2020
  • 8 replies
  • 14167 views

I am experiencing an audio delay of 2-3 seconds when configuring 2 of my macOS systems to send audio to the Sonos One as a system audio output device over the AirPlay protocol.

My iPhone is able to send audio to the Sonos One over what also appears to be the AirPlay protocol with no lag.

Repro Steps on macOS (Catalina 10.15.4 and Mojave 10.14.6):

  • Open System Preferences.
  • Open Sound.
  • Select the Output tab.
  • Click the name of the Sonos One device (where device type says AirPlay).
  • Do one of the following:
    • Play a video in any browser, such as from YouTube.
    • Play a video using VLC.
    • Play a video using QuickTime Player.
  • In all of the above playback scenarios, it takes 2-3 seconds for the Sonos One to start playing the audio associated with the video, and that audio it plays lags behind the video by a similar number of seconds.

How can I eliminate the audio delay to the Sonos One when playing from a computer?

icon

Best answer by davidfstr 12 April 2020, 00:28

View original

This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

8 replies

Userlevel 7
Badge +22

It probably means the mac is having some network issues… If you plug the mac in via ethernet to your router does it clear up the issue.   if so need to work on how to get wifi working better to the mac (maybe connect to routers 5ghz signal)

The first Mac (a Mac Mini desktop) was using a wired Ethernet connection and the other (a MacBook Pro laptop) was using Wifi. I configured the Sonos One to disable its Wifi and to only use Ethernet.

So at least with the Mac Mini desktop there’s was a direct wired link between it and the Sonos One, yet the problem was still observed. Therefore I suspect it’s not a network issue.

I don’t think a Chris intended you to wire the Sonos One to your Mac, but instead to your Wi-Fi router. 

In most cases, turning off the Wi-Fi portion of a Sonos device is not recommended. 

Userlevel 7
Badge +22

Yes I meant wire Mac to your router.  Sonos can stay wireless. 

My Mac Mini is plugged directly into an Airport router via Ethernet and the Sonos One is also plugged directly into the same router via Ethernet. (FWIW, reenabling wireless on the Sonos One has no effect, as I expected it wouldn’t.) It’s not a network problem.

I have done more experimentation. The audio delay is exactly 2.0 seconds, based on correcting with VLC. A 2 second delay is somewhat suspicious since my understanding is that is the default buffering time for at least older versions of the AirPlay protocol. However my versions of macOS (Catalina 10.15.4 and Mojave 10.14.6) both support AirPlay 2, which is the latest version.

Userlevel 7
Badge +23

Airplay is a poor choice of transmitting audio if you expect it to stay in sync with video as they are sent by utterly different codepaths, with one having no idea of the other.

The video in this case goes directly from the app to the screen.

The audio in this case goes off to the Airplay server, which buffers it up as it sees fit, then sends it off to Sonos.

Note: no attempt can be made to keep these in sync.

Airplay is an Apple-proprietary version of the RTSP protocol, which does offer sync between audio and video sreams, but only to audio+video-capable devices, which Sonos is not.

controlav, thank you for the additional technical information.

If AirPlay is a generally a poor connectivity method for low-latency audio, it sounds like I may need to return the Sonos One and instead look for a different speaker with a Bluetooth connection option, which I already know can be made to work at low-latency.

Sonos Support confirms the following:

Apple will always introduce a fixed two second delay when using Airplay. This delay cannot be modified by any third party API and is locked in by Apple. Here is Apple's official documentation of the latency limit.

Therefore I will return the Sonos One and seek an alternative speaker that does not use the AirPlay interface. This probably means a Bluetooth speaker.

If I was only streaming from a mobile device whose apps generally correct for the AirPlay delay (i.e. an iPhone) then the Sonos One would be okay. However I want to be able to stream from things like laptop system audio whose apps frequently aren’t built to compensate for the delay, even with APIs to detect it (like the AVAudioSession.outputLatency referenced by Sonos Support).