]> git.ipfire.org Git - thirdparty/shairport-sync.git/blob - AIRPLAY2.md
Update check_classic_systemd_full.yml
[thirdparty/shairport-sync.git] / AIRPLAY2.md
1 # AirPlay 2
2 Shairport Sync offers AirPlay 2 support for audio sources on iOS devices, Macs from macOS 10.15 (Catalina) onwards, HomePod minis and Apple TVs.
3
4 ## What Works
5 - AirPlay 2 audio for iOS, HomePod mini, AppleTV and Mac players.
6 * Audio is synchronised with other AirPlay 2 devices.
7 * Two types of audio are received by Shairport Sync – "Realtime" streams of CD quality ALAC (like "classic" AirPlay) and "Buffered Audio" streams of AAC stereo at 44,100 frames per second.
8 * The selection of stream type is made by the player.
9 * Realtime streams generally have a latency of about two seconds. Buffered Audio streams typically have a latency of half a second or less.
10 * In AirPlay 2 mode, Shairport Sync reverts to "classic" AirPlay when iTunes on macOS or macOS Music plays to multiple speakers and one of more of them is compatible with AirPlay only.
11
12 - Devices running Shairport Sync in AirPlay 2 mode can be [added](https://github.com/mikebrady/shairport-sync/blob/development/ADDINGTOHOME.md) to the Home app.
13
14 ## What Does Not Work
15 - No AirPlay 2 for Windows iTunes.
16 - Remote control facilities are not implemented.
17 - AirPlay 2 from macOS prior to 10.15 (Catalina) is not supported.
18
19 ## General
20 Shairport Sync uses a companion application called [NQPTP](https://github.com/mikebrady/nqptp) ("Not Quite PTP")
21 for timing and synchronisation in AirPlay 2. NQPTP must run as `root` and must have exclusive access to ports `319` and `320`.
22
23 Lossless and High Definition Lossless material is transcoded to AAC before it reaches Shairport Sync.
24
25 ## What You Need
26 AirPlay 2 support needs a slightly more powerful CPU for decoding and synchronisation and more memory for bigger buffers and larger libraries. A system with the power of a Raspberry Pi 2 or Raspberry Pi Zero 2 W, or better, is recommended.
27
28 Here are some guidelines:
29 * Full access, including `root` privileges, to a system at least as powerful as a Raspberry Pi 2 or a Raspberry Pi Zero 2 W.
30 * Ports 319 and 320 must be free to use (i.e. they must not be in use by another service such as a PTP service) and must not be blocked by a firewall.
31 * An up-to-date Linux or FreeBSD. This is important, as some of the libraries must be the latest available.
32 * Shairport Sync will not run in AirPlay 2 mode on a Mac because NQPTP, on which it relies, needs ports 319 and 320, which are already used by macOS.
33 * A version of the [FFmpeg](https://www.ffmpeg.org) library with an AAC decoder capable of decoding Floating Planar -- `fltp` -- material. There is a guide [here](TROUBLESHOOTING.md#aac-decoder-issues-airplay-2-only) to help you find out if your system has it.
34 * An audio output, for example an ALSA device (or `sndio` in FreeBSD). The device must be capable of running at 44,100 frames per second. You can use [`sps-alsa-explore`](https://github.com/mikebrady/sps-alsa-explore) to test the suitability of hardware ALSA audio devices on your device.
35 Other backends continue to work as with "classic" Shairport Sync.
36 - Multiple instances of the AirPlay 2 version of Shairport Sync can not be hosted on the same system. It seems that AirPlay 2 clients are confused by having multiple AirPlay 2 players at the same IP addresses.
37
38 ## Guides
39 * A building guide is available at [BUILD.md](BUILD.md).