[Req] Devel branch of shairport-sync for Airplay 2

Hey Guys!

I’m hoping a fellow DietPi’er can help. I’m looking for the development branch of shairport-sync, as it supports Airplay 2.


Since the maintainers of DietPi do fantastic things when it comes to optimizng apps, I don’t want to mess with by tickering with nqptp installations and the like.

Any help will be appreciated!

Have an awesome day,

I’ll update our Shairport Sync packages soon, but based on latest stable release. If you tell me the SBC/architecture/distro version you are using, I can compile one testing package based on development version, to test whether Airplay 2 works well with it :slight_smile:.

shairport-sync -V

DietPi v8.4.2

  • Device model : RPi Zero 2 W (aarch64)

DietPi_RPi-ARMv8-Bullseye image used.

cat /proc/cpuinfo
processor : 0/1/2/3
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

Hardware : BCM2835
Revision : 902120
Serial : 00000000ff6e1836
Model : Raspberry Pi Zero 2 W Rev 1.0

Thanks MichaIng!

What is the status of this request? Does the shairport-sync package of DietPi support Airplay2? :slight_smile:

Edit: Just saw that yesterday v4.1 was released with support for Airplay2, so I guess it is not included yet in DietPi but I hope soon :grinning: Releases · mikebrady/shairport-sync · GitHub

I see the last package created end of May 2022. @MichaIng do you know if it support Airplay2 already?

Ours does not yet, but I’ve seen the release candidates upstream which do (not yet released!). A problem I see is this: shairport-sync/AIRPLAY2.md at master · mikebrady/shairport-sync · GitHub

  • Requires an additional daemon running as root user, listening on two additional ports.
  • Requires more CPU power, not recommended for RPi 1 and Zero (1), probably acceptable

What I can think of is that we build ARMv6 packages without AirPlay 2 and all others with AirPlay 2 and the NQPTP daemon just shipped embedded into the same package.

What I’m not sure about is whether, if users do not want/need AirPlay 2, NQPTP can be just stopped, or whether Shairport Sync strictly requires it when being compiled against it.

EDIT: It is either one or the other only: [Problem]: Can I toggle back to Airport 1? · Issue #1552 · mikebrady/shairport-sync · GitHub

Not sure about the AirPlay ecosystem, if/how fast AirPlay 2 is supported by existing devices, but to me it seems that we either need to stay with AirPlay 1, to not break things for users, or ship two packages for all architectures where users can choose from.

Would be an option to have two shairport packages to choose from in dietpi-software? One with Airplay 2 and one with Airplay 1.

Airplay 2 was released in 2018 with iOS 11.4 so it’s widely used/support by Apple devices. It only took 3-4 years so reverse engineer the protocol.

we are just a small team and usually we don’t offer multiple versions of same software title.

1 Like

Good to know. I’m anyway going to update and move Shairport Sync packaging to GitHub actions. When on it, I’ll try to add optional AirPlay 2 builds. Would be a dietpi.txt setting and dialog in dietpi-software then to choose between AirPlay 1 and 2.


Shairport Sync v4.1 with AirPlay 2 support has been released and packages are ready for testing: Index of /downloads/binaries/bullseye/testing

cd /tmp
curl "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/shairport-sync-airplay2_$G_HW_ARCH_NAME.deb" -o package.deb
apt install ./package.deb
rm package.deb
systemctl restart shairport-sync

@kwagga @chnbz would be great if you find time to test the packages with AirPlay 2 support. They install fine and services run well, but I have no Apple infrastructure to test actual connectivity and playback.

1 Like

Hey MichaIng !

So I updated, went through without any issues, and so far… butterly smooth performance. No glitches.

I haven’t extensively tested it yet, will do that over the weekend, but so far it’s great! Thanks for incorporating it into Dietpi!


Will test it this weekend! Thank you for the update :pray:t2:

1 Like

Many thanks, highly appreciated. Was there anything required client side to use AirPlay 2 or do clients choose the protocol automatically, based on what the node supports?

Many thank! I’ll likely add a dietpi.txt setting + choice prompt in dietpi-software for the DietPi v8.11 Beta Saturday night. Depending on when you find time, you may test this one and give feedback on the prompt and given information :slightly_smiling_face:.

1 Like

Will wait until Sunday then with the test :slight_smile:

@MichaIng Did some more testing, so far works perfectly.

As for how the protocol negotiates with clients, I can show you, but in typical Apple-style, there are almost no settings or options to choose - everything is automatic, which is good and bad I guess. The highest quality protocol is automatically chosen.


(shairplay-sync on dietpi test - YouTube)


(dietpi: shairport-sync info - YouTube)

Multi-Device/Room streaming works also. Quality seems great, while there is few milliseconds lag, this can be corrected in the config file, and is not caused by anything DietPi.

1 Like
root@DietPi:~# shairport-sync --statistics
Connection 1: Playback Started -- AirPlay 2 Buffered.
Sync Error ms | Net Sync PPM | All Sync PPM | Output FPS (r) | Output FPS (c)
        45.27         -987.0          987.0              N/A              N/A
        28.16        -2840.9         2840.9         44100.06         44100.06
         6.95        -1872.2         1872.2         44100.24         44100.24
         1.66            0.0            0.0         44100.17         44100.17
         1.50            2.8            2.8         44100.11         44100.11
         1.26            0.0            0.0         44100.16         44100.16
         1.32            0.0            0.0         44100.13         44100.13

@MichaIng For me it also works great!

@kwagga How did you switch to Airplay 2 Realtime? As you can see for me it’s running buffered

Edit: never mind seems to have to do with the client streaming. When I airplay from my Macbook it uses “AirPlay 2 Realtime”

1 Like

Thanks for testing guys :slightly_smiling_face:. Great that it works so well and switching back and forth between AirPlay 1 and 2 can be done seamlessly.

At the moment the AirPlay 1 build is installed by default. Do you think it makes sense to install the AirPlay 2 build by default? “Slightly” more CPU usage, a little more memory and ~150 MiB additional disk space usage are no big issue. And we if the system really is overloaded, it can be downgraded easily.

Makes sense to me. Can’t really see a down side given the relatively small additional system requirements and the benefits it brings.

1 Like

Yes, it makes sense to me too. Thank you for the great work :pray:t2:

My RPi2 is running on powersave meaning at 600 MHz clock speed and even in this case Airplay 2 works without issues.

1 Like