Shairport Sync is software from Mike Brady (building on the original work of James Laird and others) that functions as an AirPlay wireless audio player – “it plays audio streamed from iTunes, iOS, Apple TV and macOS devices and AirPlay sources such as Quicktime Player and ForkedDaapd, among others.” (It does not support video or photo streaming, however.)
Features include full audio synchronization – “it stays synchronised with the source and hence with similar devices playing the same source. In this way, synchronised multi-room audio is possible for players that support it, such as iTunes and the macOS Music app.” The software also handles Apple ALAC decoding, high bit rates and frame rates, metadata delivery, and more.
Shairport Sync is freely downloadable open-source software for Linux, Raspberry Pi, OpenBSD and other Unix-based systems. A Mac HomeBrew package is available but lacks synchronization capability.