Open ghost opened 10 years ago
I've also experienced this, but this seems to be isolated to streaming audio from my mac. when i stream from an ios device there is no lag / delay. Is there any way to fix this?
It comes from the Airplay standard, no ?
Anyone working on solving this issue, or is it actually the video that needs to be delayed, because the sonos is that much slower?
Can confirm, on ipad ios 7.1.2. Interestingly, plex and direct safari video playback are affected, but youtube is not.
@stephen could you provide some context on this? After cursory look at teh code it looks more like a https://github.com/stephen/nodetunes issue
Hi all
I am experiencing the same issue when streaming from my iMac. Any fix I can implement in order to have video and sound synchronized?
Other than that, thanks for the Airsonos development, it's great.
I also agree that the video should be slightly delayed. Syncing that is probably difficult since airsonos can't control specific applications like VLC. You can delay the video of VLC quite easilly yourself with the the F
and G
keys.
This issue is due to https://github.com/stephen/nodetunes/issues/40
I believe the issue comes down to one or more of the following:
rtptime
from RTP-Info
headerI don't understand the AirPlay protocol well enough and have only been looking into the matter for less than 2 days.
More info Sync Packets:
Sync packets are sent once per second to the control port. They are used to correlate the RTP timestamps currently used in the audio stream to the NTP time used for clock synchronization.
Timing Packets:
Timing packets are used to synchronize a master clock for audio. This is useful for clock recovery and precise synchronization of several devices playing the same audio stream.
i have the same issue. when i play a video on my iphone, the sound starts a few seconds later. there's no sync. if there was a solution to this, then this would seriously be the best app ever.
ok, so I've been playing around with this. it seems the delay is 4.7 seconds. so using video playback apps on iOS that let you adjust the delay makes things work perfectly.
I am using VLC for iOS to playback files that use DTS codec (movies... this is one of the only apps that supports this codec) and AVplayerHD for everything else. then I adjust the audio delay in each app to -4.7 and the audio and video is now in sync.
only issue now is playing videos from a web browser/YouTube.
Question regarding audio sync/delay:
For a long time, using AirSonos on a clean RPi2 - using a iOS6-iPad (YouTube App Video Playback) has been almost in sync. You could watch the video on the iPad and the sound send via AirPlay to the Sonos (Play:1) was only slightly(!) out of sync (talking about 0,5 seconds or so). After not using the setup for some month - today - this is not possible anymore because of the approx 4 seconds delay.
What has changed? Does it have to do with the never Sonos Software Versions? (Nothing else seems to have changed. The AirSonos setup is exactly the same, so is the iPad)
Thanks.
it would take the dev doing some work to get things to sync with youtube etc... not sure he cares :/
I'm fairly certain most of the delay is caused by streaming with shoutcast. The audio needs to be encoded to mp3 server-side before it's streamed, which can take 500~1000ms, then you have the client playback buffer, which can add several seconds depending on the client. @axbmcuser I imagine, all else being the same, that Sonos increased the playback buffer.
think there is a workaround?
apple is now selling Sonos in apple stores, so i think there probably will be airplay support eventually in a new model.
@jonbid I don't think so. In order to play anything you need to send two requests to the Sonos, one to queue up the song, and another to play it. Together they add up to 200~300ms, which is better, but still not good enough for video.
If there was some way to skip the queue step, it might work, as that was typically <100ms in my tests.
Actually, on second thought I guess it doesn't really matter how long it takes to queue it up. I'll keep looking into it.
what ive been doing is using VLCplayer to playback videos and then adjusting the audio sync a few seconds slower to get the video/audio in sync... but its kind of irritating having to do that every time. and playing back videos in a web browser is still out of sync. wish there was a simpler solution.
@jonbid If you're using silverlight to stream video (e.g. netflix) there is a 'hidden' menu you can open to adjust a/v synchronization. But like you said, it's pretty inconvenient.
I have been trying to use my Mac connected to speakers via headphone jacks with Sonos in the back of the room as surround speaker, but no luck because of the delay. Any help would be appreciated!
@stef-germany You should open a bounty on https://www.bountysource.com/ I would consider contributing, I'm sure others would as well.
no way to fix the 4 sec delay yet?
sonos announced today that airplay is coming to sonos in 2018, so this will no longer be needed.
Great news!
When I stream a movie or just when I hit next song on Spotify there's a delay of 0.5s I can't watch a movie when the sound is not sync correctly.
My sonos play5 is connected by ethernet and the laptop is on the Wifi.
I think we can fix this by starting the playback at 0:05s ahead instead of 0:00. Any ideas?