AirPlay and how does it work?

AirPlay is the Apple way for sharing media between your Apple devices. You can share music, photos and videos from an iPhone, iPad, or Mac to an Apple TV and it is also possible to share music to an Airport Express with attached speakers. Apple has licensed the audio streaming part of the AirPlay protocol to different manufacturers so third party devices can be used to receive AirPlay streams.

Beside the possibility to stream content from an IOS or OSX device it is also possible to use the AirPlay mirroring function. With this function you can use a tv as a second screen. Because the mirroring image feed is encoded using the H.264 codec more recent hardware is required. This more recent hardware uses the graphic card for the encoding process. The following devices (and newer) can be used:

  • iPad 2
  • iPad mini
  • iPhone 4S
  • iPod touch
  • iMac, Mac mini, Macbook Air (mid 2011) + (Mountain Lion)
  • MacBook Pro (early 2011) + (Mountain Lion)
  • Apple TV (2nd or 3rd generation)

AirPlay mirroring does also require a fast and stable Wi-Fi connection, I would suggest using the 802.11n standard on 5GHz. This gives the most stable experience, especially in crowded Wi-Fi environments.

AirPlay discovers other devices with the Bonjour protocol. Because of this no extra configuration in the network is needed. When your are using a company network and the amount of apple devices grows you should think about the fact that Bonjour is a chatty protocol. Some companies that are using large numbers of Apple devices have seen a peak in multicast traffic after introducing IOS and OSX devices. To solve this problem you could use different SSID’s / different subnets for de IOS and OSX devices. The details of the AirPlay protocol are not officially made public by Apple but with reverse engineering people have discovered the details and published them unofficially. You can find this information on

http://nto.github.io/AirPlay.html

In the following part you will find a bandwidth usage tests for AirPlay mirroring. I have used the following test scenario:

Devices:

  • MacBook Pro 13 inch, late 2011, i5 2.4 GHz, 4GB memory.
  • Apple TV, 3th generation.
  • Apple Airport Extreme, 5th generation.

Network:

  • 802.11n 2,4GHz network

Tests:

  • Mirroring desktop, MacBook Pro –> Apple TV
  • Mirroring video, MacBook Pro –> Apple TV

(The test is conducted with a 720p video file)

Results:

Mirroring the desktop from the MacBook Pro to the Apple TV uses between 350KB/s and 1,3 MB/s and this delivered a good result. When playing a video on the MacBook Pro the usage varies between 1,5MB/s and peaks of 3,6MB/s. Normally the bandwidth should be sufficient to deliver a smooth video playback. In reality I experienced some hiccups. It is possible that the Wi-Fi network has a problem with some interference and cannot deliver a stable connection. Normally you would not notice this but because the mirroring feed cannot be buffered, every hiccup will be visible. When you are experiencing these problems you should try another channel for your Wi-Fi network or switch to the 5GHz band. I have switched to the 5GHz network and didn’t had any more hiccups in the playback.

In practice an 802.11g network will be sufficient for AirPlay streaming but you will see buffering problems when using AirPlay mirroring. When using an 802.11n 5GHz network you normally should be good. I hope I have given you some interesting and helpful facts about the Airplay protocol.