mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.15k stars 567 forks source link

Airplay 2 Support ? #535

Closed timstans closed 1 year ago

timstans commented 7 years ago

Any Plans?

Vaskyy commented 6 years ago

I've just updated my iPhone SE to 11.4 and i dont get the selection circle :/ On a second iPhone 7 with 11.4 the same. I Have two Raspberry Pi's running both shairport-sync 3.2RC10. Multiroom works fine with Itunes from my Windows Computer. There I can select everything, and it's synchronous. But no way to get this working on mobile devices with 11.4 :( Maybe I configured smth. wrong?

lionep commented 6 years ago

It’s normal, it’s not implemented in Shairport Sync. You can get the circle on Apple HomePod or Apple TV 4, at the moment.

Vaskyy commented 6 years ago

Is it going to be implemented?..

Oggymator commented 6 years ago

@Vaskyy Read the complete issue/thread ;)

noelhibbard commented 6 years ago

I feel bad for Mike here. People seem to think he is going to work miracles. A little history on AirPlay1. The original hack of AirPlay1 came as a hardware hack of an AirPort Express. Someone was able to do a raw dump of a chip on the APE which gave them the encryption keys needed for AirPlay. This information was shared and eventually lead to the reverse engineering of AirPlay1. Mike as far as I know had zero involvement in this process. All of this work will need to happen all over again before AirPlay 2 can become a reality. It's been a long time since the original AirPort Express, I suspect Apple will make this task much more difficult than before. This discovery of AP2 support on the APE sounds exciting but I suspect it's not going to be implemented on the current hardware but on an entirely new device.

Long story short, I'm not going to hold my breath on seeing AP2 support in shairport-sync anytime soon. No disrespect to Mike. I just don't think this is his area of expertise.

noelhibbard commented 6 years ago

To add to this, I mainly use shairport-sync over an APE or Apple TV (any generation) due to it being significantly more stable. The APE is a pile of crap reliability wise. The ATV isn't much better. shairport-sync on the other hand is rock solid. I am crossing my fingers that the new APE will be more stable and if so I don't mind buying several of them to run all my rooms.

Supereg commented 6 years ago

Potentially we could have some luck that reverse engineering the protocol gets a bit easier, not to say it would be easy, since AirPlay 2 is going to be implemented by all kinds of manufacturers. The Future will tell us. However I think the bigger part will be the implementation itself. AirPlay 2 seems pretty complex.

mikebrady commented 6 years ago

Noel has summarised the situation perfectly. And, to my knowledge, nobody has hacked even the video part of Apple TV, so I suspect even expert hackers will have the greatest difficulty. IMO, it won't be the complexity, it will be security and encryption that will put it out of reach.

Vaskyy commented 6 years ago

Alright guys, thank u for the quick responses. And thank u mike for your really great work! I love shairport-sync, it’s really rock solid!

echamberlain commented 6 years ago

Apple has moved the authentication to hardware. Approved vendors can buy the chips from select vendors.

maumi commented 6 years ago

Sounds Not suitable because also old Hardware uses AirPlay 2.

akarpo commented 6 years ago

That doesn't make sense to me. How can MacOS offer multi-speaker output via Airport 1 but iOS isn't able to do the same (through software) with Airport 2?

noelhibbard commented 6 years ago

OSX and iTunes support multirooms via AirPlay1 by creating multiple streams. This requires lots of bandwidth (it’s a lossless stream), CPU and battery. Not the sort of thing Apple wanted to allow on a mobile device. AirPlay2 no doubt handles this differently. I suspect it does a single broadcast of the stream and sends out another packet telling individual speakers to subscribe to the stream. In addition to that, AirPlay2 works more like Chromecast where the stream can actually be handed off to the individual speakers so the mobile device can actually be turned off and the stream keeps going.

AirPlay2 is entirely new. It isn't like Apple is just pulling some sort of marketing trick over on us.

Dave-Snigier commented 6 years ago

Another thing to consider is Apple's chip design team. The original airport express was released prior to Apple making their own silicon and uses a Broadcom chip. The Homepod uses their A8 chip, which includes the secure enclave coprocessor. The key in there will be pretty secure.

It would be nice if Apple opened things up a bit for hobbyists as they did with homekit.

akarpo commented 6 years ago

That makes sense. I'm wondering though if there's such a thing 'Airplay 2 lite' and 'Airplay 2 Plus' for the Airplay 2 reference specification. For 'Airplay 2 lite', The iOS device can send a URL string to the Airplay 1 devices - the music doesn't go from the iOS device to each Airplay receiving point, but from the iOS device to Apple music (very briefly) and then the URL to the stream is passed to each device. Each device has clock synchronization (ensuring timing is right / output is uniform between speakers), and the music plays on each device. 'Airplay 2 lite' would lack the large buffering feature that's present in the plus specification.

Why is this necessary? I honestly have no idea how the older Airplay 1 speakers (right now I think the only OEM thats announced Airplay 2 compatibility for an older speaker is SONOS. Bose has said they would but has to provide a timeline or confirm support is coming to older Soundtouch devices ) are going to gain Airplay 2 compatibility if they lack the horsepower to do multi-minute buffering of lossless audio.

'Airplay 2 plus' is the spec that has the new chips that are able to handle parsing the streams directly from the iOS device and storing the data on-board.

All I'm really looking for is a cheap dongle (exactly what a Chromecast Audio does) to connect existing speakers to make them Airplay 2 compatible. I feel like there are many people who are looking for something similar.

LP0101 commented 6 years ago

Looks like the Airport Express is getting Airplay 2 in iOS 12: https://i.redd.it/xvm3ggcu20511.jpg . Might make reverse engineering the new protocol easier.

akarpo commented 6 years ago

Well I'll be damned. They might actually update an EoL'ed product to support Airplay 2 - never thought I'd see the day Apple might do this, especially after some other decisions during the Tim Cook era.

I guess we may get our Chromecast Audio - esque dongle after all!

VeniceNerd commented 6 years ago

Sonos just released their firmware update that adds Airplay 2 to some of their speakers:

http://9to5mac.com/2018/07/11/sonos-airplay-2-update/

Do you guys think that something can be learned from looking into this for AirPlay 2 support?

JugglerMaster commented 6 years ago

@mikebrady Thanks for your hard work and those who went before you! I am using this in my own house and have two Pi 1 model b's running it.

wiegell commented 6 years ago

So is it still working?

I read this thread since the release of 11.4, but i find that some people (@fluppie , @mikebrady) say they have it working on 11.4, while some others don't? (@Vaskyy )

I'm new to Shairport, but would like to know if it has a future before getting too much involved :)

Also i'm thinking that apple has only released it for expensive receivers so far to try and push the impatient consumers towards the expensive products. I think that a cheaper line of products might come afterwards.

JugglerMaster commented 6 years ago

Yep it is still working wonderfully :). I am on IOS 11.4.1

Christopher Dadisman

On Jul 17, 2018, at 10:02 AM, hvedemelsbof notifications@github.com<mailto:notifications@github.com> wrote:

So is it still working?

I read this thread since the release of 11.4, but i find that some people (@fluppiehttps://github.com/fluppie , @mikebradyhttps://github.com/mikebrady) say they have it working on 11.4, while some others don't? (@Vaskyyhttps://github.com/Vaskyy )

I'm new to Shairport, but would like to know if it has a future before getting too much involved :)

Also i'm thinking that apple has only released it for expensive receivers so far to try and push the impatient consumers towards the expensive products. I think that a cheaper line of products might come afterwards.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/mikebrady/shairport-sync/issues/535#issuecomment-405614297, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFcLbRSAHe22af2TLz4o8AVLugVj1quVks5uHfxugaJpZM4Nwfua.

Vaskyy commented 6 years ago

Running iOS 12.0 on my iPhone SE and it works perfectly :)

akarpo commented 6 years ago

Can someone running iOS 12 Beta 4 confirm that there's no longer a prompt in HomeKit to upgrade the firmware on the Airport Express? https://forums.macrumors.com/threads/ios-12-beta-4-%E2%80%95-bug-fixes-changes-and-improvements.2127977/page-15#post-26264477

This would be a huge bummer, things were looking so promising...It's crazy that we still don't have a decent aux out commercial solution for AirPlay 2. I did try using the Apple TV 4 as a target - the problem is that the HDMI -> 3.5mm converter (https://www.amazon.com/gp/product/B079HSZYLV/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1) I picked up to output audio to a set of speakers introduces lag, the music is out of sync with a Sonos One I recently bought (which does have Airplay 2, and is great).

Marvo2011 commented 6 years ago

Which version of shairport-sync should multi room (AirPlay 2) compatible?

I tried out 3.2.1 but, it seems to be only AirPlay 1.

mikebrady commented 6 years ago

Thanks for the post. Shairport Sync is only compatible with AirPlay 1. It is multi-room capable, but not from iOS devices. It works great with iTunes, ForkedDaapd and the like.

oobidub commented 6 years ago

I can confirm iOS 12 dev beta 4 still prompts for an update on the airport express in HomeKit for AirPlay 2.

DomusDigital commented 6 years ago

I remember when Apple had a CEO who was also an audiophile. With the issues that crop up on macOS machines running as an iTunes media server (interruptions via notifications etc), I’m not convinced that people on the iTunes development team run networked iTunes music at home. Not only is it time to fully enable distribution of 24-bit mulitroom streams, but to open AirPlay 2 up lest we be restricted to using these mega brand FauxFi solutions like Sonos or B&O, Bose and NAIM squawk-boxes.

akarpo commented 6 years ago

Unfortunately I think all audio is trans-coded (even if you used desktop iTunes to get ALAC files on your phone) to 256 Kbit AAC before being sent via Airplay 1 / Airplay 2. I can't find a reference technical sheet beyond what's listed in the 2017 WWDC session, which just mentions pre-buffering of the next minute of the music for the next song in queue to play.

But I agree, it would be nice to have 24bit audio support. We're probably another Airplay generation away from that though, we would need a 2GB of storage for buffering the next song. The minimum required hardware spec for Airplay 2 (I'm guessing here) doesn't have the CPU/storage to do 24bit audio.

mikebrady commented 6 years ago

Alex, I don't think that's quite right. In AirPlay 1, material is transcoded, if necessary, to Apple Lossless 16-bit interleaved stereo, not to 256k AAC. If you have your audio in ALAC/16/Stereo, you lose nothing in the transfer. Support for different depths and rates would be nice alright.

akarpo commented 6 years ago

Oh, interesting. Is that true for the Music app only, or for any app? I'm not going to subject myself to the pain that is trying to sync ALAC files over USB through iTunes, but I do have some ALAC on my Plex server I can try to Airplay.

mikebrady commented 6 years ago

For all apps and sources that I've looked at, ALAC/16/Stereo is used for transport in AirPlay 1. The audio is transferred over the network in packets containing frames encoded in ALAC/16/Stereo. If I remember rightly, it's bit-faithful from CD -> ALAC -> iTunes -> AirPlay 1 -> DAC. This is before any synchronisation is done on it.

kdomke commented 6 years ago

I am interested in Airplay 2 support as well. Anything we can do to make it happen?

mikebrady commented 6 years ago

If you read all the entries in this thread, I think you'll see the issue has been well aired...

VeniceNerd commented 6 years ago

Denon just released their firmware update for AirPlay 2 as well. Tested it last night and works perfect!

With both Denon and Sonia releasing firmware updates for their existing hardware it should be possible to reverse engineer the protocol, right? At least it should only be a matter of time?

lexam79 commented 6 years ago

https://9to5mac.com/2018/08/28/airport-express-airplay-2-homekit/

mikebrady commented 6 years ago

Good job Apple!

VeniceNerd commented 6 years ago

At this point it should only be a matter of time until someone reverse engineers the AirPlay 2 code, right?

NoisyNarrowBandDevice commented 6 years ago

AP2 for Airport Express is interesting. Still can somebody shed any info if AP2 >16/44.1? The Developer Conference material mentions 44.1 + 48k and "various bit-depths" as supported.

mikebrady commented 6 years ago

@VeniceNerd, I wish that were true...

Wh1terat commented 6 years ago

@NoisyNarrowBandDevice Pulled from Airport Express(K31) firmware:

ROM:80B78D8C    0000000E    C   PCM/8000/16/1
ROM:80B78D9C    0000000E    C   PCM/8000/16/2
ROM:80B78DAC    0000000F    C   PCM/16000/16/1
ROM:80B78DBC    0000000F    C   PCM/16000/16/2
ROM:80B78DCC    0000000F    C   PCM/24000/16/1
ROM:80B78DDC    0000000F    C   PCM/24000/16/2
ROM:80B78DEC    0000000F    C   PCM/32000/16/1
ROM:80B78DFC    0000000F    C   PCM/32000/16/2
ROM:80B78E0C    0000000F    C   PCM/44100/16/1
ROM:80B78E1C    0000000F    C   PCM/44100/16/2
ROM:80B78E2C    0000000F    C   PCM/44100/24/1
ROM:80B78E3C    0000000F    C   PCM/44100/24/2
ROM:80B78E4C    0000000F    C   PCM/48000/16/1
ROM:80B78E5C    0000000F    C   PCM/48000/16/2
ROM:80B78E6C    0000000F    C   PCM/48000/24/1
ROM:80B78E7C    0000000F    C   PCM/48000/24/2
ROM:80B78E8C    00000010    C   ALAC/44100/16/2
ROM:80B78E9C    00000010    C   ALAC/44100/24/2
ROM:80B78EAC    00000010    C   ALAC/48000/16/2
ROM:80B78EBC    00000010    C   ALAC/48000/24/2
ROM:80B78ECC    0000000F    C   AAC-LC/44100/2
ROM:80B78EDC    0000000F    C   AAC-LC/48000/2
ROM:80B78EEC    00000010    C   AAC-ELD/44100/2
ROM:80B78EFC    00000010    C   AAC-ELD/48000/2
ROM:80B78F0C    00000010    C   AAC-ELD/16000/1
ROM:80B78F1C    00000010    C   AAC-ELD/24000/1
ROM:80B78F2C    0000000D    C   OPUS/16000/1
ROM:80B78F3C    0000000D    C   OPUS/24000/1
ROM:80B78F4C    0000000D    C   OPUS/48000/1
ROM:80B78F5C    00000010    C   AAC-ELD/44100/1
ROM:80B78F6C    00000010    C   AAC-ELD/48000/1
NoisyNarrowBandDevice commented 6 years ago

@Wh1terat very interesting thx! Which version of the firmware is this? 7.8?

Wh1terat commented 6 years ago

@NoisyNarrowBandDevice Yep, 7.8

zllovesuki commented 5 years ago

Let's set up a bounty for the first one who reverse engineer airplay 2?

EDIT: Not a lawyer and I’m not sure if this is even legal. Lawyers on Github can chip in.

philfreo commented 5 years ago

@zllovesuki A bounty for a particular issue could be set up on BountySource: https://www.bountysource.com/issues/45920762-airplay-2-support

fobin commented 5 years ago

Airplay 2 is now on its way to smart TVs. https://www.apple.com/airplay/

mikebrady commented 5 years ago

This could be interesting.

M4RC02U1F4A4 commented 5 years ago

This could be interesting.

But we need to hope in AirPlay 2 "Whether VLC will support AirPlay or the latest AirPlay 2 specification remains unclear."

cdlenfert commented 5 years ago

"This will make it possible for Android users to beam videos from their mobile devices to Apple TVs" - iDB That at least puts it above the old AirTunes reverse engineering that's in shairport-sync currently. As far as I know there's no non-licensed way to send video to Apple TVs.

TorbenMichler commented 5 years ago

This could be interesting: https://www.frontiersmart.com/frontier-smartsdk-adds-support-apple-airplay , but it apparently has to be licensed: https://www.frontiersmart.com/sdk-licensing

tjfontaine commented 5 years ago

This could be interesting.

I am only able to find a reference for airplay v1, not v2 -- https://patches.videolan.org/project/vlc-devel/list/?q=airplay&archive=both