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

Lossless streaming with AirPlay #348

Open
mariopaolo opened this issue Nov 10, 2024 · 0 comments
Open

Lossless streaming with AirPlay #348

mariopaolo opened this issue Nov 10, 2024 · 0 comments

Comments

@mariopaolo
Copy link

Hey, love the app, been using it forever :)

This is not a bug, not even a feature request (yet), and it's related to AirPlay and its weird behavior with lossless audio.
This article explains everything in detail.
Long story short, depending on the combination of iOS, app and AirPlay device, lossless files could actually be compressed while streaming:

... all AirPlay streams – v1 or v2 – sent to an AirPlay 1 endpoint are transmitted losslessly but that – wrinkle alert – AirPlay 2 transmission has a split personality. When transmitting to an AirPlay 2 endpoint, a streaming app developer can choose between AirPlay 1 and AirPlay 2 output modes with the former resulting in a lossless stream but the latter a 256kbps AAC lossy re-encode. Uh-oh.

This happens only with the new AirPlay2 where every link in the chain is using AirPlay2:

AirPlay 1 app mode –> AirPlay 1 endpoint LOSSLESS
AirPlay 2 app mode –> AirPlay 1 endpoint LOSSLESS
AirPlay 1 app mode –> AirPlay 2 endpoint LOSSLESS
AirPlay 2 app mode –> AirPlay 2 endpoint LOSSY

Here in this other article you can see that many services updated their apps to fix this issue and force AirPlay1 on at least one link of the chain (the app in this case). In this way the receiving device would fallback to AirPlay1 and transmission would be lossless.

As far as I understand, this can be enabled using Apple SDK, and I see RoPieee and maybe roon let you even toggle between modes in the UI.

I understand this is a very niche use case (AirPlay users with lossless audio), and I understand that even looking into it would require some effort. I also ignore if the app already does this, but I browsed past issues and find nothing related.

If it's indeed nothing complicated, would you be open to implement something like this?
Thanks for the great work on amperfy, much appreciated 🙏🏼

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

No branches or pull requests

1 participant