Kodi Community Forum

Full Version: Gapless playback with Kodi's UPnP renderer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I first posted this in the Kodi Raspberry Pi forum but was advised to repost here as my issue seems platform-independent.

I cannot seem to get gapless playback with Kodi's built-in UPnP renderer, I am running Kodi 16.1 on a RPi3 (OSMC 4.4.16-1) and on Windows10.

My music is stored on a NAS in single FLAC+CUE format. I've tried with several UPnP servers (MediaTomb, Logitech Media Server (LMS) with LMS-to-UPnP plugin) but none of them give gapless playback on Kodi. On foobar2000 (as a renderer, using UPnP plugin) gapless playback of any FLAC+CUE album works flawlessly.

After sending an album to Kodi from a UPnP control point Kodi plays the first track fine but my kodi.log shows a warning:

16:08:36 25959.970703 T:1459614704 WARNING: CCurlFile::Open - Disabling multi session due to broken libupnp server

Then, at the end of the track I get the following errors:

16:08:39 25962.761719 T:1459614704 ERROR: CCurlFile::Open failed with code 404 for http://10.0.0.1:49154/LMS2UPNP/bb-bb-1e-...-idx-1.pcm
16:08:39 25962.761719 T:1459614704 ERROR: Open - failed to open source <http://10.0.0.1:49154/LMS2UPNP/bb-bb-1e-dd-17-6c-idx-1.pcm>

A quick look at Kodi's source code tells me that the libupnp warning is raised in CurlFile.cpp. Multi-session gets disabled when find("Portable SDK for UPnP devices") fails.

I am guessing that the disabled multi-session is the culprit here.

Would someone be able to point me to a solution?
I have tried with an embedded cuesheet using foobar as control point and a win Kodi as a renderer and the gap is really terrible.
I was surprised it worked, as using instead a set of files the enqueuing process does not work (only the first is played). Further the same embedded files was not parsed correctly in Kodi.

The only inter-operable DLNA configuration I know (as I use it) allowing gapless in push mode (play to) is based on (window) Audionet RCP and Raumfeld Connector 2. The pull model inter-operate quite well (still with gap-less playback) in many cases and usually depending on good DLNA players.

Anyhow it looks to me that Kodi as DLNA player (if this is your constraint) works not perfectly, but well enough on on gap-less, I get very short gap (on my PC) and does not looks depending on network delays.
Foo upnp works gapless, it sends a constant stream instead of files
Yes, it works fine in pull mode. Players that support gapless work fine with it, But 'play to' towards Kodi works as described. I guess it is a Kodi issue, as I have some some cases where it works (even if not gapless). Push mode is quite a challenge: with renderers of the same brand it behaves differently. Having gapless even more.