philippe44 / LMS-uPnP

Integrate UPnP players with LogitechMediaServer
111 stars 17 forks source link

Pcp on RPI . Sonos 10s delay #78

Closed champagnecharly closed 9 months ago

champagnecharly commented 10 months ago

Thanks Philippe for this great plugin and the support that goes with! I'm struggling with a sonos device. I have it connected to LMS on an Rpi4. No matter if the track is playing from the begining or if I change the position of the track through the sidebar, it takes 8 to 10 to play. Audio is sent as aac or mp3. Any sugestion? the overall objective is to sync/multi room with BT speakers. I read in a previous but older post that sync was not in the upnp standard. Is that still the case?

philippe44 commented 10 months ago

Sync is not possible with UPnP. It's simply not in the standard, its not a question of implementation. For the 8-1°s delay, if you are still willing to pursue that route, I'd need a log (see in plugin's settings)

champagnecharly commented 10 months ago

Foolishly I hadnt previously looked at the logs. Unfortunately, I had neither taken a copy or am I on that network. I'd been trying to put a little system in place for a friend but the main feature sought was to sync multiroom audio.
That said getting it working nicely without errors, regardless of sync would be nice.
The error I received was an HTTP error. When I return I will look further into it.

On the subject of lack of sync functionality in the standards, i read in a couple of places that in v2 of the standards autosync was available. Could this be true?

the quote from the following link : "The latest versions of the UPnP specifications have a SyncPlay method whereby the Control Point commands the Renderer about a) an exact starting time when a particular stream shall commence playing, and b) a playing speed (normally 100%). This imposes two basic functional requirements on the renderer -- namely that it shall have a clock so that i) it knows the time (based on NTP or SNTP protocols) when it shall start, and ii) it can hold the time throughout the duration of the stream being played so that the playing speed is exactly 100%.

If you are running under v1 of the UPnP specifications then you don't have the SyncPlay command and the renderers do not have a NTP or SNTP synchronized clock. Nevertheless it would theoretically be possible for the MC server to synchronize the play start time of two or more Renderers by holding back its response to the HTTP GET of those players so that all streams start to be transmitted to the renderers at exactly the same time."

I haven't yet looked deeply into but I noticed in UPNP AV architecture there is a functional under AVtransport called Syncplay.. Is that different?

philippe44 commented 10 months ago

There are very few players that report to support UPnP v2, AFAIK. The "hold your response to GET" does not work at all. Each has full liberty to decide how much they need to buffer before starting to play. That means that they will start "some time after" streaming starts. That means no sync. Maybe you can start with a second but that unusable

champagnecharly commented 2 weeks ago

Excuse the extended delay, i just wanted to say thanks for your replies.