AirPods – Lag or No Lag?

Audio video sync testI mentioned in my AirPods review last week that I did some tests of audio/video syncing for Dave Hamilton. I’ll review a little bit and then walk into some more advanced questions.

Dave had asked me to watch some YouTube videos using the AirPods to see whether the sound was in sync and the results were very positive. I found an audio/video sync video that’s really cool. There’s a horizontal timeline sliding from left to right, with several dots and then a long dash every second. Then there’s a ball bouncing on the dash as it goes by and it makes a click sound when it hits. The idea is that from the timeline you can measure how many milliseconds of delay there are between when you see the ball hit and when you hear it hit. I tested the AirPods and it was spot on with this test.

I’m bringing this all up again because with no lag I was hoping I could use my AirPods to monitor my own voice when doing the live show and while recording Skype calls. I use Audio Hijack from Rogue Amoeba to do the audio piping around (no mixer) and within that app I can monitor my own voice. I’ll describe the simplest example of how Audio Hijack works to monitor a recording.

In Audio Hijack you build up a flow of audio using bricks on a screen. You always need an input and an output, so I can drag in a brick of my mic as the input and the AirPods as the output. If I were really recording, I’d also want to drag in a recorder brick after the headphones monitor brick. Make sense?

With my wired headphones, there’s an ever so slight delay between when I talk and what I hear in my headphones, but it’s small enough that it’s not bothersome. If you’ve ever heard a long lag between your own speech and hearing it, you’ll know that it’s very distracting, and causes you to slow down your speech. Audio Hijack has a compensation option for the lag and it works to almost completely eliminate it on my wired headphones.

However, when I ran a test of the AirPods with Audio Hijack, the lag was terrible. I didn’t have a way to measure it, but it was really really bad. Absolutely unusable.

I was baffled why this would be, since according to my earlier tests, the AirPods could play back audio without a lag at all. The folks at Rogue Amoeba are really responsive and brilliant so I dropped a note to them. I really had two questions, one being whether there was any way to fix the problem, and if there wasn’t a fix, could they explain to me why these two tests had such different results.

Chris Barajas wrote back right away, suggesting that I take a look at Stephen Coyle’s tests of Bluetooth headphones to learn about lag. Stephen has been running tests comparing different Bluetooth vs. wired headsets and has actually measured the lag.

Tapt showing disney songsStephen cares a lot about latency because he’s the author of a fun game for IOS called Tapt where you try to tap out the rhythm of different songs and then it gives you a score. If you have a lag between when you tap and what you hear, it kind of sucks the fun out of the game.

In his most recent tests, he determined that the lag from the AirPods is worse than other Bluetooth headphones he’s tested. Stephen is SO my people – he even made a spreadsheet of all of his testing results. He measured the lag on the AirPods as being about 22% worse than the other three Bluetooth headphones he tested. By the way, overall Bluetooth is about three times the lag of wired headphones

I watched the video Stephen posted at stephencoyle.net/airpods where he shows himself both playing Tapt and typing on an iOS keyboard. I downloaded Tapt and tried it myself and sure enough there is a pretty significant lag on the AirPods.

Stephen seemed pretty into the topic so I shot him an email asking for some help understanding why some experiments show a lag and some don’t. I asked him if he knew why if I’m watching a YouTube video I see/hear no lag but in using Tapt and with my Audio Hijack experiment there’s clearly a lot of lag. Stephen wrote back right away and had a great explanation. Here’s his letter back:

Hi Allison

Thanks for getting in touch.

There’s a pretty straightforward explanation for this, at least as far as I understand. For media playback, Bluetooth devices will generally not display any apparent lag. This is because the media is predictable. macOS and iOS can calculate that there are x milliseconds of lag, then start the video stream x milliseconds later than the audio stream, and thus the two will appear perfectly in sync. Even if there was a huge delay of multiple seconds in sending an audio stream to a Bluetooth device, as long as the video is delayed by the same amount of time they will appear in sync.

In the test video you linked, all the sounds are all part of a continuous audio stream. Therefore the system ‘knows’ when the sounds are coming, and the delay sending audio to the AirPods will be compensated for as I described above.

The problems arise when the audio isn’t predictable. When you tap on a keyboard button, or in my case when you play a note in Tapt, there’s no way for the OS to anticipate that. All it can do is rush to get the audio signal out as quickly as it can, which is the amount of time I talk about in my tests. macOS or iOS can’t send the audio early, because it can’t be known in advance when the audio should be played. The same holds true for any ‘realtime’ application, like passing audio from an input device to the AirPods. In these circumstances, even 1-200 milliseconds can be quite noticeable, and that’s why you’re noticing a huge lag using Audio Hijack, and why you don’t notice it during media playback.

I hope that clears it up a little! Let me know if you have any more questions about it.

Best
Stephen

At first I was content with Stephen’s explanation, but then I remembered that Steve and I also did an experiment with Skype where there was also no lag. Skype can’t really predict when I’m going to speak either, and has no way of knowing whether I’m on Bluetooth headphones, so how is it compensating for the lag?

I wrote a note with both Stephen and Chris at Rogue Amoeba on distribution. Here’s what Stephen explained to me:

I think Skype is exempt from the problem for the same reasons media playback is. Basically, even though the Skype stream is showing events as they happen, it’s just presenting an audio/video stream that’s being sent to it from your husband. So the computer can still calculate the delay between the audio and video, and then artificially delay the video stream by that amount of time, in order that they appear in perfect sync. While it seems like you’re seeing live video, you’re actually seeing a video feed that’s slightly delayed in order to match the audio to your AirPods.

That made perfect sense to me. But that brought up yet another question. If Skype can adjust to make them match, shouldn’t Audio Hijack be able to do the same thing? It was time to pester Chris yet again. He had a good answer to that as well. He said:

We do try to detect the delays of these Bluetooth devices, but for purposes of syncing with other devices in Airfoil — if you output to the local “Computer” output as well as a Bluetooth headset, you’ll notice we delay the local output to match that Bluetooth delay.

While I wish that there was a way for me to use my AirPods as studio monitors, the next best thing was to gain an understanding of why. I thanked Stephen and Chris for their responses. I haven’t given up hope on this, I’m trying to convince Chris that Audio Hijack could have a block with an adjustable slider that speeds up the mic. It was fun to learn a lot about the subject and really dig into the why.

1 thought on “AirPods – Lag or No Lag?

  1. Steve Feinstein - December 30, 2016

    lag != sync. You can have lots of lag and stay in sync. But you can’t sync live content when there’s lag. Not without upsetting the space time continuum.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top