-
Notifications
You must be signed in to change notification settings - Fork 237
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
Common question to clarify best practice for "audio synchronization" (between owntone and clients) #1635
Comments
Not totally sure what your question is, but I understand you would like to know how sync works? With Airplay 1 and 2 it's basically that the speakers syncronize their internal clocks with OwnTone via ntp. This happens both when playback starts and during playback (to avoid drift). This should assure that they are in sync. Airplay 2 also supports ptp instead of ntp, but OwnTone doesn't support that (yet). Then there is audio played locally - i.e. coming out of the audio jack. This is via alsa or pulseaudio. Owntone syncs this with what is played via Airplay (or would be, if no Airplay speaker is active). This is done by 1) delaying playback start to match Airplay, 2) adapting the sample rate to how quickly the sound card is consuming audio so it follows the internal clock. A bit complicated, but the bottom line is playback start can be out of sync in some cases so can be adjusted with Finally the Chromecast implementation doesn't really have sync, meaning that Owntone can't do any adjustment if the speaker is slow or fast. Owntone also doesn't know exactly when it starts, so the default is a best guess, but can be adjusted with the per speaker Btw I removed the log, since it didn't contain anything of relevance. |
Hello @ejurgensen, thank you for the information / explaining and yes you understood my main part of the question. by the way (for other newbies as me): Second part of my "issue" is a friendly request to extend the documentation with examples of "device constellation" and actions / config adjustment to make (similar to the very good section "output/alsa") Thank you in forward! |
You can only use AP1 with shairport-sync, since its AP2 mode requires ptp, and OwnTone doesn't support that. But it wouldn't make a difference with regard to sync anyway. The advantages of AP2 with OwnTone as source is mostly just lower bandwidth consumption. |
Hello Folks,
could you explain the best practice (and the basic behind) for "audio synchronization".
Call it "multiroom-audio", "buffering", "delay", "response", "time-ticks", in the end it means accurate playback on different output devices / instances without for (humans) audible difference in the position of the playback track or stream.
Where is the difference between shairport-sync in Airplay 1 and Airplay 2 mode connected to owntone?
Devices included (in my goal setup):
"Sender / Transmitter":
"Receiver / Client"
I read in the owntone documentation and over several "issues", but I'm pretty sure, I don't understand "at which time (combinations)", "what (and in deep WHAT)" is todo.
Test setup as follows:
owntone (on RPI 3B+, Raspberry Pi OS Lite "based on Debian "bullseye", Openmediavault 6, Linuxserver.IO docker "daapd")
shairport-sync (in Airplay 2 mode, on RPI2B+ V1.1, DietPi OS V8.20 based Debian "bookworm")
Result
Not in synchronization for round about 0,5s to 1,0s (based on my hearing, feeling).
If I send audio from a MacBook to the shairport-sync client, these two are in harmony = sync (no audible difference).
I'm thankful for hint to start for my test setup.
But in a common view it would be helpful (for more people on planet earth) if the documentation could more "clearer" to this item.
The documentation has a status that other projects would be proud of ✔️
But here and there it could be extend.
I loved to see a section of "sync" as the "alsa" section is (with the concrete/detailed examples) .
By the way a proposal for a addition of the "Chromecast" section with the information of the "issue" #1516.
Quote from the "issue" to Chromecast:
#1516
"You can use the "offset_ms" setting to control when your CC starts. You can set it in the config file like this:
chromecast "My Speaker" {
offset_ms = 123
}"
Thank you in forward!
The text was updated successfully, but these errors were encountered: