Author Topic: UPnP 2025 - Continuation of the original UPnP/DLNA plugin  (Read 34823 times)

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Are you sure about that?
As I said before, all formats including Wav and Ape play fine using LMS > Squeezeplay.

Based on the log you linked, I'm 100% sure the Squeezeplay device is not advertising that it supports Opus and Wav.

That doesn't mean the Squeezeplay device cannot play those codecs, it just means it's not telling other devices on the network that it can.

If LMS > Squeezeplay works that means one of the following
1. The Squeezeplay does support those codecs but just doesn't advertise it.
2. The Squeezeplay doesn't support those codecs and LMS encodes the track before sending it to the Squeezeplay.

Easy way to find out.
Check "force native stream" and attempt to play an Opus track. If it plays it's option 1, if it doesn't it's option 2 (assuming some other error isn't stopping it).

edit: "force native stream" bypasses all the usual supported codec checks and will just attempt to play whatever format the source track is. It wouldn't have worked for Opus previously because the plugin didn't support that codec but it does now. As previously mentioned, it won't work for Ape yet.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
Easy way to find out.
Check "force native stream" and attempt to play an Opus track. If it plays it's option 1, if it doesn't it's option 2 (assuming some other error isn't stopping it).
I checked 'force native stream':

mp3
plays fine

Flac
no sound

Opus
plays fine

Wav
plays fine

(note that Flac not playing seems a somewhat random issue. See my previous two logs, where the first one failed playing Flac but the second one suddenly did)

new logfile with 'force native stream' checked (not playing Flac):

Code
11483; 10 Play - Input - K:\_MusicBee test library\UPnP test\Walter Becker - 01 - Door Number Two - MP3.mp3 Output - (http://192.168.2.1:49382/files/709A3B8A1FA4405Fp.mpeg)
11523; 11 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
11530; 12 GetFile[1] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\Walter Becker - 01 - Door Number Two - MP3.mp3 to 192.168.2.1
11530; 13 GetFile - range=bytes 0-8256988/8256989
11530; 14 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
11628; 15 StateTimer - Loading,old=Stopped
11847; 16 PostSoapRequest - 500,send=POST /plugins/UPnP/MediaRenderer/AVTransport/control?player=d8%3Abb%3Ac1%3A89%3A80%3A77 HTTP/1.1
Host: 192.168.2.1:9000
User-Agent: MusicBee UPnP Plugin
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#SetNextAVTransportURI"
Content-Length: 352

<?xml version="1.0" encoding="UTF-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:SetNextAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID><NextURI /><NextURIMetaData /></u:SetNextAVTransportURI></s:Body></s:Envelope>
11847; 17 SoapRequest:SetNextAVTransportURI:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0,NextURI=,NextURIMetaData= - <?xml version="1.0" encoding="UTF-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError><errorCode xsi:type="xsd:int">714</errorCode><errorDescription xsi:type="xsd:string">Illegal MIME-type</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>
11850; 18 SetNextAVTransportURI - Failed - Ignored as a blank URI is probable cause.
22163; 19 GetFile[1] - exit=10054, playtime=10631
24516; 20 Play - Input - K:\_MusicBee test library\UPnP test\Walter Becker - 02 - Door Number Two - FLAC.flac Output - (http://192.168.2.1:49382/files/939522C965308B1Cp.x-flac)
24527; 21 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
24527; 22 GetFile[2] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\Walter Becker - 02 - Door Number Two - FLAC.flac to 192.168.2.1
24527; 23 GetFile - range=bytes 0-26558156/26558157
24528; 24 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
24638; 25 StateTimer - Loading,old=Stopped
35566; 26 GetFile[2] - exit=10054, playtime=11037
38407; 27 Play - Input - K:\_MusicBee test library\UPnP test\Walter Becker - 03 - Door Number Two - OPUS.opus Output - (http://192.168.2.1:49382/files/BECBE4282A21C9BDp.opus)
38419; 28 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
38419; 29 GetFile[3] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\Walter Becker - 03 - Door Number Two - OPUS.opus to 192.168.2.1
38419; 30 GetFile - range=bytes 0-7310964/7310965
38419; 31 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
38549; 32 StateTimer - Loading,old=Stopped
38731; 33 GetFile[3] - exit=0, playtime=312
39075; 34 PostSoapRequest - 500,send=POST /plugins/UPnP/MediaRenderer/AVTransport/control?player=d8%3Abb%3Ac1%3A89%3A80%3A77 HTTP/1.1
Host: 192.168.2.1:9000
User-Agent: MusicBee UPnP Plugin
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#SetNextAVTransportURI"
Content-Length: 352

<?xml version="1.0" encoding="UTF-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:SetNextAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID><NextURI /><NextURIMetaData /></u:SetNextAVTransportURI></s:Body></s:Envelope>
39075; 35 SoapRequest:SetNextAVTransportURI:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0,NextURI=,NextURIMetaData= - <?xml version="1.0" encoding="UTF-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError><errorCode xsi:type="xsd:int">714</errorCode><errorDescription xsi:type="xsd:string">Illegal MIME-type</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>
39078; 36 SetNextAVTransportURI - Failed - Ignored as a blank URI is probable cause.
52394; 37 Play - Input - K:\_MusicBee test library\UPnP test\Walter Becker - 05 - Door Number Two - PCM.wav Output - (http://192.168.2.1:49382/files/472DD050DD4B6785p.wav)
52406; 38 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
52406; 39 GetFile[4] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\Walter Becker - 05 - Door Number Two - PCM.wav to 192.168.2.1
52406; 40 GetFile - range=bytes 0-48208715/48208716
52407; 41 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
52517; 42 StateTimer - Loading,old=Stopped
52733; 43 PostSoapRequest - 500,send=POST /plugins/UPnP/MediaRenderer/AVTransport/control?player=d8%3Abb%3Ac1%3A89%3A80%3A77 HTTP/1.1
Host: 192.168.2.1:9000
User-Agent: MusicBee UPnP Plugin
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#SetNextAVTransportURI"
Content-Length: 352

<?xml version="1.0" encoding="UTF-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:SetNextAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID><NextURI /><NextURIMetaData /></u:SetNextAVTransportURI></s:Body></s:Envelope>
52733; 44 SoapRequest:SetNextAVTransportURI:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0,NextURI=,NextURIMetaData= - <?xml version="1.0" encoding="UTF-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError><errorCode xsi:type="xsd:int">714</errorCode><errorDescription xsi:type="xsd:string">Illegal MIME-type</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>
52736; 45 SetNextAVTransportURI - Failed - Ignored as a blank URI is probable cause.
63384; 46 GetFile[4] - exit=10054, playtime=10976

BoringName

  • Sr. Member
  • ****
  • Posts: 916
I checked 'force native stream':

Well that proves it's option 1. If I remember correctly, squeezeplay is just a virtual player that is supposed to mimic a squeezebox? Are the Opus and Wav files playing out of a squeezebox device? If that is the case I'll create a ticket for them to update the supported codecs for Squeezeplay.

From the plugin's point of view, the 3 log file entries for the different attempts at playing a flac file are pretty much identical so that doesn't help me narrow down why sometimes it doesn't play anything. I'll have to do some testing on that.

I can see LMS has the same issue as upmpdcli in regards to a blank NextURI. There is a chance the failing NextURI command is causing problems. I'll install LMS over the next couple of days and run some tests.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
If I remember correctly, squeezeplay is just a virtual player that is supposed to mimic a squeezebox?
Yes.
Here is a link to the Squeezeplay forum topic
It may contain some useful info.


Quote from: BoringName
Are the Opus and Wav files playing out of a squeezebox device? If that is the case I'll create a ticket for them to update the supported codecs for Squeezeplay.
When playing to a Squeezebox Classic using LMS, all filetypes play fine.
When playing to a Squeezebox Classic using UPnP2025, all tested filetypes except Flac play fine.


Quote from: BoringName
I can see LMS has the same issue as upmpdcli in regards to a blank NextURI. There is a chance the failing NextURI command is causing problems. I'll install LMS over the next couple of days and run some tests.
No hurries, and let me know if there are other specific things you want me to try.

- - -

edit:
If you are going to install LMS, I would suggest installing 8.5.2
https://lyrion.org/downloads/archive/
I personally find the newer releases more difficult to navigate through, and I believe later versions (still) have some issues with Windows 10/11.

And don't forget to install the 'UPnP/DLNA Media Interface' plugin.
(settings > tab: Manage Plugins)
 
Last Edit: March 20, 2025, 01:35:34 PM by hiccup

MoboMini

  • Newbie
  • *
  • Posts: 4
Hi, with 1.9.3 do I just drag the dll file to the plugins folder?  And do I need to have plugin installed already first?  :-\

Thanks.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
Simply download the .zip file.
Then in MusicBee:
Preferences > Plugins > Add Plugin...
and navigate to, and select the .zip file.

MoboMini

  • Newbie
  • *
  • Posts: 4
Simply download the .zip file.
Then in MusicBee:
Preferences > Plugins > Add Plugin...
and navigate to, and select the .zip file.

Thanks. Do I also need a client, like bubbleupnp, or can I now stream direct from MusicBee app to my Wiim streamer?

hiccup

  • Hero Member
  • *****
  • Posts: 9107
Thanks. Do I also need a client, like bubbleupnp, or can I now stream direct from MusicBee app to my Wiim streamer?
If that Wiim thing is a (local) physical device, I think you should be able to get it to work following BoringName's instructions regarding 'agents' without the need of any other tools or applications.
Last Edit: March 20, 2025, 10:09:04 PM by hiccup

simbun

  • Jr. Member
  • **
  • Posts: 39
Thanks. Do I also need a client, like bubbleupnp, or can I now stream direct from MusicBee app to my Wiim streamer?

Make sure you're on at least MusicBee v3.6.9189 as described in this post: https://getmusicbee.com/forum/index.php?topic=42468.msg233305#msg233305

I've tested playback with FLAC to WiiM and it's pretty stable, although a little fragile with seeking/skipping (still to give feedback on that).
You don't need to make any profile changes unless you want to see higher resolution artwork in the WiiM Home app, but try the basics first.

EDIT: If you have any high resolution audio you will need to create a profile for the WiiM:
name: WiiM Pro
applies when the user-agent contains: Lavf/58.45.100 (Yours may be different)
maximum picture size: 600 (only relevant if you have an Ultra)
output sample rate: 44100 to 192000
maxium bit depth: 24
Last Edit: March 20, 2025, 11:53:14 PM by simbun

hiccup

  • Hero Member
  • *****
  • Posts: 9107
Question:

At first I assumed that the 'DLNA profiles' contained detailed and specific settings regarding technicalities about things that devices were able to handle or not.
But if I am not mistaken, I was wrong and it does nothing more than trying to match (a part of) the name of some 'user agent'.

Why?
How is it important how the renderer identifies/advertises itself if it has no consequences to any functionality of the plugin or its settings?
Wouldn't it be better to remove that option if it doesn't serve the purpose of specifying what a device is capable of?
Last Edit: March 20, 2025, 11:39:01 PM by hiccup

simbun

  • Jr. Member
  • **
  • Posts: 39
At first I assumed that the 'DLNA profiles' contained detailed and specific settings regarding technicalities about things that devices were able to handle or not.
That is what a DLNA profile contains, but it also includes the signature (user-agent) of the control point/renderer to which it applies.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
At first I assumed that the 'DLNA profiles' contained detailed and specific settings regarding technicalities about things that devices were able to handle or not.
That is what a DLNA profile contains
Are you sure?
I looked into what these presets contain and I couldn't find anything referencing specific settings or capabilities.
They only contained an 'agent' name.
Can you share some screenshot or copy/paste something that shows otherwise?

Also, I don't see any options or check boxes changing when selecting a different profile.
Which is what I would expect to happen when changing profiles containing specific settings.
To me that also indicates that 'profiles' have no effect on any settings.
Last Edit: March 21, 2025, 12:05:46 AM by hiccup

simbun

  • Jr. Member
  • **
  • Posts: 39

BoringName

  • Sr. Member
  • ****
  • Posts: 916
When playing to a Squeezebox Classic using LMS, all filetypes play fine.
When playing to a Squeezebox Classic using UPnP2025, all tested filetypes except Flac play fine.

I've found why the UPnP media interface plugin is not checking for Opus and Wav support. I've created a ticket on the LMS github page. It looks like a relatively easy fix and shouldn't cause issues elsewhere.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Question:

At first I assumed that the 'DLNA profiles' contained detailed and specific settings regarding technicalities about things that devices were able to handle or not.
But if I am not mistaken, I was wrong and it does nothing more than trying to match (a part of) the name of some 'user agent'.

Why?
How is it important how the renderer identifies/advertises itself if it has no consequences to any functionality of the plugin or its settings?
Wouldn't it be better to remove that option if it doesn't serve the purpose of specifying what a device is capable of?

The profiles just match to a useragent so the user can set specific thresholds per device. I guess for most people it is overkill as they will only use one device but for those with multiple devices with varying levels of format support it is necessary. eg) if you send music to an Amp during the day and at night you use Musicbee as a server on your mobile device while in bed. I expect iPhones don't play Flac.

The devices advertise what formats they support. It becomes important if you have some files the device cannot play. You could either set a blanket rule so all your tracks are encoded to a format the device supports or you could set it to play all tracks natively and the track only gets encoded if the device doesn't support it. I think most people would prefer the latter.

It obviously helps if the devices advertise what they support correctly.

Profiles are more useful for UPnP servers that handle video media because what they support varies so much. While they might support a certain audio codec, it might depend what video container it's in and could be limited to different bitrates depending on the container.

I've set the force native stream option to be enabled by default because I think these days most devices will play the common formats without issue. All the other settings are for people with older/problem devices that need tinkering. I do plan on making a proper guide and sticking it on the Wiki.