Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airplay 2 Support ? #535

Closed
timstans opened this issue Jun 5, 2017 · 579 comments
Closed

Airplay 2 Support ? #535

timstans opened this issue Jun 5, 2017 · 579 comments

Comments

@timstans
Copy link

timstans commented Jun 5, 2017

Any Plans?

@dennydeutscher
Copy link

dennydeutscher commented Jun 6, 2017

+1

That'll be awsome! Looking for to control multiroom audio via io.broker / homekit for a long time.

  • That'll need ability to receive multiple streams.
  • Support of homekit

@rockrabbit
Copy link

Really more interested in the specifications. Hopefully it breaks free from the 44.1/16 limit that Airplay currently suffers.

@mikebrady
Copy link
Owner

I'm afraid I don't know yet whether iOS 11 will do multiroom with existing AirPlay devices or whether the new protocol is needed.

My iOS developer membership has lapsed, so, unless one of you guys has access to the iOS preview and can try it out, we will have to wait, I guess, until the public beta.

It would be great if it was backward compatible!

@mynameisdaniel32
Copy link

I've set up the iOS 11 beta on my iPhone, can confirm it's not allowing multiroom audio playback on two shairport-sync RPis I have running. It basically works the same as it did on iOS 10.

A few minutes of googling on Reddit will get you an iOS developer profile easily enough ;)

@rockrabbit
Copy link

Still don't get what they mean by multi room support. Isn't that what shairport-sync already does?

@mikebrady
Copy link
Owner

Thanks @mynameisdaniel32. That's disappointing, but not unexpected. To answer your question @rockrabbit, Shairport Sync does permit multiroom support, but the client must actually request it. So iTunes can request it, but iOS has never done so, and it looks like Apple are using a new protocol for multiroom capability in iOS 11.

@timstans
Copy link
Author

timstans commented Jun 6, 2017

Multiroom has been introduced in Airplay 2
so I guess new protocols?

@rockrabbit
Copy link

Explain multi room. Right now I have a pi in my living room and another in my bathroom. Using Shairport-Sync I can play my music to both and independently adjust the volume through iTunes or using the Remote app on my phone.

I can use iTunes on my Mac to play X to the living room and using AirPlay from my phone to play Y to the bathroom.

If this is not multi room, what exactly is Apples definition?

@mikebrady
Copy link
Owner

Hi @rockrabbit. What you say is true as far as it goes, but at present you can not play music from your phone to, for instance, the living room and bathroom at the same time. iOS 11 will change that.

@mikebrady
Copy link
Owner

mikebrady commented Jun 6, 2017

There is an interesting article on it at AppleInsider.

@rockrabbit
Copy link

Ha! If that doesn't say we all made the right choice using pi's and like, all using your brilliant software Mike; I'm not sure I'll ever need AirPlay 2 unless it support wireless hi rez audio!

@mikebrady
Copy link
Owner

Well, let's see what happens. It would be super if Apple allowed iOS multiroom to happen on "legacy" AirPlay.

@AndrewC-B
Copy link

AndrewC-B commented Jun 6, 2017

My understanding was that iOS never supported multi-room AirPlay because the protocol requires the sending device to send duplicate packets to all receivers, which was perhaps too much load for battery (and once upon a time, CPU and bandwidth) constrained mobile devices.

Apple’s promotional material for HomePod includes this sentence (emphasis mine): “When you add HomePod to multiple rooms, the speakers communicate with each other through AirPlay 2 — so you can play your music all around the house.” My guess is that AirPlay 2 has the receiving devices (speakers) duplicate packets and forward them on to the next receiver, shifting the load from the sending device.

Although, unless AirPlay 2 speakers are creating some sort of peer-to-peer mesh network then the scheme I hypothesised above would surely put much more load on the main Wi-Fi network, by necessitating a bunch of additional round trips to the router. I’d love to know what’s really going on. Maybe someone can use this as justification to grab a couple of HomePods. For science.

@maumi
Copy link

maumi commented Jun 6, 2017

@mynameisdaniel32: so in iOS 11 Beta shairport ist still working? So hopefully AirPlay 2 is compatible to AirPlay 1. But I think we need to wait until GM to be Sure.

@mikebrady
Copy link
Owner

I recently checked on an iOS 11 beta iPad and Shairport Sync continues to work as normal, which is a relief. No multiroom facility in evidence though.

@DietShasta
Copy link

@Subject22 Don't forget that current Apple TVs are also going to be Airplay 2 capable. A funny thing I noticed with the Apple TVs is the ability to airplay to it without the iphone/ipad source being on the same wifi network the Apple TV is on. So maybe Airplay 2 will be creating a p2p mesh network using this same tech?

@rthigpen
Copy link

rthigpen commented Jun 7, 2017

It looks like Airplay 2 may be incorporating some HomeKit functionality around the iOS on-screen controls, giving the ability to add devices to a playback group, control volume, etc.

No idea what's going on with the inter-device communications, protocols, etc. Apple is putting some developer info out there, available on the Developer's website, but also through the WWDC iOS app, and via streamable videos (but only in Safari). Here's the Airplay 2 web video page (still awaiting video content): https://developer.apple.com/videos/play/wwdc2017/509/

Will be interesting to see how much detail is given, and whether they open source the protocol. It does look like it's being implemented by a lot of Apple's hardware partners, with a lot of legacy Airplay hardware able to be updated to Airplay 2 via firmware updates.

@mikebrady
Copy link
Owner

Thanks for the information. My guess it'll be from a developer's perspective, but we can live in hope!

@AndrewC-B
Copy link

@DietShasta That’s pretty interesting. I hadn’t noticed that before, but it explains a few things, now that I think about it. That’s a great feature for lots of reasons. It’ll be advertising and setting up the ad-hoc connections via Bluetooth, much like AirDrop.

@noelhibbard
Copy link

@Subject22 I'm kind of thinking the same way you are. It must offload the heavy work to the individual devices or maybe now it does some sort of multicast stream and use HomeKit as a way to tell the individual speakers to subscribe to the multicast stream. When I first saw them talking about AirPlay 2 I figured they would leverage the ATV4 as a proxy/hub to handle the heavy work. Similar to how the ATV4 is used as a HomeKit hub for remote access. I just loaded iOS11 and was relieved that it still connects to shairport-sync. I wish Apple would just opensource AirPlay1/2.

@ghost
Copy link

ghost commented Jun 10, 2017

The current iOS11 beta does not support multi-room audio, it will be enabled in a later Beta

Would be nice if it was backwards compatible to Airplay1, but can't see it.

@mikebrady
Copy link
Owner

Thanks for the information!

@noelhibbard
Copy link

New info is available now: https://developer.apple.com/videos/play/wwdc2017/509/

Click the resources tab.

@mikebrady
Copy link
Owner

Thanks for the heads up. Two things emerge from it:

  1. AirPlay and AirPlay 2 are both supported.
  2. Multiroom isn’t enabled yet – it will be in a later beta as @adamcollier1 mentioned above.

So, Apple hasn’t closed the door on multiroom audio with regular AirPlay yet.

@hopkapi
Copy link

hopkapi commented Jul 30, 2017

Be aware that if you want to test Airplay 2 in the current betas, you need to enable your device for development, then go to Settings, Developer, in order to actually enable it.

@mikebrady
Copy link
Owner

Thanks. I didn't realise this, but then I haven't been in a position to try the most recent betas. I'll be able to try them in about two weeks. Is there anything interesting to report?

@hopkapi
Copy link

hopkapi commented Jul 30, 2017

Not sure to be frank, though you can get the beta via Apple's public beta program, though I'm also not sure if you can get the version of Xcode needed to then enable development etc.

@AndrewC-B
Copy link

AndrewC-B commented Jul 30, 2017

I’m not sure, but I think it’s probably against some NDA or other to discuss the details of this stuff publicly. I don’t expect anyone to enforce that, but better to be safe than sorry.

I was able to download the latest beta of Xcode 9 from Apple’s developer portal using my free dev account, provision my iPad (which is running the iOS 11 beta) for development, and enable AirPlay 2. So if anyone wants to try it out, I can verify that it’s possible to do so. I wouldn’t drop what I was doing to rush to try it out though.

@mikebrady
Copy link
Owner

Many thanks @Subject22. I think it is right to honour the NDA, TBH, and thanks for the suggestion that it's not necessary to rush...

@mikebrady
Copy link
Owner

Thanks. While multiple AirPlay 2 services can now be provided by Shairport Sync on one device, AirPlay 2 clients seem to be confused by multiple services being available at the same addresses. So it's not really possible, I'm afraid.

@noelhibbard
Copy link

Amazing work here. Thank you everyone for working on this feature, especially @mikebrady! In its current state on the development branch, would I be able to instantiate multiple instances of Airplay2? If not, are there plans to?

The easiest way to run multiple instances of the AP2 build is with docker containers. The trick is to create a docker network using the macvlan driver (this can be automated with docker-compose). This will allow each container to have their own IP address on the host network so mdns and all that works perfect. I was able to get ALSA working in docker but not reliably. I had to use PulseAudio for it to be reliable, so this adds more complexity because you have to run Pulse as a system wide service on the host machine. I started a thread with more details in the discussion area but I'll write up some better documentation and update my thread.

Here is the thread I'm talking about :

#1374 (comment)

@mikebrady
Copy link
Owner

Thanks Noel!

@noelhibbard
Copy link

Here are some more detailed instructions for running multiple SPS-AP2 instances in Docker containers using Docker Compose:
https://github.com/noelhibbard/sharport-sync-docker

@github-actions
Copy link

This issue has been inactive for 45 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.

@github-actions github-actions bot added the Stale label May 15, 2022
@ezadoo
Copy link

ezadoo commented May 16, 2022

Not stale

@github-actions github-actions bot removed the Stale label May 17, 2022
@julodel
Copy link

julodel commented Jun 4, 2022

Noob here, is there anyone here that already has Homebridge running on Raspberry and had Shareport Sync working?

@noelhibbard
Copy link

Noob here, is there anyone here that already has Homebridge running on Raspberry and had Shareport Sync working?

Homebridge and SPS can co-exist on the same machine without issue assuming you have the resources to handle it. Homebridge is really light weight but SPS-AP2 is not. I've seen reports of success with the Zero but not without some tweaks. I have an RPi3 that runs SPS-AP2 just fine. So it really depends on which RPi you have.

@github-actions
Copy link

github-actions bot commented Aug 6, 2022

This issue has been inactive for 45 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.

@github-actions github-actions bot added the Stale label Aug 6, 2022
@iRayanKhan
Copy link

Stale bump

@mikebrady mikebrady removed the Stale label Aug 6, 2022
@dronenb
Copy link

dronenb commented Sep 21, 2022

@noelhibbard Have you attempted to use JACK at all from within Docker instead of Pulseaudio for doing multiple instances of SPS-AP2?

@noelhibbard
Copy link

@noelhibbard Have you attempted to use JACK at all from within Docker instead of Pulseaudio for doing multiple instances of SPS-AP2?

I have not, sorry.

@mikebrady
Copy link
Owner

There's a first Release Candidate with AirPlay 2 support out now.

@mikebrady
Copy link
Owner

The 4.1 release, with AirPlay 2, is just out now. Thanks for all the help and encouragement! 😊🙏

@Neustradamus
Copy link

@mikebrady: Thanks for your work and all who have participated here...

Direct link:

@github-actions
Copy link

This issue has been inactive for 45 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.

@github-actions github-actions bot added the Stale label Dec 28, 2022
@mikebrady
Copy link
Owner

Are we ready to let this one go? 😊

@rogersmj
Copy link

https://media.tenor.com/LdAr7ZnMsaMAAAAC/yes-sir-yes-boss.gif

@github-actions github-actions bot removed the Stale label Dec 29, 2022
@fabienheureux
Copy link

fabienheureux commented Jan 24, 2023

I am working on the update of shairport in balena sound, and it works at least for two users 🎉

Thanks a lot for your fantastic work @mikebrady

@github-actions
Copy link

This issue has been inactive for 45 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.

@lionep
Copy link

lionep commented Apr 3, 2023

Hey!

@mikebrady don’t forget the bounty waiting here :
https://app.bountysource.com/issues/45920762-airplay-2-support

@porg
Copy link

porg commented Jan 2, 2024

Airplay 2 Multiroom Audio a.k.a. Streaming to multiple AirPlay playback devices (receivers)

  • Regarding service discovery: The official Apple support document clearly states that service discovery works with "Bonjour which works by using multicast traffic to advertise the availability of services."
  • How does Multiroom streaming to multiple devices work itself on an IP level? Does Airplay facilitate clever IP delivery schemes like multicasting (or possibly broadcasting) to optimize network bandwidth utilization? Or does it simply use multiple parallel Unicasts to all receivers?
  • In other words: If I stream to X receivers does Airplay need X times the audio/video-bitrate as network-bandwidth? Or does it send out the information only once, and all intended receivers get it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests