Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Airplay Buffer

I would like to airplay audios to my external speakers connected to my AirPort Express, while still watching videos locally on my device. What happens is that when I start playing a media file, the audio and video wait for about 2s before playing in sync. This is all fine given that there is a built-in 2s buffering inherent to Airplay. But whenever I pause it, the audio continues playing for about 2s while the video stops instantaneously. Then, when I resume playing it again, the video plays without the sound for about 2s to catch up everything and it is now in sync again.


This buffering and desyncing between pausing/replaying also occurs when I play an audio-only stream as well.


I wonder if there is any way to reduce the built-in 2s buffering. I guess this buffering would make sense if I airplay both the video and audio to an Apple TV but I only airplay the audio and hence I think do not need the buffering this long. Also, is there a way to get rid of the desyncing between pausing/replaying?


I tried searching for solutions but all posts seem to be very dated. This is 2017 and I think there should be a way out of this problem as AirPlay has been around for ages. Bluetooth, despite the lower quality of the sound, manages to achieve this without any significant buffering/desyncing and hence a much more pleasant experience than having to wait for 2s every time I play/pause and dealing with this desyncing issue.


This happens to me on all my iOS and macOS devices (iPhone 7 Plus, iPad Air 2, MacBook Pro 2016) whether the video/audio source is on YouTube or on my hard drive.

Posted on Aug 31, 2017 5:29 AM

Reply
Question marked as Best reply

Posted on Sep 3, 2017 6:19 PM

Thank you for your help, Teesarax!


I would like to update on the issue in case it would be beneficial for anyone experiencing similar issues. I am curious as well if this symptom is particular to my setup or can be replicated with a generic setup.


The symptom is a ~2-second delay observed between pressing pause and the audio actually stopping. When I press pause, the video stops playing immediately, and 2 seconds later, the audio stops playing. Then when I press play, the video starts playing immediately, and after 2 seconds, the audio resumes playing. Everything returns back in sync perfectly but a momentary period of 2 seconds that everything is out of sync is definitely there.


I understand why an audio delay after pressing play is necessary as some kind of buffering. But when pressing pause, there is no point, as far as I concern, to let the remaining audio data in the buffer be played. The audio should stop immediately upon pressing pause no matter what remains in the buffer (given that the AirPlay protocol allows the sender device to communicate a pause command to the receiver device)


Then, I found another quirk that occurs only in iTunes (12.6.2.20) on macOS devices and in the Music app (iOS 10.3.3) on iOS devices. In these programs, when I press pause, the audio and video both stop playing immediately. But when I press play, the video resumes immediately, while the audio starts 2 seconds later but manages to sync with the video perfectly.


  • This only occurs when I select the sound output as internal speakers in sound preferences but specifically select the AirPlay receiver as the sound output in iTunes only.
  • So this suggests that an instantaneous audio pause can be achieved in AirPlay. It might be some sort of bug that is fixed properly in iTunes but not elsewhere.
  • A 2-second of audio is still skipped after pressing resume in this case but it is much more pleasant than having the audio playing for 2 seconds after pressing pause


The best scenario would be that once I press pause, the audio and video both stop immediately. And once pressing play, the audio and video wait for 2s (buffering) before start playing again from where they stopped. If that is the case, I would be using AirPlay all the time without a doubt. But just the scenario currently happening in iTunes (macOS) and the Music app (iOS) to happen elsewhere would be more than satisfactory for me.


I would not see why it cannot be done. In fact, if someone has already found a fix for this issue please let me know. I would be immensely appreciated


I will forward this through Apple Support as I have spent quite an effort exactly identifying the symptom and it seems like no one has discussed it this seriously before. Most people discuss the general audio/video out-of-sync, which seems to be no longer an issue, not the temporary out-of-sync upon pressing play/pause.


Information

Model: MacBook Pro (15’’, 2016) (macOS Sierra 10.12.6), iPhone 7 Plus (iOS 10.3.3), iPad Air 2 (iOS 11 Public Beta 8)

Router: AirPort Express 802.11n (Latest Firmware 7.6.8)

AirPlay Receiver: Speaker (Harman Kardon Onyx Studio 2) connected through the headphone jack on the Airport Express

4 replies
Question marked as Best reply

Sep 3, 2017 6:19 PM in response to Tesserax

Thank you for your help, Teesarax!


I would like to update on the issue in case it would be beneficial for anyone experiencing similar issues. I am curious as well if this symptom is particular to my setup or can be replicated with a generic setup.


The symptom is a ~2-second delay observed between pressing pause and the audio actually stopping. When I press pause, the video stops playing immediately, and 2 seconds later, the audio stops playing. Then when I press play, the video starts playing immediately, and after 2 seconds, the audio resumes playing. Everything returns back in sync perfectly but a momentary period of 2 seconds that everything is out of sync is definitely there.


I understand why an audio delay after pressing play is necessary as some kind of buffering. But when pressing pause, there is no point, as far as I concern, to let the remaining audio data in the buffer be played. The audio should stop immediately upon pressing pause no matter what remains in the buffer (given that the AirPlay protocol allows the sender device to communicate a pause command to the receiver device)


Then, I found another quirk that occurs only in iTunes (12.6.2.20) on macOS devices and in the Music app (iOS 10.3.3) on iOS devices. In these programs, when I press pause, the audio and video both stop playing immediately. But when I press play, the video resumes immediately, while the audio starts 2 seconds later but manages to sync with the video perfectly.


  • This only occurs when I select the sound output as internal speakers in sound preferences but specifically select the AirPlay receiver as the sound output in iTunes only.
  • So this suggests that an instantaneous audio pause can be achieved in AirPlay. It might be some sort of bug that is fixed properly in iTunes but not elsewhere.
  • A 2-second of audio is still skipped after pressing resume in this case but it is much more pleasant than having the audio playing for 2 seconds after pressing pause


The best scenario would be that once I press pause, the audio and video both stop immediately. And once pressing play, the audio and video wait for 2s (buffering) before start playing again from where they stopped. If that is the case, I would be using AirPlay all the time without a doubt. But just the scenario currently happening in iTunes (macOS) and the Music app (iOS) to happen elsewhere would be more than satisfactory for me.


I would not see why it cannot be done. In fact, if someone has already found a fix for this issue please let me know. I would be immensely appreciated


I will forward this through Apple Support as I have spent quite an effort exactly identifying the symptom and it seems like no one has discussed it this seriously before. Most people discuss the general audio/video out-of-sync, which seems to be no longer an issue, not the temporary out-of-sync upon pressing play/pause.


Information

Model: MacBook Pro (15’’, 2016) (macOS Sierra 10.12.6), iPhone 7 Plus (iOS 10.3.3), iPad Air 2 (iOS 11 Public Beta 8)

Router: AirPort Express 802.11n (Latest Firmware 7.6.8)

AirPlay Receiver: Speaker (Harman Kardon Onyx Studio 2) connected through the headphone jack on the Airport Express

Aug 31, 2017 7:50 AM in response to callturbo

I would like to airplay audios to my external speakers connected to my AirPort Express, while still watching videos locally on my device. What happens is that when I start playing a media file, the audio and video wait for about 2s before playing in sync. This is all fine given that there is a built-in 2s buffering inherent to Airplay. But whenever I pause it, the audio continues playing for about 2s while the video stops instantaneously. Then, when I resume playing it again, the video plays without the sound for about 2s to catch up everything and it is now in sync again.


This buffering and desyncing between pausing/replaying also occurs when I play an audio-only stream as well.


I wonder if there is any way to reduce the built-in 2s buffering.

Have you tried Rogue Amoeba's Airfoil for this issue?

Sep 3, 2017 9:17 AM in response to callturbo

Without trying to go into the technical details on how AirPlay works, suffice to say that this is one of the shortcomings of this streaming protocol suite. It works reasonably well when streaming audio without long gaps; adequately when streaming a mix of video and audio, but not so much for what you are trying to do with it.


The buffering issue is due to a number of things including that there is no local clock circuit on the AirPort Express.

Airplay Buffer

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.