mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.2k stars 571 forks source link

Version 3.1.3 Intermittently speeding up #615

Closed George-ou812 closed 4 years ago

George-ou812 commented 6 years ago

Hi, When using YouTube for example, in good signal area ( wifi ) I notice an intermittent "catching up" or speeding up in audio to re-sync with the video I assume. The duration of this is only a few seconds in length. Other wise best shairport-sync yet!

Thanks.

mikebrady commented 6 years ago

Thanks! I haven't noticed this phenomenon, TBH. Can you give a bit more detail please? Are you using a Mac or an iOS device? Are you using the YouTube app or something else like Safari? Would there be a specific video that might be worth trying this on?

George-ou812 commented 6 years ago

iPad Mini and YouTube straight off Safari mainly. Nothing specific regarding video/music, but more noticeable further away from the access point. Again intermittent/random in nature certainly not all the time. I've got teenage kids so asking then to play tunes in the lounge they love, little do they know they are really do all my testing for me! One for the old man.

mikebrady commented 6 years ago

Excellent! I will play around a bit and see if I can get an effect. Haven’t noticed it before, but maybe my musical tastes are too sedate!

mikebrady commented 6 years ago

Not having much joy with this, I fear. Do you notice any distortion in the sound, e.g. pitch changes or stuff like that?

George-ou812 commented 6 years ago

With mine there is an intermittent speeding up of the music more so YouTube. It lasts just a few seconds and through experimentation its a lot more frequent on the fringes of my WIFI. I've also noticed about a one second delay in the video with respect the audio coming out of shairport. I'm using the lasted version 3.1.3. There are graps in the speeding up, Feels like its trying to sync or something.

root@Must:~# shairport-sync --version 3.1.3-OpenSSL-Avahi-ALSA-sysconfdir:/usr/local/etc

Anything I can do regarding the delay? This purely audio rendering only, can I get rid of OpenSSL and/or Avahi?

Thanks.

mikebrady commented 6 years ago

Thanks for the update. Shairport Sync does actively try to stay in sync. It uses OpenSSL to decrypt incoming audio and it uses Avahi to advertise itself on the network, so both are necessary. You could use mbed tls instead of OpenSSL and you could use tinysvcmdns instead of Avahi, but it’s not recommended and really won’t make much functional difference.

If you turn on some log verbosity, say set log_verbosity to 1 in the configuration file, then Shairport Sync should log messages if it’s struggling to synchronise. Another possibility is to turn on the generation of statistics to see if any anomalies show up there.

mikebrady commented 6 years ago

So, I've experienced the speeding-up thing. As you said, it happens on the fringes of WiFi, i.e. where the WiFi signal is poor. Looking at the debug log when it happens, it seems that it is preceded by a break in reception of audio, and sometimes of video. Then the delayed audio seems to come in a burst and the "speeding up" is caused by the synchronisation software trying to skip the now-late audio packets, as you suspected. It sounds weird! Sometimes, I think I see a real timing discontinuity in the video -- e.g. when playing a song, the lip-sync indicates that part of the song has been skipped.

mikebrady commented 6 years ago

So, I'm modified the synchronisation software to handle these situations a bit better, I hope. It won't fix a poor WiFi, but hopefully Shairport Sync will recover a bit more gracefully from problems caused by it. If you were inclined to test it, it's incorporated in the latest development build, and I'd be glad to hear of your experiences with it. No mad rush, of course.

George-ou812 commented 6 years ago

Thanks, I'll give it a beating over the next week or so. Appreciate all you work.

George-ou812 commented 6 years ago

Thanks, I'll give it a beating over the next week or so. Appreciate all you work.

On Fri, Feb 2, 2018 at 2:44 PM, Mike Brady notifications@github.com wrote:

So, I'm modified the synchronisation software to handle these situations a bit better, I hope. It won't fix a poor WiFi, but hopefully Shairport Sync will recover a bit more gracefully from problems caused by it. If you were inclined to test it, it's incorporated in the latest development build, and I'd be glad to hear of your experiences with it. No mad rush, of course.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mikebrady/shairport-sync/issues/615#issuecomment-362602450, or mute the thread https://github.com/notifications/unsubscribe-auth/AZGhtyk0VWdLTiLe5ov0I4-tGQPCXsIVks5tQxzwgaJpZM4QiRcf .

mikebrady commented 4 years ago

Thanks for this contribution. Closing the issue. Please open a new one if necessary.