openairplay / node_airtunes

node.js AirTunes v2 implementation: stream wirelessly to Apple audio devices.
BSD 2-Clause "Simplified" License
273 stars 84 forks source link

Multiple streams not in sync #16

Closed sazz closed 10 years ago

sazz commented 11 years ago

I'm running a setup of three raspberry pi's with shairport and a central node.js serving the streams via airtunes.

I'm currently running into sync issues because i cannot get my clients to play the audio in sync. The lag between the clients is sometimes up to 2 seconds.

Do you have any clue what's the issue here?

Thanks,

sazz

lperrin commented 10 years ago

Hello, sorry I didn't reply earlier. Can you give me more information about your setup ? Where exactly is node_airtunes used ?

To give you some info; node_airtunes supports multi-device sync, but the server might not.

lperrin commented 10 years ago

Disregard my previous comment. I reread your comment and understood. I'll take a look.

lperrin commented 10 years ago

I might be wrong, but it seems like shairport does not handle the sync packets of AirTunes v2. I have opened an issue with them to confirm.

sazz commented 10 years ago

I have written an airtunes management server ;) The server basically receives icecast streams and transmits them to a number of devices management by a mobile gui.

Currently the server is just a proof of concept - so it lacks currently documentation.

But it should be pretty straightforward to setup (mysql database, start server)

sazz commented 10 years ago

https://github.com/sazz/airhome-management-server

lperrin commented 10 years ago

Nice work :) I haven't received any news from Shairport, but I'm pretty sure the sync issue lies on their side. I'll close this issue.

fritz-fritz commented 9 years ago

@sazz , @lperrin FYI you may be interested in https://github.com/mikebrady/shairport-sync as that is supposed to keep the player synced with the source...

I'm planning to build a similar multi-airplay controller.

fritz-fritz commented 9 years ago

@lperrin I finally got everything set up and configured... I too have bad synchronization problems. I have set up streaming to many different types of airplay receivers and they all play out of sync (including the apple tv). It's odd... like the degradation is worse for each device sequentially.

Perhaps i'm adding the devices in a different manner than the way it was designed? Can you give sample code of how multiple receivers should be initialized?