getmusicbee.com

MusicBee & Add-Ons => Customizations => Plugins => Topic started by: BoringName on January 25, 2025, 09:33:31 AM

Title: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 25, 2025, 09:33:31 AM
UPnP 2025

Available here - UPnP 2025 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

This is a fork of the original UPnP plugin created by Steven.

I was going to call it UPnP 2.0 but didn’t want to imply that it supports the UPnP Device architecture 2.0 standard, because it doesn’t….. yet.

Changes
- Converted all the code from VB to C#.
- Changed the Net target to 4.8
- Small layout adjustments to the config page.
- Removed references to FileCodec.AnyPCM as that is no longer part of the Musicbee API.
- Added support for Podcasts (downloaded only). I took some tips from GoodMorning’s fork to do this.
- Adjusted some of the default profiles to reflect current capabilities and added some new ones. Eg) BubbleUPnP now supports higher sample rates. In fact it pretty much supports anything. By default BubbeUPnP is set to downmix multi channel audio to stereo. If you toggle that off you can stream 192 kHz 6 channel audio straight to it, no transcoding. This worked with Flac and Ogg (Vorbis) for me. You also need to uncheck the "stereo only" checkbox in the plugin settings.

I’ve currently only tested it running the BubbleUPnP app on my android 14 mobile and an LGB6OLED TV from 2016 and it seems to work fine on both.

I’m testing it on 3.6.9143 P and haven’t noticed any crashes or memory leak problems rumoured in the other thread.

I have done no testing at all with using Musicbee to play to UPnP device. I have a vested interest in getting this working with modern devices so that will be worked on.

I just wanted to get this out as a starting point which hopefully will help some users as it should work with current versions of Musicbee.

I have some experience with DLNA servers, I helped get some things working on Serviio for sony bluray players a decade ago but my knowledge of UPnP and everything associated with it is very limited. I need to get up to speed on the UPnP documentation and the standards. The plan is to add support for modern UPnP standards to this plugin.

So for now, please don’t fill the thread with wishlists and issues you are having. I’m sure a good chunk of them are related to mismatched standards which I will get to.

In the meantime. The following might help you with any current issues.

To match a profile to your device the User Agent field is the key. To find the user agent your device is using.
- Check “log debug information”
- Click Save.
- Start your device and tap the Musicbee server
- Open the UPnP config page again in Musicbee and click the “View” button
You should see entries ending like this -
useragent=Android/14 UPnP/1.0 BubbleUPnP/4.4.9
useragent=Linux/3.10.19-p.57.digya.k2l.2 UPnP/1.0 LGE WebOS TV LGE_DLNA_SDK/1.6.0/05.70.40 DLNADOC/1.50

The values you need to worry about are highlighted in blue.

You need to set the “applies when user-agent contains” field to match this user-agent name. eg) for the LG TV above you could use “LGE” or  “LGE WebOS” or the full name “ LGE WebOS TV LGE_DLNA_SDK”. They will all match and use that profile.

You can set a profile to match multiple user-agents by separating them with a pipe symbol. Eg) if you set the field to “Bubble | LGE WebOS” it will match to both devices.

To make sure it’s using the correct profile, restart your device and Musicbee and check the debug log again, it should list what profile is being used for your device. Remember to uncheck the log debug checkbox and click save when you’re done troubleshooting. To clear the log you can just click view which opens it in notepad. Hit ctrl+a to select everything, hit delete and save it.

The other settings are thresholds and if the selected song is outside those thresholds it will be transcoded to be within the thresholds, otherwise it will direct stream the song to the device as long as your device advertises it can play the format. eg) if it’s Flac and your device doesn’t advertise it can play Flac, it will be transcoded even if it’s within the thresholds above.

When a song is transcoded it will follow the “output format” and “output sample rate” values.

As it states, the “force transcode” setting is global and applies to all profiles when checked.

Note: if you set the output format to PCM - 24 bit but have the “maximum bit depth” for that profile set to 16, it will save the output format as PCM – 16.

The “stereo only” checkbox will force a transcode on anything that isn’t 2 channels. Whether it’s mono or 5.1

If songs are getting transcoded even though the profile is matching and the song is within the thresholds, make sure your device is not transcoding, when I was testing 5.1 Flac and Ogg files it took me a while to figure out it was actually BubbleUPnP downmixing the incoming stream to stereo.


And just to pre-empt some queries. Here are some things that I am not going to do.

- Enable streaming to multiple devices at the same time.
- Enable streaming outside of the local network. You’re probably better off using something like Emby/Plex for this anyway. I highly recommend Emby, been using it for years and it’s fantastic.
- Do workarounds for obscure devices that don’t work because they are not following UPnP standards.

If devices are not being detected at all you should check firewall settings. Especially if the debug log states a connection was actively refused. If you’re having issues with a device newer than 2020, there is a good chance it’s not going to work until I update the plugin to handle modern UPnP standards. I can’t give a timeline for this, I’ll just say soon™.

edit: This plugin has a different filename to the original so make sure you disable the original and backup the \AppData\UPnPSettings.dat file if you want to experiment with the new version. Running them both at once probably won't be good.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 25, 2025, 10:03:59 AM
(https://i.imgur.com/3ESQY4B.gif)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 25, 2025, 11:38:02 AM
When I tried and installed it first, MusicBee would start but then immediately shut-down again within a second or so.
It was a quite recent version of 3.6, but not the very latest.
After installing the latest patch update (3.6.9156) MusicBee started properly again.

So, it might be good to clearly mention that there is some minimum version requirement.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: sveakul on January 25, 2025, 11:53:03 AM
Thanks Boring_Name you've made a lot of people happy with this one I'm sure!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 25, 2025, 03:47:51 PM
Nicely done, BoringName.

This worked right out of the box with my Internet radio. All default settings. Haven't changed a thing.

Thanks for yet another wonderful BoringName project.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 25, 2025, 03:59:55 PM
This worked right out of the box with my Internet radio. All default settings. Haven't changed a thing.
Could you also try it with LMS if/when you have the time?
(if I recall correctly, you are using that too, same as me?)
I can't get it to work (while I had it working to some extend in the past), but me failing now may be a result of the brain cells that were tasked for that job then have by now retired or have found another job.

LMS should be showing up in this 'output' dropdown, shouldn't it?

(https://i.imgur.com/b0Sss1P.png)

edit:
LMS used to be Logitech Media Server, but the (very active) community is now maintaining and releasing it as Lyrion Music Server (https://lyrion.org/)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 25, 2025, 06:31:58 PM

Could you also try it with LMS if/when you have the time?
(if I recall correctly, you are using that too, same as me?)
You used to know, but you forgot??
Yes, I'm still using LMS (now rebranded as Lyrion) albeit with one less device.
I've never used it with DLNA, but I'm willing to test it for you.
Answer me one question before I do so --- are you using the plugin? By Andy Grundman? As it's the only DLNA option I see. Unless there's something built in that I've missed.

And yes, their forum is fantastic even with the new branding. Very detailed, very helpful.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 25, 2025, 07:05:11 PM
Answer me one question before I do so --- are you using the plugin? By Andy Grundman? As it's the only DLNA option I see. Unless there's something built in that I've missed.
I don't think I ever used an additional plugin for LMS for this, but I could be wrong.

My setup:
LMS as a server, controlling and playing music to three Squeezebox Classic players. (for three rooms)
That has been working fine for many years now.
What I additionally would want to be able to do, is using MusicBee with the UPnP plugin to use LMS as the output, and then LMS sending the music to my Squeezeboxes.
In the past I got that to work with the original UPnP/DNLA plugin, but it had too many issues, so I abandoned it.

I should probably put in some time to get a better understanding of everything involved. The new Lyrion forum will probably also be helpful with that.
And I will check out if the plugin that you mentioned might be a part of the solution.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 25, 2025, 07:14:55 PM
And I will check out if the plugin that you mentioned might be a part of the solution.
Let me know if the plugin accomplishes your goal. If not, I will test it on my side.

As I said, I've never used/needed DLNA/UPNP to listen to music on my Squeezebox devices.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 25, 2025, 07:31:51 PM
As I said, I've never used/needed DLNA/UPNP to listen to music on my Squeezebox devices.
OK, so to be clear: you never tried to use MusicBee as the controller to send music to play on your Squeezeboxes?

PS
After installing an older Logitech LMS version that I am more familiar with (v7.7), I noticed a checkbox setting in LMS to activate 'UPnP/DLNA Media Interface'.
I probably had that one checked in the ole days, and I see it mentioned that it was indeed created by this 'Andy Grundman'.
I'll see if I can get things to work again with 7.7, and if so, update to the latest Lyrion version (v9 or 10 I think) and see if that then works too.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 25, 2025, 08:55:53 PM
OK, so to be clear: you never tried to use MusicBee as the controller to send music to play on your Squeezeboxes?
Correct.

I'm using LMS 8.5.3 and the Community Firmware 0.0.9 plugin for Radio/Touch/Controller. I have some time now, so I will add the UPNP plugin and report back.

I also don't want to hijack this thread, but since it's related to the new MB plugin, I think we're okay.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 25, 2025, 09:23:09 PM
So far only minimal success.

I installed the LMS UPNP plugin, restarted LMS, restarted the Squeezebox Touch, and restarted MB.

The "living room" Squeezebox shows up in MB Preferences > Player > output.
(https://i.imgur.com/GduiAc1.jpeg)

On the Squeezebox, I went to My Music > Remote Music Libraries (only because I don't see anything in its menus that might apply.) But it says it find any other media server. So for the time being, I'm done.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 25, 2025, 10:52:12 PM
When I tried and installed it first, MusicBee would start but then immediately shut-down again within a second or so.
It was a quite recent version of 3.6, but not the very latest.
After installing the latest patch update (3.6.9156) MusicBee started properly again.

So, it might be good to clearly mention that there is some minimum version requirement.


That's a strange one as there is nothing in there that needs a newer version of Musicbee. Usually that requirement is due to Steven adding a recent fix which isn't the case with this plugin. One thing that may cause an issue is if the original settings file exists from the old UPnP plugin. In hindsight I should have used a different name for the settings file to avoid any possible conflicts.

I just downloaded the portable version 3.5 into a new folder and that fired up perfectly fine with UPnP 2025 installed.

edit: Probably too late now but was there an error message in the Musicbee log or windows event viewer?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 25, 2025, 11:03:07 PM
Probably worth mentioning that I have changed absolutely nothing with how the UPnP operations function. So any issues you had in that regard with the original plugin will still be there for now.

The only thing this version should do is fix some possible compatibility problems with newer versions of musicbee.

It's going to be a while before I work on UPnP compatibility.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 26, 2025, 03:57:36 AM
After going through the UPnP 2.0 spec (it's a real page turner....) I can say the likelihood of me updating this plugin to meet that standard is extraordinarily small. Mainly because it requires implementing UCA which is a cloud based version of UPnP and adds a lot of complexity to the code which is completely unnecessary for what it needs to do. It also forces IPv6 compatibility.

It's not all bad news. I can still implement IPv6 support as part of the 1.1 standard, it's just not compulsory.

The UPnP 2.0 spec also states UPnP 2.0 devices and control points must be backwards compatible with UPnP 1.1, It just means UPnP 2.0 only functions won't be available to UPnP 1.1. Apart from UCA I can't really see anything in 2.0 that will reduce functionality of this plugin, most of the changes are just in header formats and the UCA implementation.

On top of the main UPnP specs there are specs for difference devices/services like MediaRenderer:1, AVTransport:1 etc... these are the elements that actually provide the functionality with this plugin and there are few different versions of each, some of which are currently not supported. They are all supposed to be backwards compatible but I'll start by adding support for the newer versions and see how that goes.

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 26, 2025, 08:43:09 AM
The "living room" Squeezebox shows up in MB Preferences > Player > output.
(https://i.imgur.com/GduiAc1.jpeg)
That's what I was expecting to see, but I don't get that.
So if you select 'Living Room' as the output, does the music indeed play on that Squeezebox?

also,
Do you have LMS installed on the same PC as MusicBee, or do you have it running on a different computer (server?) in your network?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Haro on January 26, 2025, 09:47:42 AM
Thank you for awesome effort! It just worked for me the first TWO times (i put it on two different library devices and it worked to play to the UPNP device easy peasy)

 better than ever. In fact, solved some issues where it never really worked well or at all with Phantom speakers, but it does now really with ZERO configuration changes.  

The primary issue was using the configuration dialog (its sized too big for FHD with scaling over 100%) i use 150% but its even too big for 125% scaling, the buttons at the bottom or the full contents are not usable at  < =  125% scale.   or its super frustrating. workaround is to change the scale and configure it then set it back so its not horrible but a little polish here might help new users.

Suggestion: put some scroll bars on the Properties dialog and or size it a little smaller and or fix the bug that you can resize it but it actually huts the situation.  (scenario  i have win10 or 11 running a FHD resolution (1920x1080) at 150% scale - issue is the properties dialog is not usable) [workaround: set the scaling to 125 or 100 to configure things then set it back) it would be nice to just show scrollbars when the dialog is resized or just dynamically support re-sizing it but account for SCALING.  

in any case it worked great and made me start thinking how i can-do push-button "output device" changes now.

i figured out Control + O gets me to the dialog pretty close to where i want to be but what this makes me want to find is a way to script

Ctrl+O Select "Tv Room" (which is a UPNP Device name)
vs
Ctrl+O Select "AISO"
or any other option in the list i might want to use.
like Direct Show sometimes is what i want to do.

that's probably a different thread though. :)
and this 2025 plug in so far is great!! it works!

I did see it hung up Music Bee when i tried to change the source.  from playing to the UPNP back to Direct Show. but i just the window manager CLOSE Music bee and send the crash dump restart and i could select a different Output device..  not sure what got hung up there or if it repros.  I do think it had played out  meaning there was nothing playing but it was still connected to the Device.  not sure if i need to be sure to close the UPNP stream by stop or something before i change things.

next up is to see how the MULTIROOM (multi-system) works with the phantom speakers,  i expect it to 'just work' since i can PLAY to 1 system just fine.

thanks again!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 26, 2025, 09:59:15 AM
Thank you for awesome effort! It just worked for me the first time better than ever. In fact, solved some issues where it never really quite right for my us case with Phantom speakers, with ZERO configuration changes. 

I honestly haven't done much to it, nearly all of it is the original code which is Steven's sweat and tears so far.

The primary issue was using the configuration dialog

I've just dealt with this issue on one of my other plugins so I should be able to sort this out.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Haro on January 26, 2025, 10:24:28 AM
re not doing much: HA well i get it- the original code was /is pretty complete and was a great pattern to follow to port 'the heavy lifting' was all done by the gods. thanks, Steven for creating and MAINTAINING one of the BEST APPS IN EXISTANCE.  but: Boringname, what you did is something and so kind of you to step up and make it work, even if it was just some porting and house keeping to keep it going it's so welcomed.

As i recall what was blocking my use case was something with some versioning mismatch that needed a bit of tuning up that i never quite got working on my own.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 26, 2025, 01:52:21 PM
That's what I was expecting to see, but I don't get that.
So if you select 'Living Room' as the output, does the music indeed play on that Squeezebox?
It did not yesterday, but I think I need to check again today. I'll get back to you.

Quote
Do you have LMS installed on the same PC as MusicBee, or do you have it running on a different computer (server?) in your network?
LMS and MB are both on the same PC.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 26, 2025, 02:59:12 PM
It did not yesterday, but I think I need to check again today. I'll get back to you.
@hiccup...
Good news and bad news.
When switching the MB's output to Living Room and playing an album, the artwork and metadata for the album appears on the Squeezebox. But it does not play. There's no indication in MB that the album is playing either. The VU meter shows no activity nor does the time remaining change. I still have the UPNP plugin at its default settings. At this point I don't want to change anything, but wanted you to see where I'm at and see if you can take it from here. But it looks to me like you're first issue - not seeing the Squeezebox player as an output device - needs to be resolved first.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 26, 2025, 05:41:56 PM
Good news and bad news.
Same here.
I now have my Squeezebox showing as an option in MusicBee's 'output' dropdown.
The earlier problem of not even getting that to work may have been a result of me trying out Lyrion Music Server, instead of Logitech Media Server.
To be honest, I really don't like Lyrion's 'dumbed down' interface. It is really difficult to find any advanced settings.
And it also seems to suffer from some other issues.(e.g. I was never completely sure if it was actually running)

So I installed the older, but most recent version of Logitech Media Server (8.5.2) and I got that working fine within a couple of minutes.
But when playing music to the Squeezebox, there is nothing but silence and occasional (very loud!) bursts of noise.
(I tried it with various mp3 and flac files)
I will see if I can find something in the plugin settings that may possibly improve on this.

A warning to anyone wanting to try out LMS: set the volume of your speakers/headphones to a very low level!
The noise bursts that I am experiencing with all this are very loud!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 26, 2025, 06:43:53 PM
But when playing music to the Squeezebox, there is nothing but silence and occasional (very loud!) bursts of noise.
(I tried it with various mp3 and flac files)
I will see if I can find something in the plugin settings that may possibly improve on this.
So the progress bar and countdown timer worked? They both showed progress? And you sometimes got blasted with sound. None of those happened with my testing.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 26, 2025, 07:05:04 PM
So the progress bar and countdown timer worked? They both showed progress?
Yes, but very erratic, e.g. pausing for longer durations.
I fear the issue could also be with the LMS UPnP implementation by this 'Andy Grundman' dude.
It's a 1.0 release, and may have issues that are not addressed and/or is just not maintained?

I'm about as clueless about all this as I was yesterday.
And as I was many years ago, when I was trying to get this resolved while Steven was still active with his plugin.

Ah well, luckily I have plenty other options to get some music out of my speakers. But this would have been a nice(r) option.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 26, 2025, 07:22:03 PM
Ah well, luckily I have plenty other options to get some music out of my speakers. But this would have been a nice(r) option.
I agree. I wish there was a release date with v1.0. You can email the chap to see if he's still alive. [email protected]

I'll poke around the 3rd Party Software and see if I can find anything relevant.

Like you, I don't really need this as my Squeezebox connects directly to my music collection.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 26, 2025, 07:41:02 PM
Yes, but very erratic, e.g. pausing for longer durations.


It's probably not going to work in WASAPI Exclusive mode.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 26, 2025, 07:52:26 PM
It's probably not going to work in WASAPI Exclusive mode.
I don't think there is an option to define that after you have selected the UPnP output?
Or is there?

(https://i.imgur.com/VdlrRgc.png)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 26, 2025, 07:53:36 PM
It's probably not going to work in WASAPI Exclusive mode.
I'm not using WASAPI Exclusive. And I don't think hiccup is either. The output dropdown can only select one output mode. I have chosen my Squeezebox player. I get no music from the device, although it does show the artwork that's embedded in the file. And MB isn't playing the song at all.
(https://i.imgur.com/VatQFEK.jpeg)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 26, 2025, 08:03:01 PM
Right, sorry, I haven't played around with that side of things yet, I thought it would be listed as a sound device. The UPnP spec uses the term "Device" flat out so I had that on the brain.

The source code for Andy's media interface plugin is on github so down the track I should be able to troubleshoot the musicbee side of things, I can't do anything if the issue is caused by LMS.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 26, 2025, 08:28:54 PM
Right, sorry, I haven't played around with that side of things yet
No problem. You did state initially that you really haven't gotten into things yet. While it would be nice being able to push to the LMS device, it's not critical for me. But thanks for taking this project under your wing.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 26, 2025, 08:48:08 PM
For what it's worth. The Play to a UPnP device option seems to work fine with BubbleUPnP on my android device.

I initially got "No connection could be made because the target machine actively refused it" errors but once I disabled windows firewall that issue went away so it just needs a rule for the specific port reported in the error log.

Selecting play in musicbee played that track on my phone, it even spoke out the title (verbeeliser) on the phone which I forgot I had enabled. I pressed pause on the phone and it paused musicbee so it processes commands from each end of the connection.

So that side of things works which points to more of an issue with LMS than the plugin.

Something to look into at a later date.

edit: It didn't send the verbeeliser to my phone, that actually came through my PC speakers and I didn't realise at the time, I should have because there is no way it could have been streamed.... sorry.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 26, 2025, 08:55:07 PM
I don't really need this as my Squeezebox connects directly to my music collection.
Sure, but MusicBee's interface is so much better than LMS's, and has a thousand times more options.
And for example, you can't use your auto-playlists on LMS. (you could sync static ones to LMS, but that's still some hassle)

Also, LMS will usually depend on you having setup some auto-syncing. (e.g. once a day or so)
So you can forget about some impulsive listening to new stuff that is available in your Bee.

I don't 'really need this' either.
And yet I do  ;-)

But I probably should investigate the Lyrion forum about all this stuff first.
I believe there are mixed experiences with their 1.0 UPnP plugin, and there is another guy quite active with a 'reverse' UPnP plugin.
(using LMS to stream to UPnP devices)
Let's see if I can perhaps bother them a bit ;-)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 27, 2025, 07:10:48 AM
New version 1.0.1 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

I'm trying to direct download clicks to this site rather than straight to my own storage so I've linked to the plugin page but it seems it's taking a while to refresh so if the download button doesn't link to version 1.0.1, maybe just wait a while.

Changes -
- Replaced the Listbox on the config page as it's known to cause display issues with hi DPI on windows 11.
- Changed the config page so all the buttons remain visible/usable at higher display scale settings.

I'm not happy with how it looks at 125%/150%. I need to do some more work on it but at least it should be functional now.

There is no functional changes in this version so unless you're using a display scale higher than 100% there is no point updating to it.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 28, 2025, 08:45:40 AM
New version 1.1 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Fixed the layout of the config page when Windows scaling set to greater than 100%, properly this time. At least it should be, if someone running Windows 11 could let me know.
- Fixed an issue that would prevent MusicBee controlling devices that advertised as a MediaRenderer:3 device.

After going through all the different UPnP device/service versions there is little reason to support the higher versions as they don't add any required functionality for this plugin. At least for it not to work as it currently is. Down the track it might be required to add IPv6 support which probably isn't that urgent. How many people are running pure IPv6 networks?

The backwards compatibility of the UPnP spec means it shouldn't cause any issues sticking with the lower versions as long as other devices have implemented the spec correctly.

So at this point feel free to fill the thread with any issues you are having. It will help a lot if you check the "log debug information" checkbox, make sure the log is cleared, perform whatever action you are having issues with and include the resulting debug log in your post.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: aktor on January 28, 2025, 11:43:03 AM
I would suggest that everyone for whom that plugin works to post the setup or devices that are used so there could be a database of supported devices. My interest would be which audio streamers (like WIIM mini) work with this plugin.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 28, 2025, 08:02:49 PM
I would suggest that everyone for whom that plugin works to post the setup or devices that are used so there could be a database of supported devices. My interest would be which audio streamers (like WIIM mini) work with this plugin.

I'd rather not clog up the thread, especially when the list it doesn't work on should be a lot smaller than the list it does work on. Feel free to start a separate thread to track working devices if that's what you want.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 29, 2025, 07:37:05 AM
So I installed the older, but most recent version of Logitech Media Server (8.5.2) and I got that working fine within a couple of minutes.
But when playing music to the Squeezebox, there is nothing but silence and occasional (very loud!) bursts of noise.

I had a play around with this today, that's an afternoon I will never get back.....

I first tried with setting VLC as the player which you can do connecting to the MP3 stream address listed in LMS settings. Once I started streaming in VLC it appeared as an output option in musicbee. All I got was silence and occasional loud bursts even when I wasn't playing anything. The stream would drop out randomly as well. The volume setting in LMS couldn't be changed, it was stuck on minimum.

I gave up on VLC and tried their simulated squeezebox player. Total trash.

It wouldn't stop playing like VLC but the player would just list the song name on it and nothing else, in the web UI it showed as if the track was playing.

I think the problem is LMS isn't receiving the song from Musicbee and sending it to the player like BubbleUpNP does. Instead LMS tells the squeezebox to get the song from Musicbee which it attempts to do as I see it in the log but I think it has the wrong connection info as nothing seems to happen after that. I didn't investigate it fully as I was really over it by this stage.

There ends up being multiple devices. LMS is listed as a UPnP server. Once the squeezebox is started it gets listed as a renderer and Musicbee can use it as an output device but when you try and play a song the squeezebox connects back to Musicbee with iTunes as the useragent description. This is probably whats screwing it up, musicbee is trying to stream it to LMS but the squeezebox is trying to get it at the same time screwing things up.

Disabling the firewall didn't help and the LMS server log is bloody useless.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 29, 2025, 12:06:40 PM
Got LMS working. I can't believe I wasted all friggin day because of a stupid firewall.

I disabled the private and domain firewall during testing and when I added firewall rules I only ticked the private network. Turns out if you tick public network LMS works just fine... /grrr

So just make sure Musicbee is allowed through the firewall. Private and public.
And private and public for the Lyrion server
C:\Program Files\Lyrion\Perl\perl\bin\perl.exe

It seems the start up order could cause weird things as well. I started LMS, then Softsqueeze (squeezebox emulator) then Musicbee, made sure Softsqueeze was listed as the output and everything seemed to work after that.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 29, 2025, 12:08:48 PM
I had a play around with this today, that's an afternoon I will never get back.....
Thanks for your pro-activity with this!
Some comments:

- for anyone wanting to try this out who doesn't own a Squeezebox:
   there is a software version of a Squeezebox available, named SqueezePlay
   LMS will see and treat that one similar to a physical Squeezebox device
   (repeated warning: turn your volume down for possible extremely loud digital noise bursts!)

-  I tried if I could get this to work with foobar2000
  (it also has a UPnP output plugin available)
  But that also fails to play music to my LMS/Squeezebox, immediately throwing some generic UPnP error.

So, it's off to the Lyrion forum and see what that may bring…

edit:
(I wrote and posted this before reading your latest post)
So the firewall could be an issue? I think I only have it allowing private traffic.
I'll see what happens if I allow public also. (probably tonight)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: KenDavies on January 29, 2025, 10:27:03 PM
I've just tried downloading the plug-in and Windows throw a virus warning and refuses to download it. Is there an alternative download location?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 29, 2025, 10:55:38 PM
I've just tried downloading the plug-in and Windows throw a virus warning and refuses to download it. Is there an alternative download location?

The download location isn't the issue. Windows isn't reporting it as a virus for me. But I uploaded it to Virustotal.com and 1 out of 66 reported it as a virus and that 1 was microsoft.

Trojan:Script/Wacatac.B!ml

I'll look into it.

edit: So the "!ml" part of the name means it's been detected by machine learning. What's probably happened is some jerk off has taken Steven's code as the source has been linked here for years and altered it to make a malicious program. The machine learning has now linked that code as malicious so anything made from the same code is getting flagged even if it's virus free, which explains why microsoft is the only one flagging it.

More info here in Rob's post - Link (https://answers.microsoft.com/en-us/windows/forum/all/overly-eager-heuristics-for-trojanwin32wacatacbml/6f2a72f3-3978-48ac-9fb7-fbe82c686ae3)

I'm going to wait a day or two, if it's still getting flagged I'll see if I can work something out.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: KenDavies on January 29, 2025, 10:58:50 PM

The download location isn't the issue. Windows isn't reporting it as a virus for me. But I uploaded it to Virustotal.com and 1 out of 66 reported it as a virus and that 1 was microsoft.

Trojan:Script/Wacatac.B!ml

I'll look into it.

Many thanks, it did strike me as an unlikely positive but paranoia rules.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 01:45:35 AM
So the firewall could be an issue? I think I only have it allowing private traffic.
I'll see what happens if I allow public also. (probably tonight)

It was 100% the issue for me. I was having the symptoms you described and they went away once I added them to the public firewall settings.

But I was using the emulator thing so on top of adding LMS and musicbee, you might need to do something with the Squeezebox. I assume these are separate devices on your network with their own IP?

The firewall settings on your PC should allow traffic to the Squeezebox but if you have a firewall on your router/switch you may need to open some ports on that.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 10:27:18 AM
Many thanks, it did strike me as an unlikely positive but paranoia rules.

All good now - VirusTotal (https://www.virustotal.com/gui/file/c1a0c1564a3253ea936849cb176a290a0183b0e8d412fcf8e8a67f07ab697546)

0/72 including microsoft.

edit: I initially tried it zipped up this morning and apparently microsoft has been a bit trigger happy on zipped up content over the years. That recent upload was the unzipped DLL.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: KenDavies on January 30, 2025, 12:19:09 PM

All good now - VirusTotal (https://www.virustotal.com/gui/file/c1a0c1564a3253ea936849cb176a290a0183b0e8d412fcf8e8a67f07ab697546)

0/72 including microsoft.

edit: I initially tried it zipped up this morning and apparently microsoft has been a bit trigger happy on zipped up content over the years. That recent upload was the unzipped DLL.

I've just tried again (12:20 GMT) and it's still bringing up the virus warning and refusing to download.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 12:36:22 PM
I've just tried again (12:20 GMT) and it's still bringing up the virus warning and refusing to download.

Not much I can do about that sorry. I guess it might fix itself the next time your system updates virus definitions?

I just checked for updates on my Win10 system and it downloaded an update for defender, it detected nothing even after I specifically told it to scan the file.

Guessing you are on windows 11 and microsoft is running some stupid AI bullshit with defender.

Just to confirm your browser hasn't been hijacked, when you click the download button on the plugin page does it direct you to a link on mediafire.com?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: KenDavies on January 30, 2025, 12:43:54 PM

Not much I can do about that sorry. I guess it might fix itself the next time your system updates virus definitions?

I just checked for updates on my Win10 system and it downloaded an update for defender, it detected nothing even after I specifically told it to scan the file.

Guessing you are on windows 11 and microsoft is running some stupid AI bullshit with defender.

Just to confirm your browser hasn't been hijacked, when you click the download button on the plugin page does it direct you to a link on mediafire.com?

Yep, Windows 11. I ended up downloading it on a Mac and copying it across. Working a treat and thanks for looking into it.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 12:54:26 PM
Yep, Windows 11. I ended up downloading it on a Mac and copying it across. Working a treat and thanks for looking into it.

Something funny going on there. You can't download this file because it's a virus but I'll happily let you copy it to the system via other methods?

I'm going to make another guess you are using Edge as a browser?

If defender was doing it's job properly, it would delete Edge as well.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: KenDavies on January 30, 2025, 02:00:15 PM

Something funny going on there. You can't download this file because it's a virus but I'll happily let you copy it to the system via other methods?

I'm going to make another guess you are using Edge as a browser?

If defender was doing it's job properly, it would delete Edge as well.

That explains it. I usually use Firefox but for some reason was in Edge. Firefox has just downloaded it without issue. That'll teach me...
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 02:02:55 PM
I meant to post this earlier and forgot, earlier in the thread I posted that during testing, Verbeeliser info was streamed through BubbleUPnP to my mobile and this was incorrect. It was coming through my speakers and the song played through my mobile but I just didn't realise at the time as my mobile was right next to my PC speakers. I should have known better as there is no way Verbeeliser could have done this. I've edited the original post.

Currently I can't think of a way to make this work. While I could make verbeeliser stream to a UPnP device, getting it to do that without screwing up Musicbee's streaming of the track is what I can't figure out at the moment.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 02:16:34 PM
That explains it. I usually use Firefox but for some reason was in Edge. Firefox has just downloaded it without issue. That'll teach me...

Everyone should be running a Pi-Hole. When you see the amount of crap that Edge tries to connect to you will hug the crap out of Firefox. I occasionally load it up for odd sites that firefox won't display properly that I think are safe and the amount of crap that loads up is insane, I've noticed recently it has the copilot logo.

Firefox + NoScript + uBlock Origin is hard to beat.

Since Chrome updated to Manifest V3 it can die in a fire.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 30, 2025, 04:16:55 PM
It was 100% the issue for me. I was having the symptoms you described and they went away once I added them to the public firewall settings.
But I was using the emulator thing so on top of adding LMS and musicbee, you might need to do something with the Squeezebox. I assume these are separate devices on your network with their own IP?
The firewall settings on your PC should allow traffic to the Squeezebox but if you have a firewall on your router/switch you may need to open some ports on that.
You must be on to something then, but I don't really understand. (yet)
For testing all this, I currently have LMS installed locally on the same PC as MusicBee and foobar2000.
So I would think my router and firewall settings are not that relevant at this moment. (I could be wrong)

And as Squeezebox player I am only using SqueezePlay for the moment, so that's 'local' too.

Any suggestions where I could look to possibly change some ports or firewall settings?
Or will this not work because everything is currently on the same computer, and LMS should be on a different computer/server on the network?

(I'll send you a PM with an error log, perhaps that will give you some clue about what's going on)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 04:38:42 PM
Or will this not work because everything is currently on the same computer, and LMS should be on a different computer/server on the network?

I had everything on the same computer. I didn't test Squeezeplay but I'm sure it will work the same as Softsqueeze did on my comp.

in windows - Settings-> Update & security -> Windows Security -> Firewall & Network Protection -> Allow an App through Firewall - > Change Settings -> Allow Another app -> browse

Just add Musicbee and the path to perl.exe (that lyrion is using) and make sure to tick both pirvate and public netowrks. You will need to restart Musicbee and LMS for the firewall rules to take effect.

edit: if you're using the older version of LMS that doesn't use perl.exe just make sure whatever EXE it's using is allowed in the firewall.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 30, 2025, 05:34:31 PM
edit: if you're using the older version of LMS that doesn't use perl.exe just make sure whatever EXE it's using is allowed in the firewall.
I have checked all that and have now allowed what I believe to be relevant to LMS.

But, I just had a new thought:
I'm running an LTSC version of Windows 10.
While it is the most stable install I have ever used, and it never posed any issues, I am now thinking if it perhaps has some 'multimedia/UPnP' stuff disabled or even completely absent.
That could explain why it works for you but not for me?
And the search continues…

edit:
For what it's worth:
These two locations had UPnP/media-streaming features disabled:

(https://i.imgur.com/FDI9EoX.png)

(https://i.imgur.com/pv2vAjC.png)

So I enabled both of them.
Still no luck, but it probably won't hurt coming closer to maybe get things working.

edit:
@BoringName
Since things are working for you, could you confirm if you have these settings activated or not?
Since allowing UPnP features in the OS and routers is usually considered to be some security risk, I would rather disable it if not strictly necessary.
 
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 30, 2025, 07:00:57 PM
I'm back with some weirdness to report.

Unlike hiccup, I not running LTSC, but plain old Win10 with the latest updates. And MB 3.6.9160 P.

When I last checked in with the plugin, with its default settings, MB appeared (and played) on my Internet radio. On my Squeezebox device, only the album art appeared but it did not play. Nor was the track was not playing on MB.

I just installed v1.1 and nothing on my side has changed. I checked the UPnP Device Host service and it's running. As for the Media Streaming Options, I have none. Meaning that option doesn't appear in my Network and Sharing Center options. I have rebooted the PC. No change.  I added the Squeezebox server and client to my firewall's whitelist. No change.

There's this oddity being caused by this plugin. When I install a plugin, i always drag and drop from the zip file to the proper directories. The dll was in the plugins directory as expected. I uninstalled it and used the "Add Plugin..." and (of course) no change. But I did notice that it changed the Lyrics Reloaded (1.2.6) option to show source from top to bottom. This happens when I use the "Add Plugin..." button or when I drag and drop the .dll.

It's too early in the day to start with the adult beverages, so I'm going to take a walk to the local school yard and see what's available.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 09:29:43 PM
Since things are working for you, could you confirm if you have these settings activated or not?

I don't have a media streaming setting in control panel. The UPnP service was running but none of that should be necessary as the plugin is it's own server. Just to confirm I stopped running the service and the plugin still functioned normally.

I'll test out the logitech version of the server and see if that works. It certainly provides a lot more UPnP information in the logs, half the reason I had so many problems with Lyrion is the lack of detail in the log.

On my Squeezebox device, only the album art appeared but it did not play. Nor was the track was not playing on MB.

How did you "whitelist" the items in your firewall? The track info showing up but the song not playing is exactly what was happening to me before I allowed it through the firewall because it gets the song/stream info from a HTTP response but it has to connect to a URL to access the stream. The second part is what gets blocked and Musicbee doesn't know it's blocked by the firewall which is why it doesn't show an error in the log.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 30, 2025, 09:52:11 PM
I'll test out the logitech version of the server and see if that works. It certainly provides a lot more UPnP information in the logs, half the reason I had so many problems with Lyrion is the lack of detail in the log.
Yeah, while I am sure Lyrion's LMS has many improvements over Logitech's LMS,, I couldn't find my way in it's interface, and wasn't even sure if it was running or not. Just not a good experience for me.
So that's why I returned to a slightly older but familiar Logitech release.
After I get that to work with UPnP, then I will see if I can get it to work with the Lyrion version also.

The next thing for me to try is probably to pull out the cable that connects my router to the dangerous and terrifying world out there, disable Windows's firewall completely, and see what happens.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 09:54:07 PM
Logitech Media Server 8.5.2 also uses perl. Located at
C:\Program Files\Squeezebox\Perl\perl\bin\perl.exe

This took ages to install as it had to unpack over 20, 000 files. That's a bit crazy.

Here are my steps.
Installed LMS 8.5.2
installed squeezeplayer
Added the Perl.exe to both public and private firewall settings.
Started LMS
Started squeezeplayer
Started Musicbee
Twiddled my thumbs for a few minutes because the Squeezeplayer wasn't showing in Musicbee
Installed the UPnP media service plugin in LMS
Restarted LMS
Restarted Musicbee
Set squeezeplayer as the output.
Played a song and it came through squeezeplayer just fine.

Now to uninstall all this nonsense. FYI - LMS and the squeeze players leave A LOT of crap on your system after uninstall that you have to manually remove.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 30, 2025, 10:19:06 PM
Logitech Media Server 8.5.2 also uses perl. Located at
C:\Program Files\Squeezebox\Perl\perl\bin\perl.exe
I don't have that (well, not anymore).
Probably as a result of me removing and re-installing several LMS versions, and deleting files/folders that I thought were no longer needed or could cause issues.
Also, I am using the x86 version of LMS 8.5.2 (since for now x86 versions are usually better for plugin compatibility)
So the path to PERL should probably differ from yours?
But at this moment, I can't find any traces of PERL on my system at all.

I wouldn't be surprised if I have f-ed up some stuff during all this testing.
I will see if I am able to start again with some clean slate anytime soon.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 30, 2025, 10:19:37 PM
How did you "whitelist" the items in your firewall? The track info showing up but the song not playing is exactly what was happening to me before I allowed it through the firewall because it gets the song/stream info from a HTTP response but it has to connect to a URL to access the stream. The second part is what gets blocked and Musicbee doesn't know it's blocked by the firewall which is why it doesn't show an error in the log.
I don't use the Windows firewall. I use ESET. I added a firewall rule to allow both in and out traffic to a number of Squeezebox .exe files: squeezeboxcp.exe, squeezeSVR.exe, and SqueezeSvr.exe. They are all located in C:\Program Files (x86)\Squeezebox\server. I have since removed them since they weren't doing anything for me.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 10:27:26 PM
So the path to PERL should probably differ from yours?
But at this moment, I can't find any traces of PERL on my system at all.
I would expect it to be in
C:\Program Files (x86)\Squeezebox\Perl\perl\bin\perl.exe

Push the Windows key + R
Type in Services.msc and hit enter.
Scroll down to Logitech Media Server
Right click and select properties
The "path to executable" should show you the location of Perl.exe
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 10:29:35 PM
I don't use the Windows firewall. I use ESET. I added a firewall rule to allow both in and out traffic to a number of Squeezebox .exe files: squeezeboxcp.exe, squeezeSVR.exe, and SqueezeSvr.exe. They are all located in C:\Program Files (x86)\Squeezebox\server. I have since removed them since they weren't doing anything for me.

If you are using LMS, you need to add perl.exe to the firewall. It's LMS that talks to musicbee, not the squeezebox EXE's.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 30, 2025, 10:31:22 PM
Logitech Media Server 8.5.2 also uses perl. Located at
C:\Program Files\Squeezebox\Perl\perl\bin\perl.exe
I'm on LMS 8.5.3 and there is no path to perl.exe.
Note to hiccup: The control panel launched via the systray icon and the browser GUI are the same as they've been in almost forever. I think I figured out what you're doing. You're clicking on 'web control' from the systray icon, correct? I never do that, but that brings you to the Material Skin, which until you get used to it, is quite confusing. Do this instead: in your browser, open http://[server IP:9000/default/ which will bring you to the player. In the lower right corner, click on 'settings.' I think you'll be much happier.

Quote
Now to uninstall all this nonsense. FYI - LMS and the squeeze players leave A LOT of crap on your system after uninstall that you have to manually remove.
That's why Revo Uninstaller exists. Worth every penny (shilling/pense/farthing.) After the initial uninstall, it searches for any leftovers and gives you the option to delete them also.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 30, 2025, 10:35:23 PM
If you are using LMS, you need to add perl.exe to the firewall. It's LMS that talks to musicbee, not the squeezebox EXE's.
I assume this is only needed to use MB's UPNP plugin? Because I've been running LMS for longer than I've been using MB and never had to install Perl. And if your answer is "yes" then I will no longer try to connect MB to LMS. The plugin works great with my Internet Radio device and that's more important to me. LMS and my Squeezebox Touch are getting the music files from the same place MB gets them and twice a day I automatically export my playlists to a directory that LMS sees and uses.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 30, 2025, 10:38:37 PM
Push the Windows key + R
Type in Services.msc and hit enter.
Scroll down to Logitech Media Server
Right click and select properties
The "path to executable" should show you the location of Perl.exe
Nah, it's not there.
(https://i.imgur.com/bDaB6SY.png)
Nor can I see it running looking at Task Manager > services.

But this PERL stuff is probably some red herring.
As I said, I will probably need to clean up stuff thoroughly, and then perform some clean installs before I post again about all this.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 11:06:55 PM
I assume this is only needed to use MB's UPNP plugin?

Isn't that what we are talking about?

Because I've been running LMS for longer than I've been using MB and never had to install Perl.

Perl is installed automatically when you install LMS. Both Logitech Media server 8.5.2 and the newest Lyrion Media Server both use Perl so 8.5.3 would as well. The LMS software is written in Perl (pl files) and you need Perl.exe to read them. If you look at the shortcut used to run the service it will be perl.exe followed by a path to pl file which contains the server code.

But this PERL stuff is probably some red herring.

It's not. But you guys are making me glad I don't do IT support anymore :)

Well at least not for a paycheck.

If you don't use it already, I highly recommend installing Everything (https://www.voidtools.com/en-au/)

Type Perl.exe into that and it will find the file pretty much instantly. It's a million times better than windows search.

If perl.exe doesn't exist on your system, it means LMS isn't installed anymore.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 30, 2025, 11:23:19 PM
If you don't use it already, I highly recommend installing Everything (https://www.voidtools.com/en-au/)
Type Perl.exe into that and it will find the file pretty much instantly. It's a million times better than windows search.
If perl.exe doesn't exist on your system, it means LMS isn't installed anymore.
I do have LMS 8.5.2 installed, and I am using Directory Opus as my file manager.
Trust me, no perl.exe lives on my C drive. And there is no PERL folder either.
Not saying that it shouldn't be there.
So that's why I said I should give all this another try with an as-possible clean slate.

Or I should go up the attic and dust-off my Victrola.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 11:27:43 PM
I do have LMS 8.5.2 installed, and I am using Directory Opus as my file manager.

And it's running ok?

Got me completely stuffed if that's the case. Maybe you have some other program that runs perl files and it's using that instead. I don't know....

If you just nuke it all and follow the steps I provided earlier it "should" work.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on January 30, 2025, 11:32:32 PM
And it's running ok?
Yep, working fine, listening to some radio station as we speak.
And no perl.exe or PERL folder in sight.

Quote
If you just nuke it all and follow the steps I provided earlier it "should" work.
Yeah, nuking it all will be a next step.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 11:38:05 PM
Yep, working fine, listening to some radio station as we speak.
And no perl.exe or PERL folder in sight.

Hold off on the nuking, it seems only the 64 bit version uses perl for some stupid reason. Maybe the 32bit just embeds it in the EXE.

Anyway, I've just installed it, let me test it out and I'll post what needs to be added to the firewall.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 30, 2025, 11:54:10 PM
Alright, follow all the steps I listed in this Link (https://getmusicbee.com/forum/index.php?topic=42468.msg232331#msg232331)

Including the twiddling the thumbs part before installing the UPnP Media Interface plugin, you'd think I would have remembered that by now....

Except instead of adding perl.exe to the firewall rules. Add the following file
C:\Program Files (x86)\Squeezebox\server\SqueezeSvr.exe

After restarting the service, squeezeplayer and musicbee it's all working fine for me.

edit: Also just a PSA, it's absolutely mental how many firewall rules were listed for apps I uninstalled years ago and some of them don't even display when you open the firewall settings from the Windows Security system tray icon. You have to go to control panel->windows defender firewall->advanced settings. Clearly the app uninstallers are not removing them like they should.

edit: and now I've uninstalled everything I just found an outbound port rule still in the firewall for 49382 that I entered the other day and thought I had deleted... so if you follow all the steps and it's still not working. Allow TCP outbound on port 49382 and see if that helps.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 31, 2025, 12:07:42 AM
Alright, follow all the steps I listed in this Link (https://getmusicbee.com/forum/index.php?topic=42468.msg232331#msg232331)
Including the twiddling the thumbs part before installing the UPnP Media Interface plugin, you'd think I would have remembered that by now....
Well, I'm  quite relieved that hiccup and I are not crazy and you found out why we don't have perl anywhere on our PCs.

The UPnP Media Interface plugin you referred to was installed by me when you first issued your plugin. It took about five seconds to install, but about two minutes for LMS to restart. And earlier today I added SqueezeSvr.exe to my firewall's whitelist.

Since I already have LMS (not Squeeze Player) installed, along with the LMS UPnP plugin, all I have to do is (re)add the .exe to the firewall.

I hope to get to this later tonight, or at some point tomorrow.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 31, 2025, 01:55:43 AM
I hope to get to this later tonight, or at some point tomorrow.
When adding the service to my firewall, I noticed that I already had a rule for it. I didn't notice it this afternoon. The existing rule has been applied 2,428,652 times since it was activated.

However, there's been no change in behavior. Track info and image appear on the device but MB isn't playing the file, so therefore it's not playing on the device.

And worst of all, I  can't get any sound out of MB directly now. All other media players are working and outputting audio. <sigh>

And there's still the issue when installing this plugin, Lyrics Reloaded 1.2.6 changes the show source option from top to bottom. <sigh> <sigh>
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on January 31, 2025, 02:07:48 AM
When adding the service to my firewall, I noticed that I already had a rule for it. I didn't notice it this afternoon. The existing rule has been applied 2,428,652 times since it was activated.
However, there's been no change in behavior. Track info and image appear on the device but MB isn't playing the file, so therefore it's not playing on the device.

I'm sure this is still a firewall issue. You're using a separate Squeezebox device on the network correct? ie) not the squeezeplayer software like Hiccup and I are testing on. You may need to open ports for the IP of your squeezebox device. A good test would be to just disable your firewall and see what happens. Disconnect the router from the internet if you are worried about security while testing.

And worst of all, I  can't get any sound out of MB directly now. All other media players are working and outputting audio. <sigh>

If you have squeezebox set as the output, that is what is supposed to happen. The audio should be coming out of your squeezebox, not Musicbee. If you set the output to WASAPI shared it should come out of Musicbee again.

And there's still the issue when installing this plugin, Lyrics Reloaded 1.2.6 changes the show source option from top to bottom. <sigh> <sigh>

I don't think there is anything I can do about that. There is nothing in the code to interact with other plugins. Not sure that's even possible.

edit: Also check the debug log, it might highlight a different issue.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on January 31, 2025, 02:28:48 AM
I'm sure this is still a firewall issue. You're using a separate Squeezebox device on the network correct? ie) not the squeezeplayer software like Hiccup and I are testing on. You may need to open ports for the IP of your squeezebox device. A good test would be to just disable your firewall and see what happens. Disconnect the router from the internet if you are worried about security while testing.
Yes, a separate SB device. On my ethernet LAN. I tried disabling the firewall earlier today and it didn't make any difference.

And worst of all, I  can't get any sound out of MB directly now. All other media players are working and outputting audio. <sigh>
If you have squeezebox set as the output, that is what is supposed to happen. The audio should be coming out of your squeezebox, not Musicbee. If you set the output to WASAPI shared it should come out of Musicbee again.
No. This is -after- I set the player back to WASAPI shared. And disabled the UPNP plugin for MB. And restarted MB. And then the PC. No sound output at all from MB, but okay with other players. Finally resolved it by restoring a backup from two days ago.

And there's still the issue when installing this plugin, Lyrics Reloaded 1.2.6 changes the show source option from top to bottom. <sigh> <sigh>
I don't think there is anything I can do about that. There is nothing in the code to interact with other plugins. Not sure that's even possible.
I believe you on this, but why does it only happen when I install the UPNP plugin? I guess I'll ask Mayibongwe in the Lyrics Reloaded thread.

FWIW, I'm done with this plugin. At least until someone confirms that it's working on a SB device and provides a how to.

I appreciate you taking this on and breathing new life into it, but it's just not necessary for me to connect with LMS.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: maratsos on February 03, 2025, 09:15:02 AM
Hello - I just wanted to say many thanks to BoringName for giving us UPnP 2025.

It works great on my Win 10 laptop, where I use MB to stream sound to my Wiim Amp.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 04, 2025, 06:05:25 AM
New version mb_Upnp2025_1.2 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- The profile list will properly select the new profile when clicking the add button.
- New Option - "enable remote control of musicbee via UPnP". It's a UPnP MediaRenderer service. *** Experimental ***. Don't check this unless you are actually going to use it.

The renderer doesn't work in the traditional sense. You can't stream things to Musicbee. As far as I know Musicbee can't play a stream?

But it does allow some remote control aspects via UPnP.

Using BubbleUPnP on my android phone I can browse the Musicbee library via DLNA\UPnP and set the Musicbee Renderer as the output device. When selecting to play a track with this setup, it will tell Musicbee to play that track.

What you can do when the Musicbee Renderer is set as the output in BubbleUPnP
- Play a track from the Musicbee DLNA library and Musicbee will play it.
- Basic controls will be reflected in Musicbee, Pause, play, next, seek etc.. pushing the volume buttons on the phone while Mb renderer is set as the output will adjust Musicbee's volume. Note- Next will just play the next track in the BubbleUPnP playlist, not a playlist or Now Playing list in Musicbee. The playlist is limited to 15 tracks in the free version of BubbleUPnP. But the next/previous commands are configured for other UPnP controllers to use (more below on this).

What you can't do
- Select a song on your phones internal storage and play it to the Musicbee Renderer. It will give you an error.
- Unmute. Something is broken with that at the moment with BubbleUPnP. It will allow you to mute but not unmute.
- It has no other control over Musicbee, you can't create or modify playlists or edit track info. It's purely for playing tracks.

It's experimental and a bit janky to be honest. I think most users will probably find it too clunky. There are times where you have to wait for the devices to appear. If you are having problems just close everything, start Musicbee first and then start BubbleUPnP. Everything should show up ok then.

Info for any developers wanting to use the Renderer features-

In terms of the UPnP standard, It's a proper MediaRenderer device. The only difference is it just ignores the stream info and tells Musicbee to play the track directly. Most of the other actions should work normally. It should be possible to create simple remote app that lets you send play, stop, pause, seek, next, previous, volume, mute commands to Musicbee from any device on the network. And set play modes like repeat and shuffle.

The plugin creates a hash of all tracks and keeps a list of these hashes and the track metadata including the original URL (filepath). When the MediaServer component serves tracks over DLNA, this hash is part of the URL. When the Renderer receives this URL via the SetAVTransportURI action, it strips out the hash and finds the original track URL from the previously mentioned list then tells Musicbee to play it. That's why it can't play tracks from your internal phone storage because the supplied URI will not contain the hash information.

The SetAVTransportURI action will check if the supplied CurrentURI variable is a Musicbee style URL (basically the filepath) and play it if it exists in the Musicbee library. So technically I might be able to do a workaround so songs played from a mobile devices internal storage could be played but the folder structure would have to be the same as the PC and the track would have to exist on the PC and in the Musicbee library.

SetNextAVTransportURI isn't fully implemented yet.

Controllers can subscribe to Renderer events and will receive an initial response but nothing after that. That's what I'll be working on next.

I may have missed some things, this crap is bloody complicated (for me anyway) so expect errors.

I found a devicespy app on github that I compiled. It lets you browse for UPnP devices on the network and invoke actions on UPnP services. I can supply that if anyone is interested in playing around. Its a little buggy but mostly works...

edit: Forgot to mention the Renderer port will always be one digit higher than the server port. I'll add options later to manually set it and the renderer name.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Odysseus on February 08, 2025, 08:15:17 AM
Hello and thank you for reviewing this add-on

I'm having the same problem as with the old version

The Denon player is perfectly detected and works BUT the program freezes in the playlist if I want to play another music track. Sometimes it accepts a first change of music track but blocks on the second change.

I don't have this problem with Audivarna

the Denon is correctly identified in the log

1530; 10 Profile - Generic Device, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674

I use the generic or bubbleUpnp or upnpplay profile
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 08, 2025, 10:41:01 AM
1530; 10 Profile - Generic Device, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674

Is that all that is in the error log? It's not much to go on.

Just to make sure I have this right
- Start playing in Musicbee with the Denon set as the output device.
- This plays through fine and transitions through each song if you don't touch it?
- If you right click a different song and select "play now" most of the time it will freeze Musicbee but sometimes it will let you change it once and it will freeze the second time you try?
- Does it eventually unfreeze or do you have to force close Musicbee?
- What does the Denon do when this freeze happens?

What's the Denon model?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 09, 2025, 10:10:09 AM
I've been playing around with it a bit today with different renderers and there is definitely a playback issue there. Especially when attempting to seek. I can make it crap itself fairly consistently. The only renderer I've found with an error log is BubbleUPnP but it's stupidly vague which makes troubleshooting a pain.

I'll see if I can figure it out.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: xxubiqts on February 10, 2025, 12:55:41 AM
Just wanted to say thank you for taking on this project. Works perfectly out of the box with my WiiM.
Title: Problems playing songs
Post by: Arylic67 on February 10, 2025, 10:30:41 AM
Hi, Musicbee has problems with any song. The song stops, goes back and starts again from a certain point. With Foobar downloaded from the site, everything is ok!! Is it possible that it is the plugin? same problem also with new plugin 2025. I noticed that Musicbee increases the bitrate of some songs from the original 850 to 4780 (fake)!!
Title: Re: Problems playing songs
Post by: hiccup on February 10, 2025, 11:07:28 AM
What's your deal with starting many similar topics, ignoring any answers and suggestions given by other forum members, but just starting yet another topic?
That's very bad practice and can you get banned or ignored pretty quickly.
Title: Re: Problems playing songs
Post by: phred on February 10, 2025, 01:24:22 PM
Is it possible that it is the plugin? same problem also with new plugin 2025
What version of MB are you using? (Help > About) INCLUDE THE LETTER (if any) AFTER THE NUMBER
How was MB installed? (Store, Installer, Portable)
It would be extremely helpful to anyone trying to help you if you told us what plugin you're referring to.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 11, 2025, 06:35:09 AM
New version mb_Upnp2025_1.3 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Made it more obvious in the log if the renderer doesn't support the codec you're trying to stream to it.
- Increased the number of concurrent connections that can be made which might stop some devices from locking up Musicbee.
- Added a warning to the log when the max connections has been reached.
- Improved seek handling. Note - Some formats cannot be seeked and might cause a device crash. Using BubbleUPnP as a renderer will crash BubbleUPnP if you try and seek an MP3 stream. WAV seems ok. I'll look into improving this.
Title: Re: Problems playing songs
Post by: Arylic67 on February 11, 2025, 07:00:29 AM
Hi, Musicbbe version is portable (but it also happens with installer) version 3.5.8698 P. Plugin installed is upnp version 2024 or also 2025 (new). I use Windows 10.Thanks
Title: Re: Problems playing songs
Post by: Arylic67 on February 11, 2025, 07:02:19 AM
What's your deal with starting many similar topics, ignoring any answers and suggestions given by other forum members, but just starting yet another topic?
That's very bad practice and can you get banned or ignored pretty quickly.

Excuse me, I didn't think I had opened the same topic. Yes it's true I have opened many, I'm a new user and I'm having problems.
Title: Re: Problems playing songs
Post by: BoringName on February 11, 2025, 08:25:32 AM
Take it to the UPnP plugin thread and I'll try and fix your problem. There is a new version that might have fixed it already....
https://getmusicbee.com/forum/index.php?topic=42468.75

What would help a lot is if you could enable the debug log. Perform whatever action is failing for you and copy paste the log file results into your post.

The reason the bitrate is changing is you probably haven't setup a streaming profile for your device so it's just using the generic profile and re-encoding the track.

Thanks.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: aktor on February 11, 2025, 08:59:27 AM
Just wanted to say thank you for taking on this project. Works perfectly out of the box with my WiiM.

What Wiim, mini?
Title: Re: Problems playing songs
Post by: Arylic67 on February 11, 2025, 09:48:34 AM
Hi, I saved the debug log is requested. I also have problems with the new 2025 plugin. It's too long, How can I send it as an attachment? Thanks

Title: Re: Problems playing songs
Post by: BoringName on February 11, 2025, 10:05:22 AM
Hi, I saved the debug log is requested. I also have problems with the new 2025 plugin. It's too long, How can I send it as an attachment? Thanks

As I said, can you post in the dedicated plugin thread - https://getmusicbee.com/forum/index.php?topic=42468.75

As for the log, you either need to upload it to a file server eg) mediafire, google drive etc... and provide a link or a better options would be to clear it out.  Click "view" to show the log. Push Ctrl+A to highlight everything then hit the delete key. Then close and save it. Perform the action that's not working correctly. View the log again. There shouldn't be a lot in there and you should be able to just copy paste the lot.

But do it in the dedicated plugin thread, if you post more crap in here I'm not responding.
Title: Problem playing songs
Post by: Arylic67 on February 11, 2025, 10:32:30 AM
Hi, as requested link of the log file. Thanks

https://drive.google.com/file/d/1aEG5fpjxBIcFUS5yyKVCU5tw5LZIus_0/view?usp=drive_link
Title: Re: Problems playing songs
Post by: Arylic67 on February 11, 2025, 10:32:41 AM
Ok I send the link of google drive. Please tell me if you can open it. Thanks

Hi, I saved the debug log is requested. I also have problems with the new 2025 plugin. It's too long, How can I send it as an attachment? Thanks

As I said, can you post in the dedicated plugin thread - https://getmusicbee.com/forum/index.php?topic=42468.75

As for the log, you either need to upload it to a file server eg) mediafire, google drive etc... and provide a link or a better options would be to clear it out.  Click "view" to show the log. Push Ctrl+A to highlight everything then hit the delete key. Then close and save it. Perform the action that's not working correctly. View the log again. There shouldn't be a lot in there and you should be able to just copy paste the lot.

But do it in the dedicated plugin thread, if you post more crap in here I'm not responding.
Title: Re: Problem playing songs
Post by: BoringName on February 11, 2025, 10:38:13 AM
Mate....

I said to post it in this thread not create a whole new one
https://getmusicbee.com/forum/index.php?topic=42468.75

I'll take a look at the log and reply in that thread.

edit: I Can't access the link. Just copy paste the last 50 lines of the log IN THE OTHER THREAD.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Arylic67 on February 11, 2025, 10:47:47 AM


Hi, last 50... thanks

3; 1 Initialise - 11/02/2025 10:25:03
516; 2 GetNetworkAddresses - 172.17.16.1,dns=True,name=vEthernet (Default Switch),speed=10000000000
516; 3 GetNetworkAddresses - 192.168.1.146,dns=True,name=Ethernet,speed=1000000000
517; 4 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
517; 5 GetNetworkAddresses - http://192.168.1.146:49382
652; 6 ProcessMessage 192.168.1.103 - device 'uuid:FF31F09E-D100-5E49-48BD-4ED3FF31F09E:SoundSystem_C7E6',valid=True
657; 7 Profile - Generic Device, useragent=|Linux/2.6.36+
659; 8 Profile - Generic Device, useragent=|Linux/2.6.36+
871; 9 Activate - SoundSystem_C7E6:http-get:*:audio/wav:DLNA.ORG_PN=LPCM,http-get:*:audio/x-wav:DLNA.ORG_PN=LPCM,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3X,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO,http-get:*:audio/mpeg:DLNA.ORG_PN=MP2_MPS,http-get:*:audio/mp3:*,http-get:*:audio/wma:*,http-get:*:audio/mpeg:*,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS_320,http-get:*:audio/m4a:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/aac:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/ac3:DLNA.ORG_PN=AC3,http-get:*:audio/ogg:*,http-get:*:audio/ape:*,http-get:*:audio/x-ape:*,http-get:*:audio/flac:*
7859; 10 Play - D:\MUSICA FLAC\0 - FLAC HI-RES\Dire Straits - Brothers in Arms (1985) [VINYL] {24-192 kHz, UK Vertigo VERH 25}\01 - So Far Away.flac (http://192.168.1.146:49382/encode/3BA1B2231C952B88-2147483643.wav)
9643; 11 StateTimer - Loading,old=Stopped
11056; 12 Profile - Generic Device, useragent=Lavf/58.45.100
11179; 13 Profile - Generic Device, useragent=Lavf/58.45.100
11182; 14 GetEncodedFile[1] 192.168.1.146 - GET D:\MUSICA FLAC\0 - FLAC HI-RES\Dire Straits - Brothers in Arms (1985) [VINYL] {24-192 kHz, UK Vertigo VERH 25}\01 - So Far Away.flac to 192.168.1.103; mime=audio/wav,rate=48000,channels=2
12158; 15 StateTimer - Playing,old=Loading
239928; 16 GetEncodedFile[1] - exit=0, playtime=228744
255931; 17 StateTimer - Stopped,old=Playing
256586; 18 Play - D:\MUSICA FLAC\0 - FLAC HI-RES\Dire Straits - Brothers in Arms (1985) [VINYL] {24-192 kHz, UK Vertigo VERH 25}\02 - Money For Nothing.flac (http://192.168.1.146:49382/encode/4115B5D14EF4993A-2147483636.wav)
256820; 19 Profile - Generic Device, useragent=Lavf/58.45.100
256821; 20 Profile - Generic Device, useragent=Lavf/58.45.100
256821; 21 GetEncodedFile[2] 192.168.1.146 - GET D:\MUSICA FLAC\0 - FLAC HI-RES\Dire Straits - Brothers in Arms (1985) [VINYL] {24-192 kHz, UK Vertigo VERH 25}\02 - Money For Nothing.flac to 192.168.1.103; mime=audio/wav,rate=48000,channels=2
257270; 22 StateTimer - Loading,old=Stopped
257770; 23 StateTimer - Playing,old=Loading
651291; 24 GetEncodedFile[2] - exit=0, playtime=394469
651308; 25 Profile - Generic Device, useragent=Lavf/58.45.100
651312; 26 Profile - Generic Device, useragent=Lavf/58.45.100
651315; 27 GetEncodedFile[3] - range=bytes 75550732-81084331/81084332
651315; 28 GetEncodedFile[3] 192.168.1.146 - GET D:\MUSICA FLAC\0 - FLAC HI-RES\Dire Straits - Brothers in Arms (1985) [VINYL] {24-192 kHz, UK Vertigo VERH 25}\02 - Money For Nothing.flac to 192.168.1.103; mime=audio/wav,rate=48000,channels=2
686261; 29 StateTimer - Stopped,old=Playing
686892; 30 Play - D:\MUSICA FLAC\0 - FLAC HI-RES\Dire Straits - Brothers in Arms (1985) [VINYL] {24-192 kHz, UK Vertigo VERH 25}\03 - Walk Of Life.flac (http://192.168.1.146:49382/encode/F72AF2587F95F553-2147483622.wav)
687433; 31 Profile - Generic Device, useragent=Lavf/58.45.100
687434; 32 Profile - Generic Device, useragent=Lavf/58.45.100
687434; 33 GetEncodedFile[4] 192.168.1.146 - GET D:\MUSICA FLAC\0 - FLAC HI-RES\Dire Straits - Brothers in Arms (1985) [VINYL] {24-192 kHz, UK Vertigo VERH 25}\03 - Walk Of Life.flac to 192.168.1.103; mime=audio/wav,rate=48000,channels=2
687714; 34 StateTimer - Loading,old=Stopped
688662; 35 StateTimer - Playing,old=Loading
695253; 36 GetEncodedFile[3] - exit=0, playtime=43936
924968; 37 GetEncodedFile[4] - exit=0, playtime=237534
940204; 38 StateTimer - Stopped,old=Playing
940849; 39 Play - D:\MUSICA FLAC\0 - FLAC HI-RES\Dire Straits - Brothers in Arms (1985) [VINYL] {24-192 kHz, UK Vertigo VERH 25}\04 - Your Latest Trick.flac (http://192.168.1.146:49382/encode/6DADC14C9CFAE1E7-2147483615.wav)
941123; 40 Profile - Generic Device, useragent=Lavf/58.45.100
941123; 41 Profile - Generic Device, useragent=Lavf/58.45.100
941123; 42 GetEncodedFile[5] 192.168.1.146 - GET D:\MUSICA FLAC\0 - FLAC HI-RES\Dire Straits - Brothers in Arms (1985) [VINYL] {24-192 kHz, UK Vertigo VERH 25}\04 - Your Latest Trick.flac to 192.168.1.103; mime=audio/wav,rate=48000,channels=2
941574; 43 StateTimer - Loading,old=Stopped
942069; 44 StateTimer - Playing,old=Loading
Title: Re: Problem playing songs
Post by: Arylic67 on February 11, 2025, 10:48:57 AM
I send you the entire log (44 lines). Thanks

Mate....

I said to post it in this thread not create a whole new one
https://getmusicbee.com/forum/index.php?topic=42468.75

I'll take a look at the log and reply in that thread.

edit: I Can't access the link. Just copy paste the last 50 lines of the log IN THE OTHER THREAD.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 11, 2025, 11:03:40 AM
Hi, last 50... thanks

Your device is currently using the generic  profile. We need to setup a streaming profile so the plugin knows what it can send to your device.

What device are you sending the music to? Brand and model would be good so I can look up it's capabilities. You're trying to send flac songs to it and it does support flac but the sample rate might be an issue.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 11, 2025, 11:18:04 AM
Actually it probably doesn't matter, we can adjust the settings later.

So on the config page
Click the "Add" button under the list of DLNA profiles.
In the "name" box where it says "New Profile". Change this to the name of your device.
In the box under this where it says to enter a user agent. Enter in "Linux" without the quotes.
Leave max picture size at 160
Set the output sample rate to 44100 to 192000
Untick the stereo only checkbox.
Set maximum bit depth to 24
Set output format to PCM 24 bit
Set output sample rate to "same as source".
Untick force trancoding.

Click save. Close musicbee completely and open it again.

Try and play a song again. If there are still issues paste the last 50 lines of the log in here again.

edit: Also you might want to edit that post of the log and just remove the "getnetworkaddresses"  entries at the top as I think it contains your external IP. Make sure not to include those entries if you paste the log again.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Arylic67 on February 11, 2025, 11:24:32 AM
Hi, My device is Arylic S50 Pro+
Should I make the changes you told me or should I wait for your reply? Thanks

Hi, last 50... thanks

Your device is currently using the generic  profile. We need to setup a streaming profile so the plugin knows what it can send to your device.

What device are you sending the music to? Brand and model would be good so I can look up it's capabilities. You're trying to send flac songs to it and it does support flac but the sample rate might be an issue.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 11, 2025, 11:48:24 AM
Hi, My device is Arylic S50 Pro+

Yes, put those settings in.

FYI, you're not doing the audiophile thing correctly. If you're going to fork out for Hi Res flac, you need a better device to play it through to complete the delusion.

From the website, that device can decode 24bit/192kHz but it only outputs 44.1khz/16 bit (CD quality) /the horror.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Arylic67 on February 11, 2025, 12:30:53 PM
CD quality is enough for me.... :) thanks for everything, sorry for the confusion of the posts. If anything I'll let you know....
ps: why name Linux, can I change it with another? :)

Hi, My device is Arylic S50 Pro+

Yes, put those settings in.

FYI, you're not doing the audiophile thing correctly. If you're going to fork out for Hi Res flac, you need a better device to play it through to complete the delusion.

From the website, that device can decode 24bit/192kHz but it only outputs 44.1khz/16 bit (CD quality) /the horror.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on February 11, 2025, 05:37:31 PM
Hello,
can you tell me if this works for you without checking “ouput as a continuous stream”?
If I launch a flac file directly from Musibee, can I hear it on the device and see the flac information and not pcm.
The plugin works well in other cases for flac files.
Win11Marantz ND8006 wired.
Thank you for your work.
Have a nice day!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 11, 2025, 09:30:31 PM
ps: why name Linux, can I change it with another? :)

Why would you want to change it? You can put whatever you want in the "name" field to identify what the profile is. The useragent field has to match what your device is using, at least partially.

Your devices useragent is Linux/2.6.36+

This is the identifier it uses for UPnP. It's how the plugin knows which profile to use for the device.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 11, 2025, 09:41:45 PM
Hello,

I'm probably going to sound like a prick because maybe it's a language barrier thing, but you people need to read back what you have written before you click post to make sure someone else reading it knows what you are talking about.

can you tell me if this works for you without checking “ouput as a continuous stream”?

Yes. I can send a flac file to BubbleUPnP without it being transcoded and doesn't require continuous stream to be checked.

If I launch a flac file directly from Musibee, can I hear it on the device and see the flac information and not pcm.

I don't know how well you can see or hear but I can hear it on BubbleUPnP and see the track information listed as Flac , not PCM.

The plugin works well in other cases for flac files.

What other cases?

Win11Marantz ND8006 wired.

Have you setup a profile for this device, if you read back a few posts you can see how I instructed another user how to do that. If you are not sure what the useragent is to use, just follow the instructions about posting the debug log. Make sure to remove the "GetNetworkaddresses" entries.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on February 11, 2025, 10:38:48 PM
Good evening,

I wanted to know if MusicBee and the plugin worked without BubbleUPnP.
I choose a song in MusicBee, press play and listen on my speakers through the Marantz with the name displayed as well as the type and format. (It doesn't work, all I get is noise).
If I check the “continuous stream” box, I don't have this information except for PCM, but I can hear the music.
The plugin works well when I use the remote control on my device to fetch the files from my PC's disk, I get the sound and the information.
I do have an ND8006 output for listening on the hi-fi system.

(https://s3.gifyu.com/images/b2DsF.jpg) (https://gifyu.com/image/b2DsF)

Translated with DeepL.com (free version)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 11, 2025, 11:36:23 PM
Good evening,

Untick "enable remote Control of Musicbee via UPnP". You don't need that running.
Untick "stereo only"

Click view log and look for lines similar to this -
652; 6 ProcessMessage 192.168.1.103 - device 'uuid:FF31F09E-D100-5E49-48BD-4ED3FF31F09E:SoundSystem_C7E6',valid=True
657; 7 Profile - Generic Device, useragent=|Linux/2.6.36+
659; 8 Profile - Generic Device, useragent=|Linux/2.6.36+

You need to find a line that starts will the text I have highlighted in the red (the IP address will be different).
The section highlighted in blue is what you need to find for your Marantz device. You need to enter a value in the "applies when user-agent contains" field that at least partially matches this value.

For the example above "Linux" would work. Once you have entered the correct value in the user-agent field, click save and close musicbee completely and open it again.

Also a note for everyone. Once you have your device working. Make sure you untick "log debug information" and click save.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: RRoyce on February 12, 2025, 03:20:54 PM
Same issue with Marantz PM7000n. Plays fine with continuous stream enabled, but with it unchecked all you hear is white noise. This was same behaviour with Steven's old plugin.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on February 12, 2025, 08:35:11 PM
Good evening,

Even using your method, it doesn't work.
same result as RRoyce
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 12, 2025, 09:11:06 PM
I need a copy of your debug log. Either paste it here or send me a PM if you don't want it public. Just remove the "GetNetworkAddresses" entries if you paste it here.

Or provide a download link. The file should be located at
Portable version: Musicbee\AppData\UpnpErrorLog.dat
Installed version: C:\Users\<UserName>\AppData\Roaming\Musicbee\UpnpErrorLog.dat

Thanks.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 12, 2025, 10:12:09 PM
I think I know what might be causing problems on the Marantz.

Can you set the following and test it again with continuous stream unticked.
(https://i.imgur.com/GgZYvJ7.png)



Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on February 12, 2025, 10:23:42 PM
Good evening,

I have sent you a text copy of the file
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 12, 2025, 10:54:58 PM
Good evening,

I have sent you a text copy of the file

It looks like you tried the settings I suggested above. I assume this didn't change anything?

You may have already mentioned this but if you browse the Musicbee library from the Marantz and play a track, does that work ok?

edit: This isn't the issue but for future testing, you also need to create a profile with "AvegaMediaServer" as the useragent and set it to the same values as the marantz profile.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 13, 2025, 04:18:49 AM
Can the Marantz users getting white noise try setting the output format to mp3 instead of PCM. Make sure force transcoding is ticked.

I'm flying blind here as I don't have a Marantz device to test so all I can go on is feedback I get in here.

I've read reports of some Marantz devices not handling raw PCM streams as ridiculous as that is.....
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on February 13, 2025, 07:54:14 PM
Good evening,

When I play a file from the Musicbee library from the Marantz, it works, format recognized on the player flac 48khz 24bits clipped above, PCM 48khz 16bits not tried in MP3.
With MusicBee directly and “output as a continuous stream”, it works in PCM 16bit format.
Radio streams work in MP3.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 13, 2025, 09:31:36 PM
When I play a file from the Musicbee library from the Marantz, it works, format recognized on the player flac 48khz 24bits clipped above, PCM 48khz 16bits not tried in MP3.

Well that's promising.

Can you send me a copy of the log after you have played a flac file from the marantz device.

It would also be good if you could set the output format to mp3 and try to send a track to the Marantz with that setting.

Thanks.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 14, 2025, 07:55:20 AM
With MusicBee directly and “output as a continuous stream”, it works in PCM 16bit format.

Just something of note, looking through the code.

When continuous stream is ticked, the format is set to Pcm or Wave if Pcm is not supported, 16 bit with a minimum 44100 sample rate. It's upsampled to meet the minimum. No maximum is set.

It ignores transcode output values on the config page.

Now considering I thought Wave was the container for Pcm, I need to go read up on the difference between FileCodec.Pcm and FileCodec.Wave.....
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 14, 2025, 09:39:27 AM
New version - mb_Upnp2025_1.3.1 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Remote control option disabled by default (I meant to do this originally).
- New option "Do not use Raw Pcm".

The new option is for devices that may not work correctly. It basically forces Pcm instead of Wave even if the device doesn't report that it supports Pcm.

It's very unlikely this will solve the Marantz issue from the last few pages. It's just a solution for some problem devices I found that other UPnP software developers had implemented. It was relatively quick to implement so I did it.

Keep in mind if your device doesn't work, it's highly likely the reason is because the device isn't following the UPnP standard correctly. I don't mind doing work arounds and troubleshooting devices to get them working but I'm not going to bust my balls over it, especially if a one post wonder just states "not working with X device" with no other info or follow up.

If you have a Sonos device and have issues with seeking. I can tell you now I'm never going to fix that. From what I've read it's a total shitshow from Sono's end and I have no interest doing any stupid workarounds to fix that particular problem. You can blame Sonos for that one.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on February 14, 2025, 01:48:48 PM
Hello,

The log records nothing when the file is played directly by the Marantz.

When streaming is checked, the format is set to Pcm 44.1 Khz 16 bits info on the Marantz for flac and MP3.

If I set the output to MP3, it doesn't work. I get “Unable to start playback”.

MP3 file played by MusicBee below (only noise)

0; 1 Initialise - 13/02/2025 23:34:04
21; 2 GetNetworkAddresses - 192.168.1.11,dns=True,name=Ethernet,speed=1000000000
21; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
21; 4 GetNetworkAddresses - http://192.168.1.11:49382
36; 5 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006',valid=True
41; 6 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
41; 7 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
51; 8 Activate - Marantz ND8006:
1339; 9 Profile - Marantz ND8006, useragent=Unspecified, UPnP/1.0, SoftAtHome
1438; 10 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
15387; 11 Play - E:\Musique\Chanson Française\Alain Bashung\Alain Bashung - Bleu Petrole\8 - Alain Bashung - Je Tuerai La Pianiste.mp3 (http://192.168.1.11:49382/encode/7D96CAC19D57BD13-2147483646.L24)
15528; 12 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
15554; 13 StateTimer - Loading,old=Stopped
15621; 14 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
15622; 15 GetEncodedFile[1] 192.168.1.11 - GET E:\Musique\Chanson Française\Alain Bashung\Alain Bashung - Bleu Petrole\8 - Alain Bashung - Je Tuerai La Pianiste.mp3 to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
16078; 16 StateTimer - Playing,old=Loading

Radio stream and Flac streaming file below

0; 1 Initialise - 14/02/2025 12:35:35
25; 2 GetNetworkAddresses - 192.168.1.11,dns=True,name=Ethernet,speed=1000000000
25; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
25; 4 GetNetworkAddresses - http://192.168.1.11:49382
39; 5 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006',valid=True
42; 6 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
43; 7 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
54; 8 Activate - Marantz ND8006:
1349; 9 Profile - Marantz ND8006, useragent=Unspecified, UPnP/1.0, SoftAtHome
1443; 10 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
13358; 11 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483632.wav)
13504; 12 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
13504; 13 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
13504; 14 GetEncodedFile[1] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
13505; 15 GetEncodedFile[1] - exit=0, playtime=0
13531; 16 StateTimer - Loading,old=Stopped
13559; 17 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
13559; 18 GetEncodedFile - Stream zero=/encode/continuousstream-2147483632.wav
13559; 19 httpresponse - Code 404
13560; 20 ProcessRequest:HttpException:404 - File not found
14031; 21 StateTimer - Stopped,old=Loading
47924; 22 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483615.wav)
48065; 23 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
48065; 24 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
48066; 25 GetEncodedFile[2] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
48079; 26 StateTimer - Loading,old=Stopped
48591; 27 StateTimer - Playing,old=Loading
48984; 28 GetEncodedFile[2] - exit=0, playtime=918
51137; 29 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
51138; 30 GetEncodedFile - Stream zero=/encode/continuousstream-2147483615.wav
51138; 31 httpresponse - Code 404
51138; 32 ProcessRequest:HttpException:404 - File not found
51638; 33 StateTimer - Stopped,old=Playing
64080; 34 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483598.wav)
64216; 35 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
64216; 36 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
64216; 37 GetEncodedFile[3] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
64217; 38 GetEncodedFile[3] - exit=0, playtime=1
64219; 39 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
64219; 40 GetEncodedFile - Stream zero=/encode/continuousstream-2147483598.wav
64219; 41 httpresponse - Code 404
64219; 42 ProcessRequest:HttpException:404 - File not found
64241; 43 StateTimer - Loading,old=Stopped
64756; 44 StateTimer - Stopped,old=Loading
87365; 45 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483582.wav)
87567; 46 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
87568; 47 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
87568; 48 GetEncodedFile[4] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
87608; 49 StateTimer - Loading,old=Stopped
88108; 50 StateTimer - Playing,old=Loading
88197; 51 GetEncodedFile[4] - exit=0, playtime=628
90485; 52 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
90485; 53 GetEncodedFile - Stream zero=/encode/continuousstream-2147483582.wav
90485; 54 httpresponse - Code 404
90735; 56 StateTimer - Stopped,old=Playing
137139; 57 Activate - Marantz ND8006:
142070; 58 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483542.wav)
142216; 59 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
142218; 60 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
142218; 61 GetEncodedFile[5] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
142244; 62 StateTimer - Loading,old=Stopped
142737; 63 GetEncodedFile[5] - exit=0, playtime=519
142745; 64 StateTimer - Playing,old=Loading
146080; 65 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
146080; 66 GetEncodedFile - Stream zero=/encode/continuousstream-2147483542.wav
146081; 67 httpresponse - Code 404
146264; 69 StateTimer - Stopped,old=Playing
372283; 70 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483526.wav)
372429; 71 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
372429; 72 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
372429; 73 GetEncodedFile[6] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
372459; 74 StateTimer - Loading,old=Stopped
372964; 75 StateTimer - Playing,old=Loading
373021; 76 GetEncodedFile[6] - exit=0, playtime=591
375233; 77 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
375233; 78 GetEncodedFile - Stream zero=/encode/continuousstream-2147483526.wav
375233; 79 httpresponse - Code 404
375514; 81 StateTimer - Stopped,old=Playing
383137; 82 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483509.wav)
383276; 83 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
383276; 84 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
383276; 85 GetEncodedFile[7] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
383276; 86 GetEncodedFile[7] - exit=0, playtime=0
383278; 87 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
383279; 88 GetEncodedFile - Stream zero=/encode/continuousstream-2147483509.wav
383279; 89 httpresponse - Code 404
383291; 91 StateTimer - Loading,old=Stopped
383792; 92 StateTimer - Stopped,old=Loading
388668; 93 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483492.wav)
388810; 94 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
388810; 95 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
388810; 96 GetEncodedFile[8] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
388811; 97 GetEncodedFile[8] - exit=0, playtime=0
388814; 98 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
388814; 99 GetEncodedFile - Stream zero=/encode/continuousstream-2147483492.wav
388814; 100 httpresponse - Code 404
388827; 102 StateTimer - Loading,old=Stopped
389339; 103 StateTimer - Stopped,old=Loading
393438; 104 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483475.wav)
393647; 105 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
393647; 106 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
393648; 107 GetEncodedFile[9] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
393672; 108 StateTimer - Loading,old=Stopped
394173; 109 StateTimer - Playing,old=Loading
2326315; 110 Profile - Generic Device, useragent=DAFUPnP
2326377; 111 Profile - Marantz ND8006, useragent=Microsoft-Windows/10.0 UPnP/1.0
2327554; 112 Profile - Generic Device, useragent=DAFUPnP
2327554; 113 Profile - Marantz ND8006, useragent=Microsoft-Windows/10.0 UPnP/1.0
4941712; 114 Profile - Generic Device, useragent=DAFUPnP
4941717; 115 Profile - Marantz ND8006, useragent=Microsoft-Windows/10.0 UPnP/1.0
4941983; 116 Profile - Generic Device, useragent=DAFUPnP
4941993; 117 Profile - Marantz ND8006, useragent=Microsoft-Windows/10.0 UPnP/1.0
5620320; 118 GetEncodedFile[9] - exit=10054, playtime=5226672
5620716; 119 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483465.wav)
5620944; 120 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
5620944; 121 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
5620944; 122 GetEncodedFile[10] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
5620959; 123 StateTimer - Loading,old=Paused
5621465; 124 StateTimer - Playing,old=Loading
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 14, 2025, 03:04:29 PM
The log records nothing when the file is played directly by the Marantz.

That seems odd. There should at least be a GET command recorded. It would also show responses for browsing the library.

When streaming is checked, the format is set to Pcm 44.1 Khz 16 bits info on the Marantz for flac and MP3.

I assume you mean "output as continuous stream".  Those values match what I posted previously.

If I set the output to MP3, it doesn't work. I get “Unable to start playback”.
MP3 file played by MusicBee below (only noise)

The log shows "AvegaMediaServer" is still using the generic profile. You need to setup a profile for that useragent which matches the Marantz profile. It's confusing but your Marantz device is using multiple useragents to communicate with musicbee.
One is - |LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
The other is - AvegaMediaServer/2.0 Linux/2.6

Once you set up that profile, run the test again and see what happens.

Just to give you an idea.
15622; 15 GetEncodedFile[1] 192.168.1.11 - GET E:\Musique\Chanson Française\Alain Bashung\Alain Bashung - Bleu Petrole\8 - Alain Bashung - Je Tuerai La Pianiste.mp3 to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2

From this part of the log you can see it's GET command is asking for an MP3 but the part highlighted in blue shows musicbee is converting it to L16 (PCM) , 44100. Once you configure "AvegaMediaServer" it will try and send an Mp3 instead of PCM and I will have a better idea what's going on.

Please make sure "continuous stream" is unticked for any logs you provide.

The fact the Marantz can play a file from Musicbee successfully means I should be able to get this running.

The streaming process for a device browsing the Musicbee library vs Musicbee sending a track to a device is very similar. There is just a middle man process handling the stream link.

From what I've read this is probably a content-length flag issue for the HTTP headers. The UPnP plugin for Lyrion Music Server allows for custom settings in this regard and I will probably just emulate what they have done and see how that goes.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on February 14, 2025, 06:05:46 PM
Quote
That seems odd. There should at least be a GET command recorded. It would also show responses for browsing the library.

exact

0; 1 Initialise - 14/02/2025 17:02:30
26; 2 GetNetworkAddresses - 192.168.1.11,dns=True,name=Ethernet,speed=1000000000
26; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
26; 4 GetNetworkAddresses - http://192.168.1.11:49382
43; 5 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006',valid=True
1356; 6 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1454; 7 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
11755; 8 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
11756; 9 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
11758; 10 Browse - 0,BrowseDirectChildren,0,45,sort=
11759; 11 Browse - 0,BrowseDirectChildren,0,50,sort=
13895; 12 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
13895; 13 Browse - 1,BrowseDirectChildren,0,45,sort=
13921; 14 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
13921; 15 Browse - 1,BrowseDirectChildren,0,50,sort=
15732; 16 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
15732; 17 Browse - 1_104,BrowseDirectChildren,0,45,sort=
15733; 18 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
15733; 19 Browse - 1_104,BrowseDirectChildren,0,50,sort=
15794; 20 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
15794; 21 Browse - 1_104,BrowseDirectChildren,50,50,sort=
16891; 22 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
16891; 23 Browse - 1_104,BrowseDirectChildren,26,45,sort=
16892; 24 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
16892; 25 Browse - 1_104,BrowseDirectChildren,0,50,sort=
16950; 26 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
16951; 27 Browse - 1_104,BrowseDirectChildren,50,50,sort=
17384; 28 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
17384; 29 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
17385; 31 Browse - 1_104_56,BrowseDirectChildren,0,50,sort=
17384; 30 Browse - 1_104_56,BrowseDirectChildren,0,45,sort=
18825; 32 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
18825; 33 Browse - 1_104_56_1,BrowseDirectChildren,0,45,sort=
18826; 34 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
18827; 35 Browse - 1_104_56_1,BrowseDirectChildren,0,50,sort=
21423; 36 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
21423; 37 GetFile[1] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Hauteurs\01. En Sagittaire.flac to 192.168.1.12
77047; 38 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
77047; 39 Browse - 1_104_56,BrowseDirectChildren,0,45,sort=
77063; 40 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
77063; 41 Browse - 1_104_56,BrowseDirectChildren,0,50,sort=
81014; 42 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
81014; 43 Browse - 1_104_56_5,BrowseDirectChildren,0,45,sort=
81034; 44 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
81034; 45 Browse - 1_104_56_5,BrowseDirectChildren,0,50,sort=
83806; 46 GetFile[1] - exit=10054, playtime=62382
84246; 47 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
84246; 48 GetFile[2] 192.168.1.11 - GET E:\Musique\Autres\Grave Digger\Grave Digger - Bone Collector\01 Bone Collector.flac to 192.168.1.12
532392; 52 GetFile[3] - exit=0, playtime=202839

I had several profiles, I kept Marantz and generic (I can't delete it), I added AvegaMedia with the same values as Marantz
I have only checked "enabled musicbee to play on an upnp device"
I only get noise but the song goes on

0; 1 Initialise - 14/02/2025 18:49:18
20; 2 GetNetworkAddresses - 192.168.1.11,dns=True,name=Ethernet,speed=1000000000
20; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
20; 4 GetNetworkAddresses - http://192.168.1.11:49382
35; 5 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006',valid=True
40; 6 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
42; 7 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
53; 8 Activate - Marantz ND8006:
6312; 9 Play - E:\Musique\Chanson Française\Alain Bashung\Alain Bashung - Bleu Petrole\1 - Alain Bashung - Je T'Ai Manque.mp3 (http://192.168.1.11:49382/encode/8A82C7FE69A90BEC-2147483646.L24)
8466; 10 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
8505; 11 StateTimer - Loading,old=Stopped
8558; 12 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
8559; 13 GetEncodedFile[1] 192.168.1.11 - GET E:\Musique\Chanson Française\Alain Bashung\Alain Bashung - Bleu Petrole\1 - Alain Bashung - Je T'Ai Manque.mp3 to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
9087; 14 StateTimer - Playing,old=Loading
26458; 15 GetEncodedFile[1] - exit=10054, playtime=17897
34147; 16 Play - E:\Musique\Autres\Neil Young\Neil Young - Harvest\01 - Out On The Weekend.flac (http://192.168.1.11:49382/encode/CF41DD2C59DBB22A-2147483636.L24)
34361; 17 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
34361; 18 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
34361; 19 GetEncodedFile[2] 192.168.1.11 - GET E:\Musique\Autres\Neil Young\Neil Young - Harvest\01 - Out On The Weekend.flac to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
34377; 20 StateTimer - Loading,old=Paused
34888; 21 StateTimer - Playing,old=Loading
55809; 22 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483629.L24)
55968; 23 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
55969; 24 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
55969; 25 GetEncodedFile[3] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L16;rate=96000;channels=2,rate=96000,channels=2
55982; 26 StateTimer - Loading,old=Paused
56542; 27 StateTimer - Playing,old=Loading

if I put MP3 and checked "force transcoding"
The track doesn't advance, nothing

262017; 28 SyncNewPlayState - Stopped,mb=Paused
275839; 29 Play - E:\Musique\Chanson Française\Alain Bashung\Alain Bashung - Bleu Petrole\1 - Alain Bashung - Je T'Ai Manque.mp3 (http://192.168.1.11:49382/encode/8A82C7FE69A90BEC-2147483622.L24)
276092; 30 StateTimer - Loading,old=Stopped
296273; 31 StateTimer - Stopped,old=Loading
296275; 32 Play - E:\Musique\Chanson Française\Alain Bashung\Alain Bashung - Bleu Petrole\2 - Alain Bashung - Residents de la Republique.mp3 (http://192.168.1.11:49382/encode/EC64A3B7A44B6A25-2147483620.L24)
296485; 33 StateTimer - Loading,old=Stopped
314395; 34 Play - E:\Musique\Autres\Neil Young\Neil Young - Harvest\01 - Out On The Weekend.flac (http://192.168.1.11:49382/encode/CF41DD2C59DBB22A-2147483618.L24)



Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on February 14, 2025, 08:13:33 PM
I would suggest that everyone for whom that plugin works to post the setup or devices that are used so there could be a database of supported devices. My interest would be which audio streamers (like WIIM mini) work with this plugin.
What are you suggesting/asking for exactly?
If the idea is to have a repository or some database that may benefit other users, why not create it yourself?
If you are only interested in the experiences of other users using the exact same device as you, just say so.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 14, 2025, 09:56:42 PM

I had several profiles, I kept Marantz and generic (I can't delete it), I added AvegaMedia with the same values as Marantz
I have only checked "enabled musicbee to play on an upnp device"
I only get noise but the song goes on

8466; 10 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6


The AvegaMediaServer is still using the generic profile. You need to check your spelling for the User agent field or restart Musicbee to make sure it's applied correctly.

8559; 13 GetEncodedFile[1] 192.168.1.11 - GET E:\Musique\Chanson Française\Alain Bashung\Alain Bashung - Bleu Petrole\1 - Alain Bashung - Je T'Ai Manque.mp3 to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
55969; 25 GetEncodedFile[3] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L16;rate=96000;channels=2,rate=96000,channels=2

These two are still getting transcoded to PCM,

if I put MP3 and checked "force transcoding"
The track doesn't advance, nothing

275839; 29 Play - E:\Musique\Chanson Française\Alain Bashung\Alain Bashung - Bleu Petrole\1 - Alain Bashung - Je T'Ai Manque.mp3 (http://192.168.1.11:49382/encode/8A82C7FE69A90BEC-2147483622.L24)
296275; 32 Play - E:\Musique\Chanson Française\Alain Bashung\Alain Bashung - Bleu Petrole\2 - Alain Bashung - Residents de la Republique.mp3 (http://192.168.1.11:49382/encode/EC64A3B7A44B6A25-2147483620.L24)

Again, these are getting transcoded to PCM. L24 is 24 bit PCM.

You need to fix the AvegaMediaServer profile and try again. There is a chance if you get flac to play natively it will actually work.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 20, 2025, 10:59:21 AM
New version mb_Upnp2025_1.4 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Re-orientated the settings panel and added a section for problem device settings.
- New option "content length". This adjusts what Musicbee will send in the HTTP headers for the content length. default: leave at this setting unless your device is having problems. None: the content length is never added. PCM Only: The content length header will only be added for PCM files. Fixed: The content length will always be set to Uint32.MaxValue - 8192. I have no idea why the -8192 is there, it's just what LMS use. This setting is profile specific.
- Do not use raw pcm is now profile specific. Leave this unchecked unless you have problems with your device. If you currently have this enabled you will need to re-check it for the each profile.
- Fixed an issue with the profile list that could cause an error when saving.

Force transcoding has been moved under the problem devices section but it's still a global setting for now.

No idea if any of these things will make a difference, I have no way to test them. If you have a device not working properly, all I can suggest is to go through each setting one by one and see if it improves things. Make sure to click save each time, this restarts the UPnP services. You may have to restart your device so it re-broadcasts it's available. Just closing everything and restarting between settings changes is probably a good idea.

It would be good to get some feedback on any of this, especially for Marantz devices as the only person giving any info seems to have gone AWOL.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on February 20, 2025, 06:33:28 PM
BoringName, first of all, many thanks for your efforts! MusicBee is by far the best software for Windows, and it needed this for a long time.

I've been doing hi-fi reviews for the past two years, mainly streamers - and there's not many good free solutions for Windows and UPNP.  Foobar works, but because of the continuous stream thing, you loose all metadata... and MusicBee library is so much better.

I'm currently using MusicBee on a laptop and all my library files are on a NAS. Right now I have a Eversolo streamer here, bu my regular Cambridge Audio should be back soon, which has a better UPNP protocol.

The plugin works great, the only complaint I have is gapless is not activated and you have a weird 3 seconds pause between tracks... Apparently the trick is to activate the setNextURI, link below from the Wiim forum.

https://forum.wiimhome.com/threads/gapless-mode-setnexturi-issues-for-upnp-interface.478/

If you could fix this, it would be brilliant - gapless is mandatory for a lot of genres.

Many thanks!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 20, 2025, 09:56:53 PM
I've been doing hi-fi reviews for the past two years, mainly streamers - and there's not many good free solutions for Windows and UPNP.  Foobar works, but because of the continuous stream thing, you loose all metadata... and MusicBee library is so much better.

Selecting continuous stream with this plugin also removes metadata, I don't think there is a solution for that.

The plugin works great, the only complaint I have is gapless is not activated and you have a weird 3 seconds pause between tracks... Apparently the trick is to activate the setNextURI, link below from the Wiim forum.

Does this happen with continuous stream ticked?

I don't think you can have gapless with that option unticked. That being said, the setnextURI is not currently implemented, the original code does contain some elements of it but most of it is commented out, Steven either didn't finish implementing it or decided to remove it for some reason. I'll see what I can do there, I don't think it will provide gapless playback but I expect it should reduce the delay between tracks.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on February 20, 2025, 10:14:17 PM
Good evening,

With the new plug'in, the four settings in the “content length” menu don't change anything. The song starts but all I get is noise.
Same if I select “do not use RAW PCM” or “force transcoding”.

It still works in stream (but PCM) or with the device remote control or HEOS software on smartphone.

On the other hand, I'm having problems launching MusicBee.
I don't know if this is due to the plug'in or not, as it's random.

Translated with DeepL.com (free version)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on February 20, 2025, 11:09:52 PM
I've been doing hi-fi reviews for the past two years, mainly streamers - and there's not many good free solutions for Windows and UPNP.  Foobar works, but because of the continuous stream thing, you loose all metadata... and MusicBee library is so much better.

Selecting continuous stream with this plugin also removes metadata, I don't think there is a solution for that.

The plugin works great, the only complaint I have is gapless is not activated and you have a weird 3 seconds pause between tracks... Apparently the trick is to activate the setNextURI, link below from the Wiim forum.

Does this happen with continuous stream ticked?

I don't think you can have gapless with that option unticked. That being said, the setnextURI is not currently implemented, the original code does contain some elements of it but most of it is commented out, Steven either didn't finish implementing it or decided to remove it for some reason. I'll see what I can do there, I don't think it will provide gapless playback but I expect it should reduce the delay between tracks.

For some reason, I can't get continuous stream to start playback... at least with the Eversolo, I need to try it with the Cambridge MXN10. But it should solve the gapless issue!

Too bad setnextURI can't be implemented.. Let's hope I can make the continous stream work.

Many thanks for the reply!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 20, 2025, 11:58:26 PM
With the new plug'in, the four settings in the “content length” menu don't change anything. The song starts but all I get is noise.
Same if I select “do not use RAW PCM” or “force transcoding”.

Have you properly configured the AvegaMediaServer profile yet? I'd be interested to know if you can get a flac file to play natively and whether that plays the same noise.

For some reason, I can't get continuous stream to start playback... at least with the Eversolo, I need to try it with the Cambridge MXN10. But it should solve the gapless issue!

I've just been playing around with continuous stream using BubbleUPnP and it doesn't really work. Very, very rarely it will start playing but most of the time BubbleUPnP will use ffprobe to query the stream first, close it and then try and grab the stream again, for normal track streaming the plugin just creates another stream for it to use but continuous streaming doesn't have an ID in the requested URL so the plugin doesn't know what track to use to reopen the stream. If your eversolo device does a similar thing with ffprobe (or equivalent) that will be the cause of it not playing. You will see a 404 error in the debug log if that is the case. Not sure on a solution for this just yet....

Too bad setnextURI can't be implemented.. Let's hope I can make the continous stream work.

I didn't say that. I just said the metadata issue probably can't be solved for continuous streaming. For normal streaming I should be able to work something out.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on February 21, 2025, 01:00:21 AM
Yeah, what you say about the continuous stream makes sense, I don't think it will work even with the Cambridge.. I think I already tried it before and it didn't. The one on Foobar is great, and it has solved the gapless issue for me on quite a few streamers.

Oh, I misunderstood you. There's nothing to be done about metadata and continuous streaming, it's just the nature of it,  but if there's an implementation possibility for setNextURI and gapless playback could be possible in normal playback (not continuous streaming), that would be great :)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 21, 2025, 02:55:07 AM
but if there's an implementation possibility for setNextURI and gapless playback could be possible in normal playback (not continuous streaming), that would be great :)

Yes, that's what I meant. I don't know if it will be gapless but I would imagine it should at least reduce the gap between tracks. If the device supports SetNextAVTransportURI

As for the issue with BubbleUPnP and continuous streams, the plugin isn't provided with enough info to be able to fix that. It might be device specific though, the BubbleUPnP log shows a warning for "force xiaomi support" and tries to get ffmpeg to re-encode the stream which is why it closes it and then requests it again via ffmpeg. But once it's closed it's gone and I can't get it back. I guess it thinks my phone can't play 44100 16bit pcm which is pretty nuts. There are no options to disable whatever "force xiaomi support" is.

There are options for ffmpeg encoding in BubbleUPnP but none of those options are - "disable ffmpeg encoding". It's annoying.

Tested continuous streaming to foobar and that works fine.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 21, 2025, 05:10:10 AM
So using "NextUri" seems like a no go. While the code is there, I can't find a renderer that actually supports it so I have no way of testing how it works. BubbleUPnP supports literally everything except NextUri. Foobar doesn't support NextUri. Also Lyrion Music Server doesn't support it and has notes in their upnp plugin code detailing how using NextUri is a total shitshow because of the varied methods used by devices to implement it.

So it's probably not going to happen. Going by the WiiM post you linked, the WiiM device supports it but that doesn't mean the Eversolo does (it probably doesn't) so it won't solve your issue anyway.

If you look back a few pages you will see steps to setup your device profiles correctly and link the log here. The delay might be caused by unnecessary encoding. In my testing with BubbleUPnP and Foobar I don't get a 3 second delay so it could just be your setup. Actually I do... I'll see if I can improve on that but I don't like my chances.

edit: I think I need to create a setup/troubleshooting guide I can link to.

edit2: looks like foobar has issues getting the next track when not in continuous mode, i'll see what I can find there, it could be related to your issue.

edit3: Foobar's issue is it requests the stream multiple times with different ranges, which it shouldn't be doing unless a seek is being performed, which it isn't. This results in multiple streams being opened and it's not closing them so the plugin is hitting the semaphore limit. Same issue I had with bubbleUPnP except a lot worse. It's 100% a foobar issue.

If only there was some standard (https://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.0.pdf) everyone could follow instead of implementing their own B.S....
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 21, 2025, 08:57:07 AM
edit3: Foobar's issue is it requests the stream multiple times with different ranges, which it shouldn't be doing unless a seek is being performed, which it isn't. This results in multiple streams being opened and it's not closing them so the plugin is hitting the semaphore limit. Same issue I had with bubbleUPnP except a lot worse. It's 100% a foobar issue.

After a bit of mucking around, If the profile is configured correctly so it doesn't transcode to PCM, foobar works perfectly when streaming MP3 tracks to it. So there is an issue with PCM (or how the plugin streams PCM) that makes foobar go a bit nuts.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on February 21, 2025, 10:09:53 AM
Hi!

I can guarantee you, if the receiving device has SetNextAVTransportURI activated, it will be gapless, not just reduce the gap between tracks.

The thing with UPNP is, both the software and the device need to have that protocol activated... Open Home (a variation of UPNP developed by Linn) is different, only the receiving device needs to be gapless, because the playlist is managed there, not on the sending software.

For Windows, the only device I know it's gapless is Emby - you install the Server and then use either the Windows app, or the Android app or Symfonium to manage it (Symfonium is a great remote for Android, works with a lot of servers). It's been a long time, but maybe Plex and Jelly fin are gapless too, and I believe former Logitech Media Server, now Lyrion Music Server is too (but now I see in your post it's not). One other option is MinimServer and Bubble UPNP for Android, works great too.

Without installing a server, the only other solutions I know are Aurdirvana and jRiver, which have free trials I believe.

Foobar's only properly working UPNP plugin is the continuous stream one (which works great). As you found out, the other one (which is quite old and not developed for a while) is not working glitch-free. Media Monkey is also not gapless.

As for the receiver, most these days have the protocol activated. Eversolo has, gapless works, but it behaves a little weirdly (it loops the last ack). But the Eversolo is here for test, my day to day streamer is a Cambridge Audio, and that is perfect gapless.

Using either Symfonium + Emby or MinimServer + Bubble UPNP I can guarantee you these ones are gapless:

Eversolo (with a few issues not related to actually being gapless)
Cambridge Audio
Wiim
Heos based streamers (Marantz, Denon)
Lumin based streamers (Lumin, Audiolab 9000N, Luxman)
JBL
Matrix Audio
iFi Audio Neo Stream
Volumio

I have not tried it, but know Moode Audio for Linux is gapless too.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 21, 2025, 11:29:11 AM
I can guarantee you, if the receiving device has SetNextAVTransportURI activated, it will be gapless, not just reduce the gap between tracks.

I use Emby on my NAS, I'll see if I can do something there with testing.

Really the only thing I'm not sure about with NextURI is how the next track is triggered. Without NextURI, Musicbee (via the plugin) sends a SetAVTransportURI command and tells the device to play it. When the track ends Musicbee repeats that process. If NextURI is set, does the device automatically try and "GET" play the next URI when the first track ends or does it have to be told to do it with a "next" command? Based on the LMS documentation it seems that process varies a lot depending on the device. I really just need a software based renderer that supports nextURI so I can test it, otherwise I'm flying blind.

I have found a discrepancy between the headers set for continuous streaming vs not. If someone with a Marantz device that works for continuous streaming but plays white noise with continuous streaming unchecked could test out this Version (https://www.mediafire.com/file/cbv78imna8pb3dd/mb_Upnp2025_1.4.1.zip/file), that would help me out. The desired result is continuous streaming plays the white noise issue like what usually happens with continuous streaming is unchecked. DO NOT INSTALL THIS VERSION if everything is working for you.

Also, from everything I have read, a white noise issue is directly related to a PCM stream. The continuous stream is a PCM stream so obviously the problem devices can play PCM but for whatever reason I'm trying to work out, PCM is having issues if continuous isn't checked. The point is, if you configure the profile correctly so you stream flac or MP3 directly to the device, there is a good chance you will bypass the white noise issue. Not saying you won't face some other issue but I'm fairly confident it will solve the white noise issue.

Anyway, hopefully someone can test the version above, if it results in white noise with a continuous stream then I know what the problem is..... I don't like the chances though.

edit: Just edited the post as I know it doesn't try and "GET" the next track when the other ends. The whole idea of NextURI is it caches some of the next track while the first track is playing. So the question is, does it automatically switch to playing the next track or do I need to tell it to.

edit2: And just to confirm what you have already said. It is clear that NextURI support is the requirement for true "Gapless" playback. The "continuous stream" option is obviously a workaround for devices that do not support NextURI. BubbleUPnP is supposed to support NextURI so I need to do some research there. I've enabled "gapless playback" with the local renderer but "GetMediaInfo" is still reporting "NOT_IMPLEMENTED" for NextURI.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on February 21, 2025, 12:11:58 PM
I can guarantee you, if the receiving device has SetNextAVTransportURI activated, it will be gapless, not just reduce the gap between tracks.

I use Emby on my NAS, I'll see if I can do something there with testing.

Really the only thing I'm not sure about with NextURI is how the next track is triggered. Without NextURI, Musicbee (via the plugin) sends a SetAVTransportURI command and tells the device to play it. When the track ends Musicbee repeats that process. If NextURI is set, does the device automatically try and "GET" play the next URI when the first track ends or does it have to be told to do it with a "next" command? Based on the LMS documentation it seems that process varies a lot depending on the device. I really just need a software based renderer that supports nextURI so I can test it, otherwise I'm flying blind.

I have found a discrepancy between the headers set for continuous streaming vs not. If someone with a Marantz device that works for continuous streaming but plays white noise with continuous streaming unchecked could test out this Version (https://www.mediafire.com/file/cbv78imna8pb3dd/mb_Upnp2025_1.4.1.zip/file), that would help me out. The desired result is continuous streaming plays the white noise issue like what usually happens with continuous streaming is unchecked. DO NOT INSTALL THIS VERSION if everything is working for you.

Also, from everything I have read, a white noise issue is directly related to a PCM stream. The continuous stream is a PCM stream so obviously the problem devices can play PCM but for whatever reason I'm trying to work out, PCM is having issues if continuous isn't checked. The point is, if you configure the profile correctly so you stream flac or MP3 directly to the device, there is a good chance you will bypass the white noise issue. Not saying you won't face some other issue but I'm fairly confident it will solve the white noise issue.

Anyway, hopefully someone can test the version above, if it results in white noise with a continuous stream then I know what the problem is..... I don't like the chances though.

edit: Just edited the post as I know it doesn't try and "GET" the next track when the other ends. The whole idea of NextURI is it caches some of the next track while the first track is playing. So the question is, does it automatically switch to playing the next track or do I need to tell it to.

Oh, that's great - Emby is definitely gapless with all the streamers mentioned above! I understand it's hard for you to test without a software renderer, don't you know anyone with a Wiim or a Cambridge? They have very small products, it would be very easy to lend.

I can't help you very much with the software side of things, as I don't have any code chops, just user experience. What I can tell you is when gapless is activated, the hi-fi streamer gets two tracks at a time - if you're playing a record, the server will send the first two tracks and that's the only thing you'll see on the queue - this is easy to see if, for example, you're using Emby and sending to a Cambridge MXN10 streamer. On the Emby app you'll see the whole playlist, but if you open the Cambridge app, the MXN10 only has track 1 and track 2 at the beginning of the record. When tracks 1 moves gaplessly to track 2, you'll see track 1 disappear from the queue and track 3 arrives, meaning the queue has track 2 and track 3 at this point. Then track 2 moves to track 3, track 2 disappears and you see track 3 and track 4 on the queue. And so on and so on.... This is what you have explained on your "edit" above.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 21, 2025, 12:36:25 PM
This is what you have explained on your "edit" above.

What you just described is exactly what I expected.

I think I have BubbleUPnP sorted out for NextURI so I should be able to use that for testing and get this nonsense working.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on February 21, 2025, 12:49:11 PM
Excellent! Let me know if I can help you with anything
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on February 21, 2025, 02:04:07 PM
I think I have BubbleUPnP sorted out for NextURI so I should be able to use that for testing and get this nonsense working.
How did you achieve that? I tested it after seeing your comment this morning and I'm seeing the same behaviour.

Have you looked at Upplay? It's open source, robust and provides a lot of logging which may assist you with your development. The Windows version does require a donation but it's worth it.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on February 21, 2025, 06:15:52 PM
Hello

Quote
 Have you set up the AvegaMediaServer profile correctly? I'd be interested to know if you can play a flac file natively and if it produces the same noise  

I've put the same data on the Marantz profile as on the AvegaMediaServer profile, so I don't know what more I can do.

The plug'in is recognized by the device with its remote control and when using the HEOS application with the right information (format and encoding). The server function works.

With MusicBee, streaming only in PCM and not at all without (only noise).

I'll try it with a USB cord to see if it works.

same with version 1.4.1

Translated with DeepL.com (free version)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 22, 2025, 01:42:15 AM
I've put the same data on the Marantz profile as on the AvegaMediaServer profile, so I don't know what more I can do.
Can you link the log here so I can confirm it's matching the profile correctly. If you're getting white noise I'm almost certain it's not.

same with version 1.4.1
So just to confirm, continuous streaming still works with 1.4.1?

How did you achieve that? I tested it after seeing your comment this morning and I'm seeing the same behaviour.

You need to go into the renderer settings in BubbleUPnP and enable gapless playback. But if you run a GetMediaInfo command it will return "NOT_IMPLEMENTED" for NextURI if you haven't set a NextURI yet. That's why I initially thought BubbleUPnP didn't support NextURI. But if you query the device XML it does list SetNextAVTransport as a supported command and GetMediaInfo will report the correct NextURI value once it's been set.

Upplay is a control point, I need a renderer. There is a link on their site to upmpdcli which appears to be a renderer so I'll see how that goes. its linux only.

So I can see why Steven gave up on this thing. So bloody frustrating.

I've got NextURI working with bubbleUPnP. Well kind of. Here is what happens.
SetAVTransportURI and tell it to play.
BubbleUPnP does two GET commands with ffprobe and then a third GET command with stagefright (bubbleUPnP useragent for actually playing a stream) and starts playing.
SetNextAVTransportURI
BubbleUPnP does two GET commands with ffprobe and then a third GET command with stagefright then closes the stream after less than 100 milliseconds. This all occurs while the first song is playing. So it appears to be caching in the background like it should, except for closing the stream.....

When the first song ends, it needs to GET the stream again for the NextURI because it closed it so the delay is still there /grr edit: I've just noticed it doesn't do the 2 x ffprobe when transitioning and getting the stream again so there is a small time saving there for what it's worth.

So it all seems to be working as intended except for the early stream closure and I don't know if this is some stupid quirk of BubbleUPnP or something I've done wrong.

edit: Foobar also accepts NextURI but doesn't transition to it when the song ends....and doesn't appear to attempt any caching so that makes it bloody pointless.. Actually it does seem to work as long as the stream isn't PCM. It caches the nexturl a second or two before the first song ends and transitions cleanly and quickly. PCM seems to be the root cause of a lot of issues while testing all this out.

I need to clean up some code, I had to do a lot of stupid crap to get this working and then I'll chuck out a new version so someone can test it on a WiiM and see if gapless works.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on February 22, 2025, 09:59:31 AM
I'm going to have my Cambridge Audio back today, I'll do all the testing you need.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on February 22, 2025, 10:55:31 AM
How did you achieve that? I tested it after seeing your comment this morning and I'm seeing the same behaviour.

You need to go into the renderer settings in BubbleUPnP and enable gapless playback. But if you run a GetMediaInfo command it will return "NOT_IMPLEMENTED" for NextURI if you haven't set a NextURI yet. That's why I initially thought BubbleUPnP didn't support NextURI. But if you query the device XML it does list SetNextAVTransport as a supported command and GetMediaInfo will report the correct NextURI value once it's been set.
I installed BubbleUPnP on a tablet this morning - thinking that it may have been a BubbleUPnP setting I had on my phone that was causing the problem - and everything worked with Upplay and Hi-Fi Cast, so I tried Upplay to my phone and it worked, and finally - replicating my setup from yesterday - Hi-Fi Cast to BubbleUPnP which also worked! No idea what happended yesterday but playback wasn't even gapless, and I'd restarted the apps and put them both into gapless mode. I suppose I should have tried, turning it off and on again!


I've got NextURI working with bubbleUPnP. Well kind of. Here is what happens.
SetAVTransportURI and tell it to play.
BubbleUPnP does two GET commands with ffprobe and then a third GET command with stagefright (bubbleUPnP useragent for actually playing a stream) and starts playing.
I assume that's BubbleUPnP probing to see if it needs to transcode the stream, that or retrieve tags, and it doesn't look like there's a way to disable that.


I need to clean up some code, I had to do a lot of stupid crap to get this working and then I'll chuck out a new version so someone can test it on a WiiM and see if gapless works.
I've got Sonos and WiiM renderers, both of which appear to have very good UPnP implementations so happy to test with those.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 23, 2025, 01:25:23 AM
I assume that's BubbleUPnP probing to see if it needs to transcode the stream, that or retrieve tags, and it doesn't look like there's a way to disable that.

I believe so. The main frustrating thing is you can't set it to never encode. I can't really test PCM streams because it always wants to encode on my mobile for some reason. The one good thing about BubbleUPnP is I can enable a log which helps troubleshoot problems but it's not always clear what it's doing. I may have been wrong about the delay still being there for gapless playback as I was using a workaround to get the next track to play and I think that was screwing things up. But for now I'm going avoid testing on BubbleUPnP until I have it working with Foobar as that seems to do less silly stuff, at least when streaming natively. Encoded stream of any format seem to give it grief, not sure if that's a foobar issue or maybe the way Bass encodes the streams.

I've got Sonos and WiiM renderers, both of which appear to have very good UPnP implementations so happy to test with those.

All good, it might be a week or two before I get all this sorted out, just got some surprise guests for a few days so I'm not sure how much time I will have.

I have read there is an issue with how Sonos implements Seek commands. From what I've read I probably won't fix that. I don't think seek functionality is a high priority, I doubt many users streaming to another device are going to be using seek that often. But it is helpful for testing as I can seek to the end of a track to test out track transitions instead of waiting for it to play all the way through.



Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on February 23, 2025, 07:36:14 AM
But it is helpful for testing as I can seek to the end of a track to test out track transitions instead of waiting for it to play all the way through.
You could create a test track by cutting up a song in several pieces of e.g. 5 seconds.
(using something like Audacity)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on February 23, 2025, 12:42:34 PM
But for now I'm going avoid testing on BubbleUPnP until I have it working with Foobar as that seems to do less silly stuff, at least when streaming natively. Encoded stream of any format seem to give it grief, not sure if that's a foobar issue or maybe the way Bass encodes the streams.
You could try Audiophile UPnP Renderer. The only caveat is that it doesn't work with Hi-Fi Cast in gapless mode, but does with BubbleUPnP and interestingly mconnect. It also doesn't accept mono tracks.

I have read there is an issue with how Sonos implements Seek commands. From what I've read I probably won't fix that. I don't think seek functionality is a high priority, I doubt many users streaming to another device are going to be using seek that often. But it is helpful for testing as I can seek to the end of a track to test out track transitions instead of waiting for it to play all the way through.
I haven't tried seeking, so I'll agree completely on that front :)

I use sox to create short tracks for testing transitions:
Code
sox "input.flac" "01.%2n.flac" trim 0 10 : newfile : restart
It's part of a bigger script that tags the files too, but it's written in bash so unless you have WSL installed it probably won't be of any use.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 23, 2025, 02:48:44 PM
You could try Audiophile UPnP Renderer.

I was using that for testing but it would open a bunch of streams and not close them causing the plugin to crash. I initially thought it was an audiophile issue but after more testing today with multiple renderers, it has to be a problem with the plugin or the BASS library (the bass library is what creates the streams). So far foobar, audiophile and bubbleUPnP all behave the same way when I send an encoded PCM stream. They open a bunch of streams that never get closed.

I haven't tested audiophile for this yet but foobar and bubbleUPnP also display the same behaviour with MP3 encoded streams. They just open less streams so it takes a bit longer to crash.

If I configure the plugin to send a native MP3 stream (not encoded) they all work as they should.

Going through the setup in the plugin, nothing is really standing out between the HTTP headers set for a native vs encoded stream. I'm having a hard time believing it's a BASS issue as you would think others would have reported a problem, especially when it seems so prevalent. I need to look into it more,  I'm probably just missing something....

Gapless playback using NextURI for bubbleUPnP does work correctly (with native MP3 streams).

So the main takeaway here is, make sure to setup your profiles correctly so the plugin doesn't encode the tracks. Unfortunately if you are using replaygain or dsp plugins that forces an encode...

I use sox to create short tracks for testing transitions:

I'm fairly well versed with ffmpeg. I should just create a suite of test files in multiple formats. For whatever reason it hadn't really occurred to me to do that until now...
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on February 23, 2025, 03:04:34 PM
For whatever reason it hadn't really occurred to me to do that until now...
you're welcome
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on February 24, 2025, 02:08:29 PM
If I configure the plugin to send a native MP3 stream (not encoded) they all work as they should.
If you're saying that you have gapless playback (NextURI) of native files working, I think that's a massive step forward.

I was using that for testing but it would open a bunch of streams and not close them causing the plugin to crash. I initially thought it was an audiophile issue but after more testing today with multiple renderers, it has to be a problem with the plugin or the BASS library (the bass library is what creates the streams). So far foobar, audiophile and bubbleUPnP all behave the same way when I send an encoded PCM stream. They open a bunch of streams that never get closed.
I'm well out of my depth here, but using my other server for its logging capabilities I saw AUR connect only twice to the server, once for the album artwork and once for the encoded stream.
Do you send Content-Length with the encoded stream? I've heard that can cause issues, but that's typically when sending a continuous stream.

I use sox to create short tracks for testing transitions:

I'm fairly well versed with ffmpeg. I should just create a suite of test files in multiple formats. For whatever reason it hadn't really occurred to me to do that until now...
I tried to use ffmpeg initially but I couldn't get it working; the resulting files seemed to be missing technical details (including length) so playback was inconsistent.
Code
ffmpeg -i 01.01.flac -f segment -segment_time 10 -reset_timestamps 1 output_%02d.flac
If you know the ffmpeg incantation to produce valid tracks please do let me know.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 24, 2025, 10:30:55 PM
If you're saying that you have gapless playback (NextURI) of native files working, I think that's a massive step forward.

It seems to be working in bubbleUPnP and Foobar. I still have to sort out a few things but the core functionality is working.
I'm well out of my depth here, but using my other server for its logging capabilities I saw AUR connect only twice to the server, once for the album artwork and once for the encoded stream.
Do you send Content-Length with the encoded stream? I've heard that can cause issues, but that's typically when sending a continuous stream.
We're both swimming in the deep end.... Different renderers do different things. Foobar opens 5 or 6 streams before beginning playback. No idea why. With bubbleUPnP you can see it's using ffprobe which would just be checking the details of the stream. Currently the content-length isn't always set, it depends on the file format. I've fixed some of those up and added a config setting to force it to different values. I have noticed foobar opens less streams if I set it to a fixed value for PCM streams but that's the only difference I've noticed. There is also some other metadata that isn't always set for encoded streams which I'm currently fixing up. I've noticed that's improving what BubbleUPnP displays for encoded streams, eg) the correct duration for mp3 streams but it's not doing much for foobar.

I tried to use ffmpeg initially but I couldn't get it working; the resulting files seemed to be missing technical details (including length) so playback was inconsistent.
Code
ffmpeg -i 01.01.flac -f segment -segment_time 10 -reset_timestamps 1 output_%02d.flac
If you know the ffmpeg incantation to produce valid tracks please do let me know.
From what I've read there is a problem with flac files using the -segment flag. Give this a shot
Code
ffmpeg -ss 0 -t 10 -i 01.01.flac output_.flac

This will create 1 output file that's the first 10 seconds of the source file. If you want to get the 10 second snippet from a different part of the source file, set a start time eg) to get 10 sec at the 1 minute mark, use this
Code
ffmpeg -ss 00:01:00 -t 10 -i 01.01.flac output_.flac
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on February 25, 2025, 10:50:21 AM
We're both swimming in the deep end.... Different renderers do different things. Foobar opens 5 or 6 streams before beginning playback. No idea why.
I see the same behaviour. When a file is being served only the one connection is made, but with an encoded stream I see 4. Bizarre indeed!

From what I've read there is a problem with flac files using the -segment flag. Give this a shot
Code
ffmpeg -ss 0 -t 10 -i 01.01.flac output_.flac
I hadn't even considered it could be flac related. Thanks
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 26, 2025, 03:54:48 AM
Attempting to get seeking working for encoded streams....

To do this you need to set Accept-Ranges to bytes in the HTTP headers. If it's set to none then seeking wont work. Well there is timeseeking but it seems both the renderers I'm testing on don't use that method.

This enables renderers to request a byte range of a track. So when you seek to 1:00, the renderer will close the current stream and request a new stream with a byte range beginning with the byte that corresponds to 1:00 and ending with the last byte of the track.

When you enable Accept-Ranges for Foobar. Before it even starts playing the track, it requests a byte range that returns the last few milliseconds of the track. It does this A LOT (by the dozens) with slightly varying ranges, 20ms-400ms roughly. The longer the duration of the track the more it repeats this. The foobar UPnP log has a stupid amount of information in it, 10000 lines per few seconds of playback but it doesn't show when or why it's doing these requests.

Once it gets over this absurdity, it doesn't just play the stream. It plays it via byte range requests. So it's constantly closing and reopening streams. Sometimes it seems to lose track of where it's up to and starts requesting ranges it's already played so the playback is messed up.

So while I can get seeking to work and the duration to display, it's not functional, also the method required to get this to work will not be usable for AAC and OGG codecs. A constant bitrate needs to be set and they can't do that.

BubbleUPnP doesn't do all the byte range request nonsense but I can't get it to seek. The progress bar (in bubbleUPnP) moves to the correct position so I know the request was valid but then drops to zero and playback stops. All the BubbleUPnP error log lists is an error code that means Unknown Error, super helpful!

So I'm calling it quits on that. Steven has fixed the issue that could cause the plugin to lockup with encoded streams and I did get BubbleUPnP to display the correct duration for encoded MP3 streams.

Like I said earlier, I'm not that worried about seeking but I really wanted to get Foobar to at least display the track duration. But the only way to do that is enable Accept-Ranges and that makes it go berserk. It's just going to remain messed up because I'm pretty sure whatever it's problem is, it's not something I can fix. The foobar UPnP plugin hasn't been updated since 2015 so that doesn't help.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 27, 2025, 09:22:41 AM
New version mb_Upnp2025_1.5 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Fixed an issue that caused BubbleUPnP to re-encode a continuous stream unnecessarily.
- SetNextAVtransportURI support added. This should result in gapless playback without requiring a continuous stream. This will only be available if the device advertises that it supports the SetNextAVTransportURI command.
- New option "Disable NextURI support". For devices that advertise they support SetNextAVTransportURI but either don't support it or have issues with their implementation. This setting is profile specific. The plugin currently assumes the renderer will automatically start playing the NextURI when the initial track has finished. That's how all the renderers I've tested have behaved. If your device doesn't automatically transition to the NextURI, you will need to check this option to regain normal functionality.
- The log will now state if a stream is being encoded to apply Replaygain/DSP settings.
- Fixed multiple issues that prevented the DLNA type flag to be set for native streams and encoded WAV streams.
- Fixed an issue that caused bubbleUPnP to display the wrong duration for encoded non PCM streams. The same fix didn't work for Foobar....
- Added tooltips to some items on the settings page.

Musicbee version 3.6.9189 is required for NextURI to work. Also make sure to copy over the MusicBeeBass.dll file from the latest patch file. - Link in the post below.

There is very little chance this version will fix Marantz users with the white noise issue. I have got a theory on that but it would be good if I could get confirmation on whether native streams work for these devices.

The gapless playback from NextURI support doesn't apply any fade in/transition effects. It simply means the renderer will queue up the next track ahead of time so it avoids any delay when switching tracks. I haven't got much to test with so your results may vary.... I can say it worked perfectly in foobar but that was runnning off the same machine so no network issues to worry about.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on February 27, 2025, 10:58:36 AM
Hi!

I've been trying to make it work but no luck so far, I think the reason is I don't have MusicBee 3.6.9189, my version is 3.6.9171.

I can't find a link for the 3.6.9189 version, any tips?

Thanks!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 27, 2025, 12:46:55 PM
I can't find a link for the 3.6.9189 version, any tips?

https://getmusicbee.com/patches/MusicBee36_Patched.zip

Make sure you also copy over MusicBeeBass.dll
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on February 27, 2025, 01:21:05 PM
OK, thanks!

I installed it, but it's from scratch, I'll have to edit my library again :)

As for the UPNP,  this configuration had both the old and the new plugin, I had to disable the old one and restart MusicBee to make the new one work.

With a Cambridge Audio MXN10 there's still a small gap between tracks, but much smaller than before (0..5 seconds maybe)

With an Auralic Aries S1, it plays on tracks and stops (with SetNext on or off).
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on February 27, 2025, 05:41:04 PM
I'm afraid it's a similar story with WiiM and Sonos.

I disabled all the DSP but there's still a gap between tracks.

WiIM

Displayed album art, metadata (track title, album and albumartist), track progress and track technical details.

Code
2835; 9 Profile - WiiM, useragent=|Linux/4.9.113
2836; 10 Profile - WiiM, useragent=|Linux/4.9.113
2857; 11 Activate - WiiM Pro-60F6:http-get:*:audio/wav:DLNA.ORG_PN=LPCM,http-get:*:audio/x-wav:DLNA.ORG_PN=LPCM,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3X,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO,http-get:*:audio/mpeg:DLNA.ORG_PN=MP2_MPS,http-get:*:audio/mp3:*,http-get:*:audio/wma:*,http-get:*:audio/mpeg:*,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS_320,http-get:*:audio/m4a:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/aac:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/ac3:DLNA.ORG_PN=AC3,http-get:*:audio/ogg:*,http-get:*:audio/ape:*,http-get:*:audio/x-ape:*,http-get:*:audio/flac:*
9699; 12 Play - D:\MusicBee Test\music\Stanton Warriors\2001 - The Stanton Session\01.01.flac (http://192.168.0.12:49382/files/C50AB82914AE234Dp.flac)
9987; 13 Profile - Generic Device, useragent=Lavf/58.45.100
9997; 14 GetFile[1] 192.168.0.12 - GET D:\MusicBee Test\music\Stanton Warriors\2001 - The Stanton Session\01.01.flac to 192.168.0.137
9998; 15 Profile - Generic Device, useragent=Lavf/58.45.100
10335; 16 GetFile[1] - exit=0, playtime=336
10349; 17 StateTimer - Playing,old=Stopped
10368; 18 SetNextAVTransportURI - Success - http://192.168.0.12:49382/files/0C2D7A04A970C9EEp.flac
31551; 19 Profile - Generic Device, useragent=Lavf/58.45.100
31557; 20 GetFile[2] 192.168.0.12 - GET D:\MusicBee Test\music\Stanton Warriors\2001 - The Stanton Session\01.02.flac to 192.168.0.137
31557; 21 Profile - Generic Device, useragent=Lavf/58.45.100
34473; 22 GetFile[2] - exit=0, playtime=2914
66856; 23 Seek - goto=0
66864; 24 Seek - pos=0
66899; 25 SetNextAVTransportURI - Success - http://192.168.0.12:49382/files/C0A8B86B104C228Fp.flac

Sonos

No album art, only track title and no track progress or technical details

Code
2321; 8 ProcessMessage 192.168.0.100 - device 'uuid:RINCON_000E58C5095001400_MR:192.168.0.100 - Sonos Play:1 - RINCON_000E58C5095001400',valid=True
2324; 9 Profile - Sonos, useragent=|Linux UPnP/1.0 Sonos/83.1-61240 (ZPS1)
2325; 10 Profile - Sonos, useragent=|Linux UPnP/1.0 Sonos/83.1-61240 (ZPS1)
2352; 11 Activate - 192.168.0.100 - Sonos Play:1 - RINCON_000E58C5095001400:http-get:*:audio/mp3:*,x-file-cifs:*:audio/mp3:*,http-get:*:audio/mp4:*,x-file-cifs:*:audio/mp4:*,http-get:*:audio/x-m4a:*,x-file-cifs:*:audio/x-m4a:*,http-get:*:audio/mpeg:*,x-file-cifs:*:audio/mpeg:*,http-get:*:audio/mpegurl:*,x-file-cifs:*:audio/mpegurl:*,file:*:audio/mpegurl:*,http-get:*:audio/x-mpegurl:*,x-file-cifs:*:audio/x-mpegurl:*,http-get:*:application/x-mpegurl:*,x-file-cifs:*:application/x-mpegurl:*,http-get:*:application/vnd.apple.mpegurl:*,x-file-cifs:*:application/vnd.apple.mpegurl:*,http-get:*:application/dash+xml:*,x-file-cifs:*:application/dash+xml:*,http-get:*:audio/mpeg3:*,x-file-cifs:*:audio/mpeg3:*,http-get:*:audio/wav:*,x-file-cifs:*:audio/wav:*,http-get:*:audio/x-wav:*,x-file-cifs:*:audio/x-wav:*,http-get:*:audio/wma:*,x-file-cifs:*:audio/wma:*,http-get:*:audio/x-ms-wma:*,x-file-cifs:*:audio/x-ms-wma:*,http-get:*:audio/aiff:*,x-file-cifs:*:audio/aiff:*,http-get:*:audio/x-aiff:*,x-file-cifs:*:audio/x-aiff:*,http-get:*:audio/flac:*,x-file-cifs:*:audio/flac:*,http-get:*:application/ogg:*,x-file-cifs:*:application/ogg:*,http-get:*:audio/ogg:*,x-file-cifs:*:audio/ogg:*,sonos.com-mms:*:audio/x-ms-wma:*,sonos.com-http:*:audio/mp3:*,sonos.com-http:*:audio/mpeg:*,sonos.com-http:*:audio/mpeg3:*,sonos.com-http:*:audio/wma:*,sonos.com-http:*:audio/mp4:*,sonos.com-http:*:audio/x-m4a:*,sonos.com-http:*:audio/wav:*,sonos.com-http:*:audio/aiff:*,sonos.com-http:*:audio/flac:*,sonos.com-http:*:application/ogg:*,sonos.com-http:*:application/x-mpegURL:*,sonos.com-http:*:application/dash+xml:*,sonos.com-spotify:*:audio/x-spotify:*,sonos.com-rtrecent:*:audio/x-sonos-recent:*,x-rincon:*:*:*,x-rincon-mp3radio:*:*:*,x-rincon-playlist:*:*:*,x-rincon-queue:*:*:*,x-rincon-stream:*:*:*,x-sonosapi-stream:*:*:*,x-sonosapi-hls:*:*:*,x-sonosapi-hls-static:*:*:*,x-sonosapi-radio:*:audio/x-sonosapi-radio:*,x-rincon-cpcontainer:*:*:*,
4658; 12 Play - D:\MusicBee Test\music\Stanton Warriors\2001 - The Stanton Session\01.01.flac (http://192.168.0.12:49382/files/C50AB82914AE234Dp.flac)
4777; 13 Profile - Sonos, useragent=Linux UPnP/1.0 Sonos/83.1-61240 (ZPS1)
4787; 14 GetFile[1] 192.168.0.12 - GET D:\MusicBee Test\music\Stanton Warriors\2001 - The Stanton Session\01.01.flac to 192.168.0.100
4788; 15 Profile - Sonos, useragent=Linux UPnP/1.0 Sonos/83.1-61240 (ZPS1)
5279; 16 StateTimer - Playing,old=Stopped
5893; 17 SetNextAVTransportURI - Success - http://192.168.0.12:49382/files/0C2D7A04A970C9EEp.flac
8167; 18 GetFile[1] - exit=0, playtime=3376
48529; 19 Profile - Sonos, useragent=Linux UPnP/1.0 Sonos/83.1-61240 (ZPS1)
48535; 20 GetFile[2] 192.168.0.12 - GET D:\MusicBee Test\music\Stanton Warriors\2001 - The Stanton Session\01.02.flac to 192.168.0.100
48536; 21 Profile - Sonos, useragent=Linux UPnP/1.0 Sonos/83.1-61240 (ZPS1)
60440; 22 Seek - goto=0
60546; 23 Seek - pos=0
60559; 24 GetFile[2] - exit=10054, playtime=12023
60600; 25 Profile - Sonos, useragent=Linux UPnP/1.0 Sonos/83.1-61240 (ZPS1)
60600; 26 GetFile[3] 192.168.0.12 - GET D:\MusicBee Test\music\Stanton Warriors\2001 - The Stanton Session\01.02.flac to 192.168.0.100
60601; 27 Profile - Sonos, useragent=Linux UPnP/1.0 Sonos/83.1-61240 (ZPS1)
60716; 28 GetFile[3] - exit=10054, playtime=114
60720; 29 Profile - Sonos, useragent=Linux UPnP/1.0 Sonos/83.1-61240 (ZPS1)
60722; 30 GetFile[4] 192.168.0.12 - GET D:\MusicBee Test\music\Stanton Warriors\2001 - The Stanton Session\01.02.flac to 192.168.0.100
60724; 31 GetFile - range=bytes 9043968-34723562/34723563
60724; 32 Profile - Sonos, useragent=Linux UPnP/1.0 Sonos/83.1-61240 (ZPS1)
62121; 33 SetNextAVTransportURI - Success - http://192.168.0.12:49382/files/C0A8B86B104C228Fp.flac
64904; 34 GetFile[4] - exit=10054, playtime=4179
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on February 27, 2025, 06:04:18 PM
Hello

Quote
 There is very little chance this version will fix Marantz users with the white noise issue. I have got a theory on that but it would be good if I could get confirmation on whether native streams work for these devices.

yes, native streaming works with version 1.5
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 27, 2025, 09:46:44 PM
I installed it, but it's from scratch, I'll have to edit my library again :)

All you had to do was copy the files over the top of your existing files.

As for the UPNP,  this configuration had both the old and the new plugin, I had to disable the old one and restart MusicBee to make the new one work.
I've mentioned that previously. Although I'm not sure how you got the old one if you did an install from scratch.

With a Cambridge Audio MXN10 there's still a small gap between tracks, but much smaller than before (0..5 seconds maybe)
With an Auralic Aries S1, it plays on tracks and stops (with SetNext on or off).

I'll need log files to see what's going on there. Either PM me a link or post them here, just make sure to remove the networkaddress entries.

I'm afraid it's a similar story with WiiM and Sonos.

Disappointing. I assume the gap is smaller than previously? The log looks like it's functioning correctly. I'm not sure there is anything else I can do there.

I'll look up sonos and see if there is anything different I need to worry about. Apart from the seek issue I have mentioned previously.


yes, native streaming works with version 1.5

You have my hopes up there but I think there might be some terminology confusion.

When I say "native stream". I mean a track that is streamed without being encoded. I don't mean a continuous stream which is what I expect you are referring to.

So far all the logs you have provided show your streams are encoded because the correct profile was not getting applied.

It might be easier if I ask - do you still have the white noise issue with 1.5?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on February 28, 2025, 02:49:00 AM
I don't think I'm going to bother too much with trying to get Sonos working. With everything I've read they seem to be moving away from the UPnP standard and anyone reporting bugs around DLNA/UPnP is getting met with silence. If you're not using their software and/or a streaming service like spotify, you're probably out of luck.

This text in the Lyrion Music Server source code is probably telling - "Sonos is a pile of crap".

If it was having issues displaying information from an encoded stream, I would have a play around but everything I've tested plays and displays info for native streams without issue. I don't really want to be messing around with that code in case it breaks things for other users.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on February 28, 2025, 08:47:02 AM
@BoringName,

Were you able to play gaplessly to foobar2000 and BubbleUPnP? Whilst the gap is small it's definitely there.

Is there any way I can validate my setup?

MusicBee.exe (3.6.9189)   51bbc079516c76b123a3c92a50858259fff4fd02
MusicBeeBass.dll                eaa52cc90d2aaaad3646bded888e96693a4ce43f
mb_Upnp2025.dll                 971729bc53ecc1b053a8af867ed582545416d18f
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 01, 2025, 12:32:21 AM
@BoringName,

Were you able to play gaplessly to foobar2000 and BubbleUPnP? Whilst the gap is small it's definitely there.


Foobar - Yes, it's a seamless transition between songs. But foobar is running off the same machine as Musicbee.

BubbleUPnP had a small delay but I just changed the setup and I think there might be a very tiny delay but it was around half a second previously.
I changed the useragent to "bubbleUPnP|stagefright|ffprobe" (note the pipe symbol between names) so that all the different ways it connects were using the same profile. This seemed to have improved things although it could be confirmation bias.... BubbleUPnP is running on my mobile phone which is connected to the wifi network.

For your WiiM try changing the useragent to - Linux|Lavf

I have a second machine here, I'll load up foobar on it and see how the track transitions are over the network. I think the fact it's instant on the same machine means the process is probably setup correctly, it's just network variables might cause a delay when it's not on the same machine. Also different devices may implement a different process.

I can confirm those Hashes are correct.

edit: Tested foobar over the network and it's gapless. So I think I've set it up correctly. Any delays will either be issues with the profile, device or network setup. You should also make sure your Antivirus and/or firewall programs are not interfering in any way.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 01, 2025, 02:19:19 AM
I've just noticed clicking the next track button on the player controls seems to mess things up.

With NextURI disabled - It will change to the next song but the progress bar will get jittery instead of moving smoothly. Once the next song ends it transitions to the next track and the progress bar moves normally again.
With NextURI enabled -  This does the same as above except when the next song ends it doesn't always transition to the next song, foobar does but Musicbee doesn't and starts playing the same track again from the start, the progress bar remains jittery.

I'll look into it.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 01, 2025, 11:48:38 AM
Hi!

Sorry, I've been very busy with my Auralic test. I'll send you the log file via PM but ) could find anything there.

I also don't think the Auralic is a good test for this, it's more OpenHome based and that can be prone to erros. I can confirm with the MXN10, there's still that really small glitch between tracks.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 01, 2025, 05:26:20 PM
Upplay is a control point, I need a renderer. There is a link on their site to upmpdcli which appears to be a renderer so I'll see how that goes. its linux only.
Did you get Upmpdcli to work with your plugin?
Among my family we've got 5 raspberry pis (from 1 to 3B) with hifiberry dacs running Upmpdcli (https://www.lesbonscomptes.com/upmpdcli/) (for single target casting) + Snapcast (https://github.com/badaix/snapcast) (for synchronous multi-room casting) as headless upnp targets for Symfonium (https://symfonium.app/).
I wrote an ansible playbook (https://github.com/AverageHoarder/castpi2go) to deploy and maintain all of these with ease if you want to check out (or recreate) my setup.

It would be neat if we could also play on all of these from MusicBee instead of Symfonium but so far I had no success with your plugin:
Code
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>501</errorCode>
<errorDescription>Action Failed</errorDescription>
</UPnPError>
</detail>
</s:Fault>
I'll gladly send you logs if that would help.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 02, 2025, 02:44:07 AM
Sorry, I've been very busy with my Auralic test. I'll send you the log file via PM but ) could find anything there.

I need the plugin log file not the musicbee log file. It should be located in Musicbee\AppData\UpnpErrorLog.dat
Of if you run the installed version, something like
C:\Users\<username>\AppData\Roaming\MusicBee\UpnpErrorLog.dat

But the musicbee error log does show some problems with your install.
20/02 it was reporting no sound card detected.
27/02 shows you're trying to play files from a NAS but it errors because Interop.PortableDeviceApiLib is missing. Have you setup your NAS in musicbee as a portable device?
27/02 could not load the bass.dll because it looks like your trying to run musicbee from the unzipped patch folder?
27/02 could not load "MusicBeeIpod"

I don't know what you are doing but I don't think your issues are related to this plugin. You need to make sure you have installed Musicbee correctly.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 02, 2025, 02:56:03 AM
Did you get Upmpdcli to work with your plugin?

No. I don't have linux machine. I could setup in an instance in windows I suppose but the last time I did that caused nothing but problems. I have a raspberry pi but it's performing some important functions and I don't want to mess with it.
Among my family we've got 5 raspberry pis (from 1 to 3B)

Just be aware this plugin will only play to one device at a time. I have no plans to make it stream to multiple devices at the same time.

I'll gladly send you logs if that would help.
I've listed in the previous post which file I need to check the logs. 501 means the server does not support the functionality required.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 02, 2025, 10:00:36 AM
Just be aware this plugin will only play to one device at a time. I have no plans to make it stream to multiple devices at the same time.
No worries. That's all handled on the side of the upnp renderer via Snapserver and Snapclient. You cast to a Snapserver instance and that coordinates the synchronous playback of any Snapclients that have it configured as the server. You can even run server and client on the same pi so you don't "lose" a playback device.

I have 3 upnp targets for my living room + bedroom.
pi 3B in living room with upmpdcli + snapclient
pi zero 2 W in bedroom with upmpdcli + snapclient
proxmox lxc debian container with upmpdcli + snapserver

If I cast to one of the pi targets, it plays directly via upmpdcli (without transcoding).
If I cast to the proxmox lxc debian container, both pis play the same in sync (with transcoding to retain the sync).
It's an elegant solution with synchronous gapless multi-room audio and completely FOSS. It's also cheap, as you can get a pi zero 2 W + Hifiberry DAC, power supply, micro sd card and case for 50-70€.
Another benefit is that since these are all plain upnp targets, anyone in the same network can cast to any of them with any software that supports upnp. Not like that plexamp garbage.

I've sent you the logs per direct message.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 02, 2025, 10:08:39 AM
Sorry, I've been very busy with my Auralic test. I'll send you the log file via PM but ) could find anything there.

I need the plugin log file not the musicbee log file. It should be located in Musicbee\AppData\UpnpErrorLog.dat
Of if you run the installed version, something like
C:\Users\<username>\AppData\Roaming\MusicBee\UpnpErrorLog.dat

But the musicbee error log does show some problems with your install.
20/02 it was reporting no sound card detected.
27/02 shows you're trying to play files from a NAS but it errors because Interop.PortableDeviceApiLib is missing. Have you setup your NAS in musicbee as a portable device?
27/02 could not load the bass.dll because it looks like your trying to run musicbee from the unzipped patch folder?
27/02 could not load "MusicBeeIpod"

I don't know what you are doing but I don't think your issues are related to this plugin. You need to make sure you have installed Musicbee correctly.

OK, I sent you the right log file this time.

Yeah, since I copied those files, something went wrong with MusicBee - I need a fresh install!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 02, 2025, 10:45:14 AM
I have a second machine here, I'll load up foobar on it and see how the track transitions are over the network. I think the fact it's instant on the same machine means the process is probably setup correctly, it's just network variables might cause a delay when it's not on the same machine. Also different devices may implement a different process.

edit: Tested foobar over the network and it's gapless. So I think I've set it up correctly. Any delays will either be issues with the profile, device or network setup. You should also make sure your Antivirus and/or firewall programs are not interfering in any way.
It's definitely not network related as I don't see this problem with any other control point, and that's with playing tracks down to 3 seconds in length using the same PC as source.

I tried to use other control points with MusicBee as a source, but BubbleUPnP, Hi-Fi Cast and mconnect all threw invalid mime-type errors when trying to cast to the WiiM. The only thing I can see from the DIDL is that MusicBee uses a .x-flac extension for flac files, which is strange, although shouldn't cause it to fail. Is there any way to test that, as I don't think I have a server that will index .x-flac files.

When using upplay it worked (no idea how), but playback always started with the previously played track no matter what I did, so that avenue was a dead end too.

I will test the updates, but because nothing works reliably I'm struggling to come up with a plan to assist.

EDIT: I converted the flac files to WAV and now BubbleUPnP, Hi-Fi Cast and mconnect all play gaplessly to the WiiM, so I assume it is the .x-flac extension. The conversion didn't help the MusicBee control point though.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 02, 2025, 09:55:40 PM
I tried to use other control points with MusicBee as a source, but BubbleUPnP, Hi-Fi Cast and mconnect all threw invalid mime-type errors when trying to cast to the WiiM. The only thing I can see from the DIDL is that MusicBee uses a .x-flac extension for flac files, which is strange, although shouldn't cause it to fail. Is there any way to test that, as I don't think I have a server that will index .x-flac files.

x-flac is the mime type. It would only be using that if your device advertises that it supports that mime type.

Could the problem be related to this post you made regarding a extra dots in the filename a couple of years ago? minimserver forum (https://forum.minimserver.com/showthread.php?tid=6645)

I haven't gone through the logs others have PM'd me, I'll get to that later today.

edit: I can see how the x-flac is being added as an extension. A lot of the mimetypes are listed as audio/aac, audio/x-aac and it just returns the first one that matches a supported mimetype for the codec being used. For flac, the audio/x-flac is listed first so that's what it uses if the device supports it. A lot of the other codecs have the x- version listed second. I could switch those around so it's more likely to use .flac instead of .x-flac but not sure it will really change anything.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 02, 2025, 10:17:59 PM
I tried to use other control points with MusicBee as a source, but BubbleUPnP, Hi-Fi Cast and mconnect all threw invalid mime-type errors when trying to cast to the WiiM. The only thing I can see from the DIDL is that MusicBee uses a .x-flac extension for flac files, which is strange, although shouldn't cause it to fail. Is there any way to test that, as I don't think I have a server that will index .x-flac files.

x-flac is the mime type. It would only be using that if your device advertises that it supports that mime type.

With MusicBee in server mode (used with a third party control point) an x-flac file extension is served:
Code
<res protocolInfo="http-get:*:audio/x-flac:DLNA.ORG_OP=11;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000" size="4283689" duration="0:00:55" bitrate="77750" sampleFrequency="44100" nrAudioChannels="2">http://192.168.0.12:49382/files/C50AB82914AE234D.x-flac</res>
I know it shouldn't matter as WiiM should be looking at the mime type, but it seems a strange decision, especially knowing how fragile most UPnP implementations are.
I seem to remember that Logitech Media Server used .flc which WiiM had to address  - clearly just by adding it to the list of accepted extensions!


Could the problem be related to this post you made regarding a extra dots in the filename a couple of years ago? minimserver forum (https://forum.minimserver.com/showthread.php?tid=6645)
In the early days the UPnP implementation was riddled with bugs but it's been pretty stable for a while now.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 02, 2025, 10:19:15 PM
edit: I can see how the x-flac is being added as an extension. A lot of the mimetypes are listed as audio/aac, audio/x-aac and it just returns the first one that matches a supported mimetype for the codec being used. For flac, the audio/x-flac is listed first so that's what it uses if the device supports it. A lot of the other codecs have the x- version listed second. I could switch those around so it's more likely to use .flac instead of .x-flac but not sure it will really change anything.
I'm sure that will fix the WiiM issue, at least when being used from third party control points.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 02, 2025, 10:26:40 PM
OK, I sent you the right log file this time.

Yeah, since I copied those files, something went wrong with MusicBee - I need a fresh install!

You're killing me. Your log is a mess, it looks like you have 3 different devices all creating log entries. None of them are matching to a profile. View the log, hit control+A so it highlights everything and hit the delete key to clear it out and click save.

Remove the other UPnP devices from the network, turn them off or whatever and just use the device you are having issues with.

And remind me what the problem is again?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 02, 2025, 10:46:49 PM
OK, I sent you the right log file this time.

Yeah, since I copied those files, something went wrong with MusicBee - I need a fresh install!

You're killing me. Your log is a mess, it looks like you have 3 different devices all creating log entries. None of them are matching to a profile. View the log, hit control+A so it highlights everything and hit the delete key to clear it out and click save.

Remove the other UPnP devices from the network, turn them off or whatever and just use the device you are having issues with.

And remind me what the problem is again?

Sorry, I didn't mean to give you any trouble - as I said, I'm not code savy, I just sent the file you asked. it's big because I've done several experiments with two different streamers.

The new log is much shorter, done playing two songs trough a Cambridge Audio MXN10. My problem is it's not gapless, there's a half-a-second glitch between the two tracks.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 02, 2025, 10:56:44 PM
I've sent you the logs per direct message.

That sounds like a cool setup. I'm just going to post replies in here as it's easier for me to keep track of everything plus I think it might help others troubleshoot their own problems in future.

So the 501 error was a red herring, it's trying to send a pause command but the device has already crashed with a 500 error so it's reporting the command was unsupported because it didn't get a response (I think....). Actually, looking at it again, I believe the stream is crashing the device and stopping playback and the plugin is then attempting to send the pause command in an attempt to sync playstates which I'm not 100% sure why yet but because it's already crashed it's reporting this error. I need to go over this but the issue is the stream is crashing the device.

For the most part it seems to be working, it's connecting, starting the stream and successfully setting the NextURI. So it's probably related to the WAV file. Its currently getting encoded to apply DSP/replaygain settings.

If you haven't already I would try the following
1. Make sure your firewall is not blocking anything.
2. check "Do not use raw PCM" and see how that goes, you should see L16 or L24 as the extension in the log instead of .WAV
3. If option 2 doesn't work, try and get it to play a native stream. Remove DSP/replaygain settings and adjust the profile to make sure it won't encode the file and see if that will stream ok.

You want the log to have "GetFile" entries, not "GetEncodedFile".

The more I look at that "Do not use Raw option" I feel like Lyrion had it backwards. Wouldn't L16/L24 be classed as RAW as it's just PCM? WAV is PCM with a 44 byte header although from what I've read it can contain other things, I don't know.

edit: Also I believe you can set upmpdcli to log to a file. That might give you a better idea of what's causing it to fail. The plugin error log isn't that great for solving problems as it doesn't know why the device did or didn't play something. The device log should give you more info in this regard.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 02, 2025, 11:09:31 PM
The new log is much shorter, done playing two songs trough a Cambridge Audio MXN10. My problem is it's not gapless, there's a half-a-second glitch between the two tracks.

Sorry I replied to your PM before I saw this post.

Yeah, I don't think I can do anything about that. I'm fairly sure that is a device problem. The NextURI is getting set successfully I have no control over how long a device takes to switch to it when the first track ends.

edit: I don't think this will help but you do appear to have a lot of UPnP devices on your network. That all creates traffic the plugin (and other devices) have to process. It probably won't make a noticeable difference but it might be worth just removing some of them while your testing to make sure they are not causing problems.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 02, 2025, 11:30:11 PM
The new log is much shorter, done playing two songs trough a Cambridge Audio MXN10. My problem is it's not gapless, there's a half-a-second glitch between the two tracks.

Sorry I replied to your PM before I saw this post.

Yeah, I don't think I can do anything about that. I'm fairly sure that is a device problem. The NextURI is getting set successfully I have no control over how long a device takes to switch to it when the first track ends.

edit: I don't think this will help but you do appear to have a lot of UPnP devices on your network. That all creates traffic the plugin (and other devices) have to process. It probably won't make a noticeable difference but it might be worth just removing some of them while your testing to make sure they are not causing problems.

No worries!

It may be a device problem, but I have used this device (MXN10) since December 2023 with an Emby Server + Simfonium app or MinimServer + Bubble UPNP (plus others, but mainly these two), always gapless, no issues...

For different reasons, I cannot turn off the other UPNP devices, but those are always on and have not been a problem, ever, with the MXN10 and many other products i have tested in the last year and a half.

Anyway, thanks for all your efforts, it would be great if it could be gapless, but it's great as it is already.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 02, 2025, 11:39:32 PM

It may be a device problem, but I have used this device (MXN10) since December 2023 with an Emby Server + Simfonium app or MinimServer + Bubble UPNP (plus others, but mainly these two), always gapless, no issues...


Hmm. Where is that other software running from?

Could it be a network thing? If that other software is running off your NAS vs musicbee running off your PC, it could just be it's taking longer to access the files for whatever reason.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 02, 2025, 11:54:10 PM

It may be a device problem, but I have used this device (MXN10) since December 2023 with an Emby Server + Simfonium app or MinimServer + Bubble UPNP (plus others, but mainly these two), always gapless, no issues...


Hmm. Where is that other software running from?

Could it be a network thing? If that other software is running off your NAS vs musicbee running off your PC, it could just be it's taking longer to access the files for whatever reason.

With MusicBee, there's no server - it's running on a laptop but the files are indeed on a NAS. I will try with files on the laptop tomorrow. but I don't think it will matter - I'll report back,
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 03, 2025, 12:03:33 AM
We can test if it's a network issue with foobar.

Download 32 bit - Foobar (https://www.foobar2000.org/download)
download this - upnp plugin (https://www.foobar2000.org/components/view/foo_upnp)

Create  foobar folder somewhere.
Run the foobar installer and select portable install and set it to the foobar folder you created.
Run foobar
Goto File->Preferences
Components should be selected by default. Click install in the bottom right corner and selected the Upnp file you downloaded earlier and click apply.
Probably worth restarting foobar at this point.

Open musicbee and set foobar as the output device. Play a few tracks and see if it's gapless, if it isn't that points to an issue with the network more than the plugin, if it is gapless we are probably back to square one but at least it rules one possible problem out.

When you're done with foobar you can just delete the foobar folder.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 03, 2025, 12:43:43 AM
We can test if it's a network issue with foobar.

Download 32 bit - Foobar (https://www.foobar2000.org/download)
download this - upnp plugin (https://www.foobar2000.org/components/view/foo_upnp)

Create  foobar folder somewhere.
Run the foobar installer and select portable install and set it to the foobar folder you created.
Run foobar
Goto File->Preferences
Components should be selected by default. Click install in the bottom right corner and selected the Upnp file you downloaded earlier and click apply.
Probably worth restarting foobar at this point.

Open musicbee and set foobar as the output device. Play a few tracks and see if it's gapless, if it isn't that points to an issue with the network more than the plugin, if it is gapless we are probably back to square one but at least it rules one possible problem out.

When you're done with foobar you can just delete the foobar folder.

OK, thanks!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 03, 2025, 10:37:07 AM
We can test if it's a network issue with foobar.

Try your setup with the following tracks (https://we.tl/t-On1YHWalyv). I generated a tone in Audacity and split the resulting file into 3 tracks of 15 seconds (so it'll work with the MXN10).

Once you've tested MusicBee try with Hi-Fi Cast or mconnect using MusicBee as the source.

I think it's just that the foo_upnp plugin does a good job of making it sound gapless, even though it's not.

SHA1: bee74d247e6f8f8922ef5605dfc51e3973fb0335
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 03, 2025, 01:31:42 PM
If you haven't already I would try the following
1. Make sure your firewall is not blocking anything.
2. check "Do not use raw PCM" and see how that goes, you should see L16 or L24 as the extension in the log instead of .WAV
3. If option 2 doesn't work, try and get it to play a native stream. Remove DSP/replaygain settings and adjust the profile to make sure it won't encode the file and see if that will stream ok.
1. isn't an issue.
2. led to a single song almost playing through (though the initialisation did throw a few errors:
Upmpdcli:
Code
Mär 03 14:00:57 pi3B upmpdcli[6282]: :2:../libupnpp/control/cdircontent.cxx:253::UPnPDirContent::parse: parser failed: duplicate attribute at line 1 column 1474 for:
Mär 03 14:00:57 pi3B upmpdcli[6282]: <DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:pv="http://www.pv.com/pvns/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/">>
Mär 03 14:00:57 pi3B upmpdcli[6282]: :2:../src/upmpd.cxx:300::checkContentFormat: didl parse failed
Mär 03 14:00:57 pi3B upmpdcli[6282]: :2:../src/mpdcli.cxx:336::mpd_run_clear(m_conn) failed: Connection closed by the server
Mär 03 14:00:57 pi3B upmpdcli[6282]: :3:../src/mpdcli.cxx:148::MPDCli::startEventLoop: already started
Mär 03 14:01:01 pi3B upmpdcli[6282]: :3:../src/upmpd.cxx:312::checkContentFormat: format check disabled
However shortly before the first song ended, the audio output stopped and by checking the logs, MPD is stuck (constantly repeating) with:
MPD:
Code
Mär 03 14:04:08 pi3B mpd[6518]: alsa_output: Decoder is too slow; playing silence to avoid xrun

Restarting mpd with
Code
sudo systemctl restart mpd
takes almost a minute but then the pi starts playing the second song (after I had already switched the output in MusicBee from the pi to a local sound device and stopped playback).

This is the plugin log:
Code
82988; 11 Profile - Generic Device, useragent=|Linux/6.1.21-v8+ UPnP/1.1 Portable SDK for UPnP devices/6.2.0
82994; 12 Profile - Generic Device, useragent=|Linux/6.1.21-v8+ UPnP/1.1 Portable SDK for UPnP devices/6.2.0
83012; 13 Activate - MaltePi3B-UPnP/AV:http-get:*:audio/L16:DLNA.ORG_PN=LPCM,http-get:*:application/flac:*,http-get:*:application/x-flac:*,http-get:*:application/ogg:*,http-get:*:application/vnd.apple.mpegurl:*,http-get:*:application/x-mpegurl:*,http-get:*:audio/flac:*,http-get:*:audio/x-flac:*,http-get:*:audio/aac:*,http-get:*:audio/x-aiff:*,http-get:*:audio/aif:*,http-get:*:audio/aiff:*,http-get:*:audio/dff:*,http-get:*:audio/x-dff:*,http-get:*:audio/dsd:*,http-get:*:audio/x-dsd:*,http-get:*:audio/dsf:*,http-get:*:audio/x-dsf:*,http-get:*:audio/m4a:*,http-get:*:audio/x-m4a:*,http-get:*:audio/matroska:*,http-get:*:audio/x-matroska:*,http-get:*:audio/mp1:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mpeg:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/ogg:*,http-get:*:audio/vorbis:*,http-get:*:audio/x-ape:*,http-get:*:audio/ape:*,http-get:*:audio/x-monkeys-audio:*,http-get:*:audio/wav:*,http-get:*:audio/x-wav:*,http-get:*:audio/wave:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ogg:*,http-get:*:audio/x-scpls:*,http-get:*:audio/x-vorbis+ogg:*,http-get:*:audio/x-vorbis:*,http-get:*:audio/x-wavpack:*,http-get:*:video/mp4:*
98037; 14 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
98052; 15 Play - Z:\M4\Laswell, Greg\Take a Bow\01 Take Everything.flac (http://192.168.1.5:49382/encode/DE3ED7364A42F6B8-2147483638.L16)
98110; 16 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
98113; 17 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
98190; 18 StateTimer - Playing,old=Stopped
102183; 19 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
102186; 20 GetEncodedFile[1] 192.168.1.5 - GET Z:\M4\Laswell, Greg\Take a Bow\01 Take Everything.flac to 192.168.1.13; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
102230; 21 SetNextAVTransportURI - Success - http://192.168.1.5:49382/encode/05EF0936D53A40780.L16
105183; 22 GetEncodedFile[1] - exit=0, playtime=2991
168796; 23 StateTimer - Playing,old=Paused
287282; 24 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
287287; 25 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
287584; 26 GetEncodedFile[2] 192.168.1.5 - GET Z:\M4\Laswell, Greg\Take a Bow\02 My Fight (For You).flac to 192.168.1.13; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
287656; 27 GetEncodedFile[2] - exit=0, playtime=67
349408; 28 PostSoapRequest - 500,send=POST /uuid-677a63db-6686-01d7-34a0-b827eb0b7fae/ctl-urn-schemas-upnp-org-service-AVTransport-1 HTTP/1.1
Host: 192.168.1.13:49152
User-Agent: MusicBee UPnP Plugin
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Pause"
Content-Length: 290

<?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:Pause xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Pause></s:Body></s:Envelope>
349413; 29 SoapRequest:Pause:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0 - <?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>501</errorCode>
<errorDescription>Action Failed</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

349416; 30 Pause - status=500

3. works. I've tested it with 16/44.1 and 24/192 files without playback issues.
I had tried all of these before but it was pointless because I had not realized that mpd was stuck after the first test haha.

Note:
You should add an option to clear/update the nexturi when the playback queue is changed in MusicBee tho.
I was a bit surprised when the 2nd song I had removed from the playing queue in MB started playing on the pi anyhow.

So my guess is that mpd errors out because of the transcoded wav/pcm streams. Which is odd since mpd is very robust and usually swallows anything you throw at it, format-wise.
I can also confirm that it's not a device/hardware issue since the proxmox lxc debian container gets stuck in the same manner. And there MPD simply writes the incoming audio to a FIFO PIPE which snapserver then uses as the source for the 2 snapclients on the pis.

Edit:
I just noticed that MusicBee does not switch the song alongside the pi.
While the pi is already playing the 2nd song, MusicBee still displays the first one as playing.

Code
2126746; 121 Play - Z:\M2\Coldplay\X&Y 24-192\01 Square One.flac (http://192.168.1.5:49382/files/2F7E7C0ED794A867p.x-flac)
2126772; 122 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
2126775; 123 GetFile[18] 192.168.1.5 - GET Z:\M2\Coldplay\X&Y 24-192\01 Square One.flac to 192.168.1.13
2126789; 124 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
2127048; 125 SetNextAVTransportURI - Success - http://192.168.1.5:49382/files/F5145CED5FF56764p.x-flac
2407048; 126 GetFile[18] - exit=0, playtime=280255
2411139; 127 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
2411144; 128 GetFile[19] 192.168.1.5 - GET Z:\M2\Coldplay\X&Y 24-192\02 What If.flac to 192.168.1.13
2411477; 129 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
Update:
This seems to  have been a problem specific to these files (just my luck).
When other albums worked correctly, I recompressed (https://github.com/AverageHoarder/flacr) this one with the latest encoder (it was encoded with an encoder from 2019) and now it switches songs in MB correctly. I suspect seeking was the problem since the cursor in the wavebar of MusicBee jumped instead of scrolling smoothly. Now it scrolls smoothly. And seeking was also missing from the plugin log.
Log of it working with the same songs after recompression:
Code
5803061; 249 Play - Z:\M2\Coldplay\X&Y [24-192]\01 Square One.flac (http://192.168.1.5:49382/files/71B91248D794A867p.x-flac)
5803076; 250 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
5803080; 251 GetFile[36] 192.168.1.5 - GET Z:\M2\Coldplay\X&Y [24-192]\01 Square One.flac to 192.168.1.13
5803094; 252 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
5803219; 253 StateTimer - Playing,old=Stopped
5803236; 254 SetNextAVTransportURI - Success - http://192.168.1.5:49382/files/52D30B6B5FF56764p.x-flac
6080710; 255 GetFile[36] - exit=0, playtime=277611
6087325; 256 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
6087330; 257 GetFile[37] 192.168.1.5 - GET Z:\M2\Coldplay\X&Y [24-192]\02 What If.flac to 192.168.1.13
6087346; 258 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
6090710; 259 Seek - goto=0
6090725; 260 GetFile[37] - exit=10054, playtime=3374
6090726; 261 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
6090735; 262 GetFile[38] 192.168.1.5 - GET Z:\M2\Coldplay\X&Y [24-192]\02 What If.flac to 192.168.1.13
6090748; 263 GetFile - range=bytes 5954-200303874/200303875
6090752; 264 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
6090760; 265 Seek - pos=0
6090797; 266 SetNextAVTransportURI - No track to queue
6379259; 267 GetFile[38] - exit=0, playtime=288503
6388223; 268 StateTimer - Stopped,old=Playing
6388247; 269 SyncNewPlayState - Stopped,mb=Playing
Update 2:
I think the song switching/seeking problem is bound to older encoders:
Code
8164701; 410 Play - Z:\M1\Blunt, James\Back to Bedlam-The Bedlam Sessions - Live In Ireland\10 Tears And Rain.flac (http://192.168.1.5:49382/files/BC0A6E819EF7ED0Cp.x-flac)
8164727; 411 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
8164730; 412 GetFile[60] 192.168.1.5 - GET Z:\M1\Blunt, James\Back to Bedlam-The Bedlam Sessions - Live In Ireland\10 Tears And Rain.flac to 192.168.1.13
8164746; 413 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
8165976; 414 SetNextAVTransportURI - Success - http://192.168.1.5:49382/files/162D90A631C611ABp.x-flac
8166823; 415 GetFile[60] - exit=0, playtime=2051
8400654; 416 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
8400659; 417 GetFile[61] 192.168.1.5 - GET Z:\M1\Blunt, James\Back to Bedlam-The Bedlam Sessions - Live In Ireland\11 No Bravery.flac to 192.168.1.13
8400671; 418 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
8402367; 419 GetFile[61] - exit=0, playtime=1693
No track change in MusicBee, choppy cursor in wave bar.
Encoder:
reference libFLAC 1.3.1 20141125
Casting the same songs to the same pi via Symfonium works flawlessly.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 03, 2025, 09:55:55 PM
New version mb_Upnp2025_1.5.1 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Changed the order of the mimetypes so if the device supports it, the non x version will be returned first. eg) audio/flac instead of audio/x-flac. Hopefully this doesn't break systems that previously worked, if need be I will make it a configurable option instead.
- Fixed the issue that caused the progress bar to become jittery after hitting next track or selecting play now while a track is already playing. This also fixes the transition issue that occurred when the next track finished playing after the progress bar had become jittery.

I haven't read through the other posts yet.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 03, 2025, 10:02:16 PM
Try your setup with the following tracks (https://we.tl/t-On1YHWalyv). I generated a tone in Audacity and split the resulting file into 3 tracks of 15 seconds (so it'll work with the MXN10).
I think it's just that the foo_upnp plugin does a good job of making it sound gapless, even though it's not.

I haven't tested on my other machine yet. But with foobar on the same machine, those 3 tracks are gapless. There's just a small static pop when it transitions but no gap. Is that what you are referring to?

Maybe I have the wrong idea of what gapless is....
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 03, 2025, 10:07:31 PM
Try your setup with the following tracks (https://we.tl/t-On1YHWalyv). I generated a tone in Audacity and split the resulting file into 3 tracks of 15 seconds (so it'll work with the MXN10).
I think it's just that the foo_upnp plugin does a good job of making it sound gapless, even though it's not.

I haven't tested on my other machine yet. But with foobar on the same machine, those 3 tracks are gapless. There's just a small static pop when it transitions but no gap. Is that what you are referring to?

Maybe I have the wrong idea of what gapless is....

Gapless means no interruption(zero, really) between tracks - good tests are live records, classical music records or "Dark Side of the Moon".
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 03, 2025, 10:16:40 PM
3. works. I've tested it with 16/44.1 and 24/192 files without playback issues.
I had tried all of these before but it was pointless because I had not realized that mpd was stuck after the first test haha.
Note:
You should add an option to clear/update the nexturi when the playback queue is changed in MusicBee tho.
I was a bit surprised when the 2nd song I had removed from the playing queue in MB started playing on the pi anyhow.

Righto, thanks for all that info. It is surprising how many devices seem to have issues with PCM streams. It could be related to the duplicated attribute it mentions. Especially if a player stops reading at that point. I'll see if I can find the cause of that.

I'll sort out the NextURI issue, that's just an oversight. I have got it set to overwrite the NextURI when a different song is selected but hadn't accounted for tracks being removed from the now playing list.

And I probably sent you down a wild goose chase with the choppy progress bar and encoder versions. There was an issue with the plugin causing those problems, it's likely your files were fine. Sorry.

I'll look over the rest of the info and see what I can improve. Thanks again for the detailed log, it helps a lot.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 03, 2025, 10:58:59 PM
Try your setup with the following tracks (https://we.tl/t-On1YHWalyv). I generated a tone in Audacity and split the resulting file into 3 tracks of 15 seconds (so it'll work with the MXN10).
I think it's just that the foo_upnp plugin does a good job of making it sound gapless, even though it's not.

I haven't tested on my other machine yet. But with foobar on the same machine, those 3 tracks are gapless. There's just a small static pop when it transitions but no gap. Is that what you are referring to?

Maybe I have the wrong idea of what gapless is....

When the tracks are played "gapless" you'll hear a single constant tone, as if it were a single audio stream, just as it is when you cast from BubbleUPnP/Hi-Fi Cast/mconnect to foo_upnp with MusicBee as the server.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 04, 2025, 01:32:38 AM
When the tracks are played "gapless" you'll hear a single constant tone, as if it were a single audio stream, just as it is when you cast from BubbleUPnP/Hi-Fi Cast/mconnect to foo_upnp with MusicBee as the server.

I tried it with bubbleUPnP on my mobile, rendering to foobar and reading from musicbee.

That was a single continuous stream with no breaks or noises.

Going back to playing to foobar from musicbee, those 3 tracks take exactly 45 seconds play so there is no gaps there. I just have to see if I can find the cause of the popping sound. It occurs whether it's a native stream or encoded to PCM. I'm not sure I'll be able to solve that one.

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 04, 2025, 05:42:05 AM
New version mb_Upnp2025_1.5.2 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Fixed an issue that caused a metadata attribute to be duplicated.
- NextURI is now handled better when the now playing list is changed.
- Musicbee will now stop when it gets to the last track in the list instead of repeating it indefinitely.

I had issues with the playing tracks element on the Music node being set to "show upcoming tracks" and the player tracks element on the Now Playing node set to "show playing tracks". I recommend setting these both to "show playing tracks" to avoid any strange behaviour with this plugin.

If you set them differently, its possible to queue up a few tracks and play them without notifications this plugin requires to trigger. I'm not sure if that's intended or a bug but I couldn't see a way to work around it.

If Casual Tea could try option 2 again and see how that goes it would be good. Hopefully it can parse the headers this time and gets through the whole track.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 04, 2025, 09:05:00 AM
That was a single continuous stream with no breaks or noises.

Going back to playing to foobar from musicbee, those 3 tracks take exactly 45 seconds play so there is no gaps there. I just have to see if I can find the cause of the popping sound. It occurs whether it's a native stream or encoded to PCM. I'm not sure I'll be able to solve that one.

My point wasn't really about foobar/foo_upnp it was about the current implementation. You seem to be assuming that other renderers are at fault given that foo_upnp works, which we now know it doesn't.

I tried Volumio, Sonos, WiiM and foo_upnp (I also tried Audiophile Renderer but that appears broken with all of them) and none are gapless/seamless from MusicBee but all are with Hi-Fi Cast and mconnect (I always assume BubbleUPnP will work).

I think there must be something wrong/missing, but unfortunately I have no idea what.

I used 1.5.1 for testing as 1.5.2 isn't available yet.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 04, 2025, 10:20:47 AM
It occurs whether it's a native stream or encoded to PCM. I'm not sure I'll be able to solve that one.

Given that external control points work, could it be something to do with the way you're serving the file? As a test, can you use the URL that's served to external control points?

EDIT: I meant DIDL (obviously). Fired that message off before diving into a meeting.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 04, 2025, 10:34:55 AM
That was a single continuous stream with no breaks or noises.

Going back to playing to foobar from musicbee, those 3 tracks take exactly 45 seconds play so there is no gaps there. I just have to see if I can find the cause of the popping sound. It occurs whether it's a native stream or encoded to PCM. I'm not sure I'll be able to solve that one.

My point wasn't really about foobar/foo_upnp it was about the current implementation. You seem to be assuming that other renderers are at fault given that foo_upnp works, which we now know it doesn't.

I tried Volumio, Sonos, WiiM and foo_upnp (I also tried Audiophile Renderer but that appears broken with all of them) and none are gapless/seamless from MusicBee but all are with Hi-Fi Cast and mconnect (I always assume BubbleUPnP will work).

I think there must be something wrong/missing, but unfortunately I have no idea what.

I used 1.5.1 for testing as 1.5.2 isn't available yet.

I just tested with 1.5.2 and it's NOT gapless from MusicBee (files on a NAS) to MXN10 - but it is from Bubble UPNP (Android) + MinimServer (NAS) and also from Symfonium (Android) + Emby (NAS).
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 04, 2025, 10:36:18 AM
New version mb_Upnp2025_1.5.2 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Fixed an issue that caused a metadata attribute to be duplicated.
- NextURI is now handled better when the now playing list is changed.
- Musicbee will now stop when it gets to the last track in the list instead of repeating it indefinitely.

I had issues with the playing tracks element on the Music node being set to "show upcoming tracks" and the player tracks element on the Now Playing node set to "show playing tracks". I recommend setting these both to "show playing tracks" to avoid any strange behaviour with this plugin.

If you set them differently, its possible to queue up a few tracks and play them without notifications this plugin requires to trigger. I'm not sure if that's intended or a bug but I couldn't see a way to work around it.

If Casual Tea could try option 2 again and see how that goes it would be good. Hopefully it can parse the headers this time and gets through the whole track.

Just as a curiosity, how did you fix the last track loop issue? I tested an Eversolo streamer recently that had this issue, it would be great if they solved it.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 04, 2025, 12:45:49 PM
If Casual Tea could try option 2 again and see how that goes it would be good. Hopefully it can parse the headers this time and gets through the whole track.
Done that (with v1.5.2.) Played for a few seconds and then once again crashed mpd.
Upmpdcli log:
Code
Mär 04 12:55:56 pi3B upmpdcli[6282]: :2:../src/mpdcli.cxx:336::mpd_run_clear(m_conn) failed: Connection closed by the server
Mär 04 12:55:56 pi3B upmpdcli[6282]: :3:../src/mpdcli.cxx:148::MPDCli::startEventLoop: already started
Mär 04 12:56:00 pi3B upmpdcli[6282]: :3:../src/upmpd.cxx:312::checkContentFormat: format check disabled
Mär 04 12:56:05 pi3B upmpdcli[6282]: :2:../src/mpdcli.cxx:113::MPDCli::openconn: mpd_connection_new failed: Timeout
Mär 04 12:56:05 pi3B upmpdcli[6282]: :2:../src/mpdcli.cxx:396::MPDCli::updStatus: connection failed
Mär 04 12:56:08 pi3B upmpdcli[6282]: :2:../src/mpdcli.cxx:113::MPDCli::openconn: mpd_connection_new failed: Timeout
Mär 04 12:56:08 pi3B upmpdcli[6282]: :2:../src/mpdcli.cxx:389::MPDCli::updStatus: no connection
Mpd log:
Code
Mär 04 12:57:32 pi3B mpd[175206]: alsa_output: Decoder is too slow; playing silence to avoid xrun

Plugin log:
Code
73096; 11 Profile - Generic Device, useragent=|Linux/6.1.21-v8+ UPnP/1.1 Portable SDK for UPnP devices/6.2.0
73099; 12 Profile - Generic Device, useragent=|Linux/6.1.21-v8+ UPnP/1.1 Portable SDK for UPnP devices/6.2.0
73117; 13 Activate - MaltePi3B-UPnP/AV:http-get:*:audio/L16:DLNA.ORG_PN=LPCM,http-get:*:application/flac:*,http-get:*:application/x-flac:*,http-get:*:application/ogg:*,http-get:*:application/vnd.apple.mpegurl:*,http-get:*:application/x-mpegurl:*,http-get:*:audio/flac:*,http-get:*:audio/x-flac:*,http-get:*:audio/aac:*,http-get:*:audio/x-aiff:*,http-get:*:audio/aif:*,http-get:*:audio/aiff:*,http-get:*:audio/dff:*,http-get:*:audio/x-dff:*,http-get:*:audio/dsd:*,http-get:*:audio/x-dsd:*,http-get:*:audio/dsf:*,http-get:*:audio/x-dsf:*,http-get:*:audio/m4a:*,http-get:*:audio/x-m4a:*,http-get:*:audio/matroska:*,http-get:*:audio/x-matroska:*,http-get:*:audio/mp1:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mpeg:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/ogg:*,http-get:*:audio/vorbis:*,http-get:*:audio/x-ape:*,http-get:*:audio/ape:*,http-get:*:audio/x-monkeys-audio:*,http-get:*:audio/wav:*,http-get:*:audio/x-wav:*,http-get:*:audio/wave:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ogg:*,http-get:*:audio/x-scpls:*,http-get:*:audio/x-vorbis+ogg:*,http-get:*:audio/x-vorbis:*,http-get:*:audio/x-wavpack:*,http-get:*:video/mp4:*
108964; 14 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
108979; 15 Play - Z:\M4\Michaelson, Ingrid\Slow the Rain\03 Charlie.flac (http://192.168.1.5:49382/encode/E31C09EDAA7E0658-2147483638.L16)
109009; 16 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
109012; 17 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
109108; 18 StateTimer - Playing,old=Stopped
113056; 19 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
113060; 20 GetEncodedFile[1] 192.168.1.5 - GET Z:\M4\Michaelson, Ingrid\Slow the Rain\03 Charlie.flac to 192.168.1.13; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
113090; 21 SetNextAVTransportURI - Success - http://192.168.1.5:49382/encode/0B8F7588A55378BD0.L16
113199; 22 GetEncodedFile[1] - exit=0, playtime=131
157107; 23 PostSoapRequest - 500,send=POST /uuid-677a63db-6686-01d7-34a0-b827eb0b7fae/ctl-urn-schemas-upnp-org-service-AVTransport-1 HTTP/1.1
Host: 192.168.1.13:49152
User-Agent: MusicBee UPnP Plugin
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Pause"
Content-Length: 290

<?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:Pause xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Pause></s:Body></s:Envelope>
157112; 24 SoapRequest:Pause:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0 - <?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>501</errorCode>
<errorDescription>Action Failed</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

157115; 25 Pause - status=500

Why do you transcode to wav/pcm anyhow? Snapcast (https://github.com/badaix/snapcast?tab=readme-ov-file#how-does-it-work) for example transcodes to flac. That's less harsh on the network throughput and also on the write speed of the upnp devices and even a Raspberry Pi 1 can decode 24/192 flac in real time. Especially with high res music, the bitrate of a wav/pcm stream could overwhelm the anemic wireless connection speed of a raspberry pi or the write speed of its microSD card while a flac stream would still be fine.

Concerning the gapless playback I've performed a little test. The track transition happens between the 2 peaks following the cursor.
1. playing in musicbee locally and capturing the soundcard output yields a perfect transition.
(https://i.imgur.com/UrctY1v.jpeg)
2. playing on the Pi via Symfonium (upnp) also yields a perfect transition (recorded with my mic and normalized).
(https://i.imgur.com/DvHWliw.jpeg)
3. playing via the plugin leads to a choppy transition. Looks like a bit of the beginning of the next track is skipped.
(https://i.imgur.com/epNmnja.jpeg)
The two songs that I used are "Silver Streets" and "July" by "BOY" from the album "Mutual Friends".

Edit:
I did a further test. I created a sine tone in audacity, added a 1 second fade within that tone, split the tone during the fade and used the 2 resulting files as test files. To get a better recording on the pi, I created an additional fifo output in mpd and recorded that via sox.
Test files split:
(https://i.imgur.com/Y8ormqU.jpeg)
Playing these 2 back in MusicBee locally yields a perfect transition:
(https://i.imgur.com/V8gp3Kd.jpeg)
Playing them on the pi via the plugin repeats a section:
(https://i.imgur.com/UwnaDPl.jpeg)
Section zoomed in:
(https://i.imgur.com/TCUaAoP.jpeg)
And zoomed in even further:
(https://i.imgur.com/c3P3DVV.jpeg)
My guess is that the 2nd song starts playing and then gets its playback position reset to the start, leading to the short repeated section and the choppy transition.

Another idea for an option of the plugin:
You could add a checkbox for "never transcode/force original" so that people could leave options such as smooth fading and replay gain enabled for normal players and could still play via upnp without transcoding.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 04, 2025, 04:47:59 PM
Changes
- Changed the order of the mimetypes so if the device supports it, the non x version will be returned first. eg) audio/flac instead of audio/x-flac. Hopefully this doesn't break systems that previously worked, if need be I will make it a configurable option instead.

I didn't realise you were going to change the advertised mime-type given the problem was just the file extension, although with RFC 9639 (https://www.rfc-editor.org/rfc/rfc9639.html#name-media-type-registration) audio/flac is now the official standard anyway.

This seems to have fixed the WiiM problem, and Sonos and Volumio seem unaffected so hopefully it won't cause any issues.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 04, 2025, 10:36:23 PM
My point wasn't really about foobar/foo_upnp it was about the current implementation. You seem to be assuming that other renderers are at fault given that foo_upnp works, which we now know it doesn't.

I tried Volumio, Sonos, WiiM and foo_upnp (I also tried Audiophile Renderer but that appears broken with all of them) and none are gapless/seamless from MusicBee but all are with Hi-Fi Cast and mconnect (I always assume BubbleUPnP will work).

Apart from the small pop I'd say foobar does work as gapless. Obviously the pop shouldn't be there but there is no gap. I get the exact same result using bubbleUPnP as the renderer. So I think in terms of being gapless, it's working. Its just the small pop I need to try and sort out.

If you consider that not working it does make me wonder how your other devices function. Do they all have that small pop or is there an actual gap between tracks and how large is it?

Given that external control points work, could it be something to do with the way you're serving the file? As a test, can you use the URL that's served to external control points?

The plugin doesn't really handle serving the file. The stream is created using functions from MusicBeeBass.dll and the BASS (https://www.un4seen.com/bass.html) library. It's those processes that handle sending the data. The plugin handles everything else except the actual stream data. That's why I said fixing that pop might not be possible for me.

The problem is the plugin is setting the SetNextAVTransportURI successfully, that means the device has everything it needs to cache the next track and transition to it without a gap. Foobar and BubbleUpNP are doing it without an actual gap, just the pop sound. If a device ends up with an actual gap (not just the pop sound) that means either the device didn't pre-cache the next track or it tried to and the plugin either declined (I don't see that in the logs) or took too long to serve it up which could or could not be the plugins fault. It's hard to diagnose when there are so many variables to consider.

One variable is do all your devices have an actual gap or is it just the pop sound?

I didn't realise you were going to change the advertised mime-type given the problem was just the file extension, although with RFC 9639 (https://www.rfc-editor.org/rfc/rfc9639.html#name-media-type-registration) audio/flac is now the official standard anyway.

This seems to have fixed the WiiM problem, and Sonos and Volumio seem unaffected so hopefully it won't cause any issues.

I didn't change the advertised mimetypes that are supported. Eg) The plugin should still advertise it supports audio/flac and audio/x-flac. When a stream is created, the plugin searches for the applicable mimetype and returns the first one that matches and is supported by the renderer. All I did was change the order so it would match to audio/flac before it matched to audio/x-flac.

The actual problem is WiiM is including audio/x-flac in it's supported mimetypes when it doesn't seem to support it. If it didn't the plugin would have skipped x-flac and returned audio/flac without me having to change anything.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 04, 2025, 10:41:04 PM
I just tested with 1.5.2 and it's NOT gapless from MusicBee (files on a NAS) to MXN10 - but it is from Bubble UPNP (Android) + MinimServer (NAS) and also from Symfonium (Android) + Emby (NAS).

Did you try with foobar yet?

Just as a curiosity, how did you fix the last track loop issue? I tested an Eversolo streamer recently that had this issue, it would be great if they solved it.

It was a specific issue with musicbee. Musicbee provides a notification when it is finished the playing tracks list. I just set it to stop when that notification triggered. The issue I initially had was the settings I had for the "playing tracks" element were preventing that notification from triggering so I didn't know it existed until I went looking for it and solved my settings problem.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 04, 2025, 11:04:11 PM
Done that (with v1.5.2.) Played for a few seconds and then once again crashed mpd.

So it crashed quicker than last time, I believe you said it nearly got through the whole song last time?

Why do you transcode to wav/pcm anyhow?

It's just how the plugin was setup when I took it over. I'll add a flac option. That might require users to add a flac encoder in the File Converters settings, I can't remember if it's there by default. It may have been made for compatibility reasons. The plugin is over 10 years old, less stuff probably supported flac back then and PCM would have been widely supported I would think. Obviously it's causing a lot of problems now.

My guess is that the 2nd song starts playing and then gets its playback position reset to the start, leading to the short repeated section and the choppy transition.

That's great work. I know what's causing that to occur now. Thanks. Not sure I would have figured that out on my own, at least not for long time.

Another idea for an option of the plugin:
You could add a checkbox for "never transcode/force original" so that people could leave options such as smooth fading and replay gain enabled for normal players and could still play via upnp without transcoding.

I'll add that in.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 05, 2025, 12:25:25 AM
The pop is gone. Foobar and bubbleUPnP now play a continuous tone with no gaps/pops.

There is a chance this will also fix delays with other devices. I noticed playback was stopping with native flac streams after the first track with BubbleUPnP but since making the fix they play through fine.

Thanks again Casual Tea.

I'll add those other options and push out another version in a day or two.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 05, 2025, 03:22:16 PM
The pop is gone. Foobar and bubbleUPnP now play a continuous tone with no gaps/pops.
..
I'll add those other options and push out another version in a day or two.
Lovely!

So it crashed quicker than last time, I believe you said it nearly got through the whole song last time?
Yeah it crashes after 5ish seconds.

I redid the test with debug level logging active in mpd to see why it crashes:
MPD debug log:
Code
Mar 05 16:16 : client: [1] process command "addid "http://192.168.1.5:49382/encode/BBE0A499E270767A-2147483463.L16" "0""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "addtagid "2" "Artist" "Laswell, Greg, Greg Laswell""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "addtagid "2" "Album" "Covers [EP]""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "addtagid "2" "Title" "The Killing Moon""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "addtagid "2" "Track" "1""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "addtagid "2" "Comment" "client=upmpdcli;""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "status"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "stop"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "play"
Mar 05 16:16 : playlist: play 0:"http://192.168.1.5:49382/encode/BBE0A499E270767A-2147483463.L16"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "status"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "currentsong"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "playlistinfo "1""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : decoder_thread: probing plugin pcm
Mar 05 16:16 : decoder: audio_format=44100:16:2, seekable=true
Mar 05 16:16 : alsa_output: opened hw:CARD=sndrpihifiberry,DEV=0 type=HW
Mar 05 16:16 : alsa_output: buffer: size=4..65536 time=90..1486078
Mar 05 16:16 : alsa_output: period: size=2..32768 time=45..743039
Mar 05 16:16 : alsa_output: default period_time = buffer_time/4 = 500000/4 = 125000
Mar 05 16:16 : alsa_output: format=S24_LE (Signed 24 bit Little Endian)
Mar 05 16:16 : alsa_output: buffer_size=22050 period_size=4410
Mar 05 16:16 : output: opened "Hifiberry DAC Plus Pro" (alsa) audio_format=44100:24:2
Mar 05 16:16 : output: converting in=44100:16:2 -> f=44100:24:2 -> out=44100:24:2
Mar 05 16:16 : client: [0] process command "idle playlist player mixer options"
Mar 05 16:16 : client: [0] command returned 1
Mar 05 16:16 : client: [1] process command "status"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "currentsong"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "playlistinfo "1""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "status"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "currentsong"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "playlistinfo "1""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "playlistinfo"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [0] process command "idle playlist player mixer options"
Mar 05 16:16 : client: [0] command returned 1
Mar 05 16:16 : client: [1] process command "status"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "currentsong"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "playlistinfo "1""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "status"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "currentsong"
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "playlistinfo "1""
Mar 05 16:16 : client: [1] command returned 0
Mar 05 16:16 : client: [1] process command "status"
Mar 05 16:16 : alsa_output: Decoder is too slow; playing silence to avoid xrun
Mar 05 16:16 : alsa_output: Decoder is too slow; playing silence to avoid xrun
Mar 05 16:16 : alsa_output: Decoder is too slow; playing silence to avoid xrun

Plugin log of the same time-frame:
Code
9371453; 152 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
9371456; 153 Play - Z:\M4\Laswell, Greg\Covers [EP]\01 The Killing Moon.flac (http://192.168.1.5:49382/encode/BBE0A499E270767A-2147483463.L16)
9371493; 154 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
9371497; 155 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
9371500; 156 GetEncodedFile[8] 192.168.1.5 - GET Z:\M4\Laswell, Greg\Covers [EP]\01 The Killing Moon.flac to 192.168.1.13; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
9372669; 157 SetNextAVTransportURI - No track to queue
9372741; 158 SetNextAVTransportURI - No track to queue
9372813; 159 SetNextAVTransportURI - No track to queue
9373159; 160 SetNextAVTransportURI - No track to queue
9373665; 161 SetNextAVTransportURI - No track to queue
9374173; 162 SetNextAVTransportURI - No track to queue
9374675; 163 SetNextAVTransportURI - No track to queue
9375177; 164 SetNextAVTransportURI - No track to queue
9375341; 165 GetEncodedFile[8] - exit=0, playtime=3837
9379471; 166 PostSoapRequest - 500,send=POST /uuid-677a63db-6686-01d7-34a0-b827eb0b7fae/ctl-urn-schemas-upnp-org-service-AVTransport-1 HTTP/1.1
Host: 192.168.1.13:49152
User-Agent: MusicBee UPnP Plugin
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Pause"
Content-Length: 290

<?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:Pause xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Pause></s:Body></s:Envelope>
9379496; 168 SoapRequest:Pause:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0 - <?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>501</errorCode>
<errorDescription>Action Failed</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

9379471; 167 SetNextAVTransportURI - No track to queue
9379511; 169 Pause - status=500

In the plugin I have set 16bit, no RAW PCM and sample rate same as source.
Repeating the same test with the bit depth set to 24bit, the only output is noise and then that also crashes after 5ish seconds.

Plugin log:
Code
11083325; 285 Profile - Generic Device, useragent=|Linux/6.1.21-v8+ UPnP/1.1 Portable SDK for UPnP devices/6.2.0
11083328; 286 Profile - Generic Device, useragent=|Linux/6.1.21-v8+ UPnP/1.1 Portable SDK for UPnP devices/6.2.0
11083347; 287 Activate - MaltePi3B-UPnP/AV:http-get:*:audio/L16:DLNA.ORG_PN=LPCM,http-get:*:application/flac:*,http-get:*:application/x-flac:*,http-get:*:application/ogg:*,http-get:*:application/vnd.apple.mpegurl:*,http-get:*:application/x-mpegurl:*,http-get:*:audio/flac:*,http-get:*:audio/x-flac:*,http-get:*:audio/aac:*,http-get:*:audio/x-aiff:*,http-get:*:audio/aif:*,http-get:*:audio/aiff:*,http-get:*:audio/dff:*,http-get:*:audio/x-dff:*,http-get:*:audio/dsd:*,http-get:*:audio/x-dsd:*,http-get:*:audio/dsf:*,http-get:*:audio/x-dsf:*,http-get:*:audio/m4a:*,http-get:*:audio/x-m4a:*,http-get:*:audio/matroska:*,http-get:*:audio/x-matroska:*,http-get:*:audio/mp1:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mpeg:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/ogg:*,http-get:*:audio/vorbis:*,http-get:*:audio/x-ape:*,http-get:*:audio/ape:*,http-get:*:audio/x-monkeys-audio:*,http-get:*:audio/wav:*,http-get:*:audio/x-wav:*,http-get:*:audio/wave:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ogg:*,http-get:*:audio/x-scpls:*,http-get:*:audio/x-vorbis+ogg:*,http-get:*:audio/x-vorbis:*,http-get:*:audio/x-wavpack:*,http-get:*:video/mp4:*
11085260; 288 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
11085263; 289 Play - Z:\M4\Laswell, Greg\Covers [EP]\01 The Killing Moon.flac (http://192.168.1.5:49382/encode/BBE0A499E270767A-2147483363.L24)
11085300; 290 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
11085303; 291 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
11085307; 292 GetEncodedFile[12] 192.168.1.5 - GET Z:\M4\Laswell, Greg\Covers [EP]\01 The Killing Moon.flac to 192.168.1.13; mime=audio/L24;rate=44100;channels=2,rate=44100,channels=2
11085464; 293 StateTimer - Playing,old=Stopped
11085467; 294 SetNextAVTransportURI - No track to queue
11085478; 295 SetNextAVTransportURI - No track to queue
11086029; 296 SetNextAVTransportURI - No track to queue
11086530; 297 SetNextAVTransportURI - No track to queue
11087043; 298 SetNextAVTransportURI - No track to queue
11087543; 299 SetNextAVTransportURI - No track to queue
11088043; 300 SetNextAVTransportURI - No track to queue
11088559; 301 SetNextAVTransportURI - No track to queue
11089062; 302 SetNextAVTransportURI - No track to queue
11089565; 303 SetNextAVTransportURI - No track to queue
11090075; 304 SetNextAVTransportURI - No track to queue
11090585; 305 SetNextAVTransportURI - No track to queue
11091091; 306 SetNextAVTransportURI - No track to queue
11091332; 307 GetEncodedFile[12] - exit=0, playtime=6021
11091518; 308 SetNextAVTransportURI - No track to queue
11092019; 309 SetNextAVTransportURI - No track to queue
11096343; 310 SetNextAVTransportURI - No track to queue
11096343; 311 PostSoapRequest - 500,send=POST /uuid-677a63db-6686-01d7-34a0-b827eb0b7fae/ctl-urn-schemas-upnp-org-service-AVTransport-1 HTTP/1.1
Host: 192.168.1.13:49152
User-Agent: MusicBee UPnP Plugin
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Pause"
Content-Length: 290

<?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:Pause xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Pause></s:Body></s:Envelope>
11096360; 312 SetNextAVTransportURI - No track to queue
11096375; 313 SoapRequest:Pause:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0 - <?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>501</errorCode>
<errorDescription>Action Failed</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

11096395; 314 Pause - status=500

Mpd log:
Code
Mar 05 16:45 : client: [2] process command "addid "http://192.168.1.5:49382/encode/BBE0A499E270767A-2147483363.L24" "0""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "addtagid "1" "Artist" "Laswell, Greg, Greg Laswell""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "addtagid "1" "Album" "Covers [EP]""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "addtagid "1" "Title" "The Killing Moon""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "addtagid "1" "Track" "1""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "addtagid "1" "Comment" "client=upmpdcli;""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "status"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "stop"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "play"
Mar 05 16:45 : playlist: play 0:"http://192.168.1.5:49382/encode/BBE0A499E270767A-2147483363.L24"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "status"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "currentsong"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "playlistinfo "1""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : decoder_thread: probing plugin pcm
Mar 05 16:45 : decoder: audio_format=44100:24:2, seekable=true
Mar 05 16:45 : alsa_output: opened hw:CARD=sndrpihifiberry,DEV=0 type=HW
Mar 05 16:45 : alsa_output: buffer: size=4..65536 time=90..1486078
Mar 05 16:45 : alsa_output: period: size=2..32768 time=45..743039
Mar 05 16:45 : alsa_output: default period_time = buffer_time/4 = 500000/4 = 125000
Mar 05 16:45 : alsa_output: format=S24_LE (Signed 24 bit Little Endian)
Mar 05 16:45 : alsa_output: buffer_size=22050 period_size=4410
Mar 05 16:45 : output: opened "Hifiberry DAC Plus Pro" (alsa) audio_format=44100:24:2
Mar 05 16:45 : client: [1] process command "idle playlist player mixer options"
Mar 05 16:45 : client: [1] command returned 1
Mar 05 16:45 : client: [2] process command "status"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "currentsong"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "playlistinfo "1""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "status"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "currentsong"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "playlistinfo "1""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "playlistinfo"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [1] process command "idle playlist player mixer options"
Mar 05 16:45 : client: [1] command returned 1
Mar 05 16:45 : client: [2] process command "status"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "currentsong"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "playlistinfo "1""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "status"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "currentsong"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "playlistinfo "1""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "status"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "currentsong"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "playlistinfo "1""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "status"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "currentsong"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "playlistinfo "1""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "status"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "currentsong"
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "playlistinfo "1""
Mar 05 16:45 : client: [2] command returned 0
Mar 05 16:45 : client: [2] process command "status"
Mar 05 16:45 : alsa_output: Decoder is too slow; playing silence to avoid xrun
Mar 05 16:45 : alsa_output: Decoder is too slow; playing silence to avoid xrun
Mar 05 16:45 : alsa_output: Decoder is too slow; playing silence to avoid xrun
Mar 05 16:45 : alsa_output: Decoder is too slow; playing silence to avoid xrun
Looks like there's something wrong with the PCM encoding. Otherwise the mpd logs look exactly like if I cast from Symfonium.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 05, 2025, 09:27:15 PM
Mar 05 16:16 : alsa_output: format=S24_LE (Signed 24 bit Little Endian)
Mar 05 16:16 : output: converting in=44100:16:2 -> f=44100:24:2 -> out=44100:24:2

That looks like your setup is taking the 16 bit PCM stream and converting it to 24 bit Little Endian.

The PCM stream created by the plugin is Big Endian unless it's a WAV and then it's Little Endian. The "do not use RAW PCM" forces the plugin to not use WAV. Effectively forcing it to Big Endian. (WAV is also a PCM stream but has a 44 byte header)

I expect that's why you get noise when set to 24 bit because I don't see the "converting" line in the 24 bit log. It's not converting the stream so it's sending your device a Big Endian stream when it usually receives Little Endian.

I could add an option to force Little Endian for PCM streams. I suspect the Endianess might be why some Marantz devices get white noise.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 06, 2025, 03:21:02 AM
New version mb_Upnp2025_1.6 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Fixed an issue that caused a pop with gapless streaming.
- New transcode output format option "Flac". Users may need to add the flac encoder in musicbee's file converter section, I can't remember if it's installed by default. The plugin uses the std. Compression option.
- New option "force native stream". The plugin will ignore all transcode/DSP/Replaygain settings and stream the file natively. Due to native streams seemingly having less issues and some users having trouble setting profiles, I have defaulted this option to true. This "should" allow the plugin to work for more people out of the box.
- New option "force little endian for PCM streams". Wave are already little endian but L16/L24 streams are big endian. This forces them to be little endian which might fix white noise issues. "do not use Raw PCM" should probably be checked when using this setting as the plugin will default to Wave for PCM streams if the device supports it.

As the "force native stream" setting conflicts with "force transcoding" you may need to re-check "force transcoding" if you were using it before upgrading.

In my testing, encoded streams start with a small noise which effects gapless playback. This is different to the previous issue as playing just a single track will start with the noise. I haven't found a cause for this yet. Native streams are not effected by this issue.

The force little endian setting seems to vary across renderers. Foobar plays big endian PCM streams  but produces a screeching noise with little endian. BubbleUPnP has no problems playing both big and little endian PCM streams.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: RRoyce on March 06, 2025, 06:32:26 AM
The "force little endian" option in version 1.6 fixes the issue with Marantz PM7000n. Now plays fine in normal and gapless modes. Good work!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 06, 2025, 07:23:42 AM
The "force little endian" option in version 1.6 fixes the issue with Marantz PM7000n. Now plays fine in normal and gapless modes. Good work!

Nice.

Be interested to know if it works with the "force native stream" option. The endianness issue is limited to PCM streams which should only be necessary if your device doesn't support whatever file format your library is stored in.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 06, 2025, 02:04:42 PM
The pop is gone. Foobar and bubbleUPnP now play a continuous tone with no gaps/pops.

That's great news.

I tested the new plugin with WiiM Pro, Sonos Play 1 and Volumio, using 18 tracks each of 10 seconds in length (of the tone I supplied earlier) and applied ReplayGain to every other track.

My first test was with 'Force Native Stream' enabled, and all 3 devices produced a consistent tone across all track transitions.

I then disabled 'Force Native Stream' and enabled 'Normalise volume of tracks with replaygain tags', and all 3 devices were gapless, with volume shifts in alternate tracks as expected. Tracks with ReplayGain tags were transcoded to 'audio/wav'.

Playback was flawless, the only issues I saw were:
- When casting to WiiM the seek bar didn't update during the first track.
- The seek bar in general seemed a little behind the track and drifted over time (seen with all devices). Towards the end of the test, track transition was occuring at 8 seconds.

A very good result!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 06, 2025, 05:52:08 PM
"do not use RAW PCM" + "PCM - 16" bit still crashes mpd after a couple of seconds. This time (on a different pi) with a new error:
This pi is a Pi zero 2 W with a HiFiBerry DAC+ Zero. The one I had tested on so far was a Pi 3B with a HiFiBerry DAC+ Pro (I wanted to rule out the hardware).
Code
Mar 06 17:54 : exception: CURL failed: transfer closed with 34696704 bytes remaining to read
Mar 06 17:54 : decoder_thread: probing plugin pcm
Mar 06 17:54 : decoder: audio_format=44100:16:2, seekable=true
Mar 06 17:54 : client: [12] process command "status"
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "currentsong"
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "playlistinfo "1""
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "status"
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "currentsong"
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "playlistinfo "1""
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "status"
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "currentsong"
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "playlistinfo "1""
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "status"
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "currentsong"
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "playlistinfo "1""
Mar 06 17:54 : client: [12] command returned 0
Mar 06 17:54 : client: [12] process command "status"
Mar 06 17:54 : alsa_output: Decoder is too slow; playing silence to avoid xrun

Setting "force little endian for PCM streams" and "PCM - 24 bit" still yields noise for a few seconds and then crashes mpd.
Plugin log:
Code
796971; 95 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
796975; 96 Play - Z:\M4\Pixies\You’re So Impatient [Single]\02 Que Sera Sera.flac (http://192.168.1.5:49382/encode/5B95923D2C4EC020-2147483617.L24)
797235; 97 StateTimer - Playing,old=Stopped
797245; 98 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
797255; 100 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
797262; 101 GetEncodedFile[15] 192.168.1.5 - GET Z:\M4\Pixies\You’re So Impatient [Single]\02 Que Sera Sera.flac to 192.168.1.30; mime=audio/L24;rate=44100;channels=2,rate=44100,channels=2
797252; 99 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
797751; 102 SetNextAVTransportURI - Success - http://192.168.1.5:49382/encode/3ADE7E64C55A1DC90.L24
802559; 103 GetEncodedFile[15] - exit=0, playtime=5286
817075; 104 PostSoapRequest - 500,send=POST /uuid-d42bb9f2-5808-dbd2-61e3-2ccf67a5792c/ctl-urn-schemas-upnp-org-service-AVTransport-1 HTTP/1.1
Host: 192.168.1.30:49152
User-Agent: MusicBee UPnP Plugin
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Pause"
Content-Length: 290

<?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:Pause xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Pause></s:Body></s:Envelope>
817080; 105 SoapRequest:Pause:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0 - <?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>501</errorCode>
<errorDescription>Action Failed</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

817083; 106 Pause - status=500
mpd log:
Code
Mar 06 17:58 : client: [6] process command "addid "http://192.168.1.5:49382/encode/5B95923D2C4EC020-2147483617.L24" "0""
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "addtagid "3" "Artist" "Pixies""
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "addtagid "3" "Album" "You're So Impatient [Single]""
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "addtagid "3" "Title" "Que Sera Sera""
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "addtagid "3" "Track" "2""
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "addtagid "3" "Comment" "client=upmpdcli;""
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "status"
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "status"
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "stop"
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "playlistinfo"
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "play"
Mar 06 17:58 : playlist: play 0:"http://192.168.1.5:49382/encode/5B95923D2C4EC020-2147483617.L24"
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "status"
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "currentsong"
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : client: [6] process command "playlistinfo "1""
Mar 06 17:58 : client: [6] command returned 0
Mar 06 17:58 : decoder_thread: probing plugin pcm
Mar 06 17:58 : decoder: audio_format=44100:24:2, seekable=true
Mar 06 17:58 : alsa_output: opened hw:CARD=sndrpihifiberry,DEV=0 type=HW
Mar 06 17:58 : alsa_output: buffer: size=64..65536 time=1451..1486078
Mar 06 17:58 : alsa_output: period: size=32..32768 time=725..743039
Mar 06 17:58 : alsa_output: default period_time = buffer_time/4 = 500000/4 = 125000
Mar 06 17:58 : alsa_output: format=S24_LE (Signed 24 bit Little Endian)
Mar 06 17:58 : alsa_output: buffer_size=22050 period_size=4410
Mar 06 17:58 : output: opened "Hifiberry DAC" (alsa) audio_format=44100:24:2
Mar 06 17:58 : alsa_output: Decoder is too slow; playing silence to avoid xrun
Using flac as the encoder also plays the first song for a couple seconds and then crashes mpd. According to the log it instantly tried to play the 2nd queued track before getting stuck. Changing the flac encoder to the latest version (https://xiph.org/flac/download.html) also yielded no difference.

Plugin log:
Code
1543441; 155 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
1543444; 156 Play - Z:\M4\Great Lake Swimmers\In Pieces- An Acoustic Retrospective\16 Riverine.flac (http://192.168.1.5:49382/encode/9B671606869A561C-2147483565.flac)
1543489; 157 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
1543493; 158 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
1543496; 159 GetEncodedFile[23] 192.168.1.5 - GET Z:\M4\Great Lake Swimmers\In Pieces- An Acoustic Retrospective\16 Riverine.flac to 192.168.1.30; mime=audio/flac,rate=44100,channels=2
1543846; 160 StateTimer - Playing,old=Paused
1543862; 161 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
1544967; 162 SetNextAVTransportURI - Success - http://192.168.1.5:49382/encode/BBE0A499E270767A0.flac
1545841; 163 GetEncodedFile[23] - exit=0, playtime=2340
1622567; 164 PostSoapRequest - 500,send=POST /uuid-d42bb9f2-5808-dbd2-61e3-2ccf67a5792c/ctl-urn-schemas-upnp-org-service-AVTransport-1 HTTP/1.1
Host: 192.168.1.30:49152
User-Agent: MusicBee UPnP Plugin
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Pause"
Content-Length: 290

<?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:Pause xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Pause></s:Body></s:Envelope>
1622584; 165 SoapRequest:Pause:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0 - <?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>501</errorCode>
<errorDescription>Action Failed</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

1622587; 166 Pause - status=500

mpd log:
Code
Mar 06 18:11 : player: played "http://192.168.1.5:49382/files/867779E74D38F64Ap.flac"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "status"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "playlistinfo"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "clear"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "repeat "0""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "random "0""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "single "0""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "consume "0""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addid "http://192.168.1.5:49382/encode/9B671606869A561C-2147483565.flac" "0""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addtagid "3" "Artist" "Great Lake Swimmers""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addtagid "3" "Album" "In Pieces: An Acoustic Retrospective""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addtagid "3" "Title" "Riverine""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addtagid "3" "Track" "16""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addtagid "3" "Comment" "client=upmpdcli;""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "status"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "stop"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "play"
Mar 06 18:11 : playlist: play 0:"http://192.168.1.5:49382/encode/9B671606869A561C-2147483565.flac"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "status"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "currentsong"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "playlistinfo "1""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : decoder_thread: probing plugin flac
Mar 06 18:11 : decoder: audio_format=44100:16:2, seekable=true
Mar 06 18:11 : alsa_output: opened hw:CARD=sndrpihifiberry,DEV=0 type=HW
Mar 06 18:11 : alsa_output: buffer: size=64..65536 time=1451..1486078
Mar 06 18:11 : alsa_output: period: size=32..32768 time=725..743039
Mar 06 18:11 : alsa_output: default period_time = buffer_time/4 = 500000/4 = 125000
Mar 06 18:11 : alsa_output: format=S24_LE (Signed 24 bit Little Endian)
Mar 06 18:11 : alsa_output: buffer_size=22050 period_size=4410
Mar 06 18:11 : output: opened "Hifiberry DAC" (alsa) audio_format=44100:24:2
Mar 06 18:11 : output: converting in=44100:16:2 -> f=44100:24:2 -> out=44100:24:2
Mar 06 18:11 : client: [8] process command "repeat "0""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "random "0""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "single "0""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "consume "0""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addid "http://192.168.1.5:49382/encode/BBE0A499E270767A0.flac" "1""
Mar 06 18:11 : playlist: queue song 1:"http://192.168.1.5:49382/encode/BBE0A499E270767A0.flac"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addtagid "4" "Artist" "Laswell, Greg, Greg Laswell""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addtagid "4" "Album" "Covers [EP]""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addtagid "4" "Title" "The Killing Moon""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addtagid "4" "Track" "1""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "addtagid "4" "Comment" "client=upmpdcli;""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "status"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "currentsong"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "playlistinfo "1""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [7] process command "idle playlist player mixer options"
Mar 06 18:11 : client: [7] command returned 1
Mar 06 18:11 : client: [8] process command "status"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "currentsong"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "playlistinfo "1""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "status"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "currentsong"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "playlistinfo "1""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "playlistinfo"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [7] process command "idle playlist player mixer options"
Mar 06 18:11 : client: [7] command returned 1
Mar 06 18:11 : client: [8] process command "status"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "currentsong"
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "playlistinfo "1""
Mar 06 18:11 : client: [8] command returned 0
Mar 06 18:11 : client: [8] process command "status"
Mar 06 18:11 : alsa_output: Decoder is too slow; playing silence to avoid xrun

After some googling I tried increasing the buffer time and period time of the audio device as suggested here (https://github.com/MusicPlayerDaemon/MPD/issues/1263#issuecomment-922991442), but this did not resolve the issue. Someone else in the same thread thinks it's a general problem with the curl implementation (https://github.com/MusicPlayerDaemon/MPD/issues/1263#issuecomment-1488592772) of mpd.
So I guess the problem might lie there instead of in the plugin.

Setting "force native stream (global setting)" leads to gapless playback with no crashes so far. Although, as simbun has noted, MusicBee is not in sync with the playback progress on the upnp player, which is obvious when you have synced lyrics displayed while playing. In my case it lags behind the music 0,5-1 seconds and so far does not seem to drift over time (at least over the course of 2 test songs 3min each).

Btw. at least for me, the removal of the NextAVTransportURI when the "Upcoming Tracks" are edited in MusicBee doesn't work yet. I queued 2 tracks and instantly removed the second one from the queue. The upnp player still starts playing it when the first track ends while MusicBee is stuck "playing" without a wavebar and still has the 1st song active.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: RRoyce on March 06, 2025, 07:08:08 PM
RE. the Marantz PM7000n, enabling "force native" (all other options unchecked) results in a pop-up window stating "Unable to start playback". Library is mostly 16 bit flac, some mp3, both obviously supported by the Marantz.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on March 06, 2025, 08:18:17 PM
Good evening,

Plug'in 1.6

“Force little endian for PCM streams” works for 16bits files but not 24bits (slow motion track).
Title and author appear but not format

“Force native stream” noise

output format flac and 24bits don't work

24-bit files work with “output as a continuous stream”.

Loss of HEOS and device remote control (noise).
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 06, 2025, 09:54:12 PM
A very good result!

It seems 1.6 is kicking goals!. I'll take a look at the sync issue, I think I can improve on that.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 06, 2025, 10:01:36 PM

After some googling I tried increasing the buffer time and period time

I was going to suggest that the other day but when you stated you can stream songs without issue from another program, I thought that might come across as trying to fob off the issue so I was looking for possible issues with the plugin first. But considering how many other devices are now working it does seem to point to an issue with MPD. Especially as it seems to be directly related to encoded streams of different formats.

Btw. at least for me, the removal of the NextAVTransportURI when the "Upcoming Tracks" are edited in MusicBee doesn't work yet. I queued 2 tracks and instantly removed the second one from the queue. The upnp player still starts playing it when the first track ends while MusicBee is stuck "playing" without a wavebar and still has the 1st song active.

I just did a quick test to confirm and I'm seeing the same result, which is weird because that was working just fine the other day. I'll look into it.

edit: It's set to stop when the NowPlayingListEnded notification triggers. In the scenario above, that notification doesn't trigger until after the the device has played through the NextURI track. I'll have to set it so it stops if a track ends and the now playing list is playing the last track.

This is specifically only a problem if you remove the last track in the now playing list after it's been set as the NextURI.

The problem with NextURI is once you set it you can't unset it. At least I haven't seen a method in all the documentation I've read, you can't send through an empty URI. You just have to keep track of things on the controller and tell it to stop if you don't want it to play the NextURI. Actually it looks like I might be able to send a blank one through. I should be able to work something out.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 06, 2025, 10:05:01 PM
"Force little endian for PCM streams” works for 16bits files but not 24bits (slow motion track).
Title and author appear but not format

Do you have "do not use RAW PCM" checked as well? If not try that.

If that doesn't work I'll need to check your logs again.

edit: I think I've found the cause of this issue.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 06, 2025, 11:26:34 PM
I was going to suggest that the other day but when you stated you can stream songs without issue from another program, I thought that might come across as trying to fob off the issue so I was looking for possible issues with the plugin first. But considering how many other devices are now working it does seem to point to an issue with MPD. Especially as it seems to be directly related to encoded streams of different formats.
No worries, I'm just curious to find the error as these pis with mpd and upmpdcli have been in action in my house for well over a year without any playback issues. It's especially odd that the streams crash them since for example listening to an online radio stream via upnp (also from Symfonium) works flawlessly. My sister has listened to hours upon hours of BBC Radio 6 Music like that without issues.
And they work reliably enough to keep multi room audio in sync (you can stand between 2 rooms with different pis playing the same and not hear a delay/difference).

Actually it looks like I might be able to send a blank one through. I should be able to work something out.
Looks like Symfonium does it this way when you remove the last song from the queue while casting.
Code
Verbose/UPnPRenderer: Setting null next item
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 07, 2025, 12:24:39 AM
No worries, I'm just curious to find the error as these pis with mpd and upmpdcli have been in action in my house for well over a year without any playback issues.

Considering native streams work ok, there must be something going on with encoded streams from the plugins side that MPD doesn't like. I initially thought it was a PCM issue but if Flac is doing the same thing then it's an encoded stream issue. I was surprised no one mentioned the small noise I get at the start of encoded streams. If I try gapless playback with encoded streams that noise is obvious (it's just a small blip) between track transitions.  But all the replies so far seem to state that isn't occurring for other users.

The downside is I can't really do much directly if there is an issue with the stream data as the plugin handballs that off to a different library.

Google doesn't really give any solutions except for the settings you already tried. It seems MPD can sometimes just be a bit finicky with what it will work with.

I'll take a look at symfonium. Maybe I can find what's different between the streams.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 07, 2025, 04:32:14 AM
It's especially odd that the streams crash

Probably clutching at straws here but have you tried setting the Content length field to none or fixed?

Also sorry if you have already mentioned this but does it work with "output as continuous stream" checked?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 07, 2025, 09:16:12 AM
I was surprised no one mentioned the small noise I get at the start of encoded streams. If I try gapless playback with encoded streams that noise is obvious (it's just a small blip) between track transitions.  But all the replies so far seem to state that isn't occurring for other users.
I didn't hear the blip during my tests but if I play to foo_upnp then I do, although it's MUCH quieter and shorter than before.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 07, 2025, 10:57:02 AM
I didn't hear the blip during my tests but if I play to foo_upnp then I do, although it's MUCH quieter and shorter than before.

I get it with foobar and BubbleUpNP and yes, it's much smaller/quieter than the previous issue. But they are not related.

This is specifically an issue with encoded streams and it happens at the start of the stream. It's hard to pickup on the first track because it gets hidden by the click of the mouse when clicking play but if you use the keyboard shortcut (alt+enter) it's easier to pickup and more noticeable during track transitions because you are not clicking the mouse or hitting keys that might mask it.

But I have noticed some anomalies.
1. It doesn't always happen which is frustrating because intermittent crap sucks to diagnose. And I'm talking about the continuous tone tracks. I've got the initial flac versions and I made some mp3 versions. I set the profile to convert them both to PCM when streaming. While the noise does happen most of the time, sometimes it doesn't and the times it doesn't moves around between formats and track number.
2. When playing other tracks, if the start of the track is silence it doesn't happen.

I suspect it might be my hardware.

At this stage, I think I'm just going to forget about it. During normal playback I wouldn't notice it especially considering point 2 above, I'm only noticing it because I'm specifically listening for it and playing continuous tone tracks which emphasise the problem.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 07, 2025, 04:35:57 PM
Sorry for not answering before, for some reason I stopped receiving e-mail notifications from this thread, I must have unsubscribed by accident.

Many thanks for the "last track loop" explanation, I sent it to Eversolo, I hope it's the same issue and that they can fix it on their streamers.

I can also confirm version 1.6 is completely gapless with a Cambridge Audio MXN10 - tried both a Redbook album (16-44.1) and a 24-192 one.

Many thanks for all your effort, I think this makes Music Bee the first free Windows music player to have gapless UPNP without continuous stream :)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 07, 2025, 05:50:10 PM
I get it with foobar and BubbleUpNP and yes, it's much smaller/quieter than the previous issue. But they are not related.

This is specifically an issue with encoded streams and it happens at the start of the stream.
We are talking about the same thing, but when playing an encoded track I hear it at every track transition through foo_upnp, and that's whilst listening to the same tone tracks as you.

It's worse through Audiophile Renderer, especially a transition from file to encoded (one track without ReplayGain and one with), but I don't hear any of this through my other devices so I agree it's probably hardware related.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 07, 2025, 08:30:24 PM
Probably clutching at straws here but have you tried setting the Content length field to none or fixed?

Also sorry if you have already mentioned this but does it work with "output as continuous stream" checked?

Content length None plays a couple seconds and then yields:
Code
Mar 07 17:40 : decoder_thread: probing plugin flac
Mar 07 17:40 : decoder: audio_format=44100:16:2, seekable=true
Mar 07 17:40 : alsa_output: opened hw:CARD=sndrpihifiberry,DEV=0 type=HW
Mar 07 17:40 : alsa_output: buffer: size=4..65536 time=90..1486078
Mar 07 17:40 : alsa_output: period: size=2..32768 time=45..743039
Mar 07 17:40 : alsa_output: default period_time = buffer_time/4 = 500000/4 = 125000
Mar 07 17:40 : alsa_output: format=S24_LE (Signed 24 bit Little Endian)
Mar 07 17:40 : alsa_output: buffer_size=22050 period_size=4410
Mar 07 17:40 : output: opened "Hifiberry DAC Plus Pro" (alsa) audio_format=44100:24:2
Mar 07 17:40 : output: converting in=44100:16:2 -> f=44100:24:2 -> out=44100:24:2
Mar 07 17:40 : exception: CURL failed: transfer closed with 95026106 bytes remaining to read
Followed by the known xrun error.

Content length Fixed behaves the same way, crashing mpd after a couple seconds.

Continous stream works (tried with flac and default content length), but the progress bar in MusicBee is laggy (only refreshes the progress every ~5s).
Code
Mar 07 21:19 : decoder: audio_format=44100:16:2, seekable=true
Mar 07 21:19 : alsa_output: opened hw:CARD=sndrpihifiberry,DEV=0 type=HW
Mar 07 21:19 : alsa_output: buffer: size=4..65536 time=90..1486078
Mar 07 21:19 : alsa_output: period: size=2..32768 time=45..743039
Mar 07 21:19 : alsa_output: default period_time = buffer_time/4 = 500000/4 = 125000
Mar 07 21:19 : alsa_output: format=S24_LE (Signed 24 bit Little Endian)
Mar 07 21:19 : alsa_output: buffer_size=22050 period_size=4410
Mar 07 21:19 : output: opened "Hifiberry DAC Plus Pro" (alsa) audio_format=44100:24:2
Mar 07 21:19 : output: converting in=44100:16:2 -> f=44100:24:2 -> out=44100:24:2
Mar 07 21:19 : client: [8] process command "repeat "0""
Mar 07 21:19 : client: [8] command returned 0
Mar 07 21:19 : client: [8] process command "random "0""
Mar 07 21:19 : client: [8] command returned 0
Mar 07 21:19 : client: [8] process command "single "0""
Mar 07 21:19 : client: [8] command returned 0
Mar 07 21:19 : client: [8] process command "consume "0""
Mar 07 21:19 : client: [8] command returned 0
Mar 07 21:19 : client: [8] process command "addid "http://192.168.1.5:49382/encode/continuousstream0.L16" "1""
Mar 07 21:19 : playlist: queue song 1:"http://192.168.1.5:49382/encode/continuousstream0.L16"
Mar 07 21:19 : client: [8] command returned 0
Mar 07 21:19 : client: [8] process command "addtagid "4" "Artist" "MusicBee""
Mar 07 21:19 : client: [8] command returned 0
Mar 07 21:19 : client: [8] process command "addtagid "4" "Album" """
Mar 07 21:19 : client: [8] command returned 0
Mar 07 21:19 : client: [8] process command "addtagid "4" "Title" "Continuous Stream""
Mar 07 21:19 : client: [8] command returned 0
Mar 07 21:19 : client: [8] process command "addtagid "4" "Track" """
Mar 07 21:19 : client: [8] command returned 0
Mar 07 21:19 : client: [8] process command "addtagid "4" "Comment" "client=upmpdcli;""

It's all quite peculiar.
I mean for my personal use I'm happy with the never transcode option as that works gapless and without crashes for me. But feel free to ask me if you want me to test a specific combination of settings. I've written a little shell script that purges the mpd log and restarts mpd + upmpdcli so I can easily reset the state of the pi between tests.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 08, 2025, 03:58:55 AM

New version - mb_Upnp2025_1.7 (https://getmusicbee.com/addons/534/upnp-2025)

Changes
- Selecting Flac as the output format will now obey the max bit depth setting.
- Fixed an issue with the "force transcoding" option that could result in a stream not being transcoded.
- NextURI will now be cleared if the associated track is removed from the now playing list and there is nothing to replace it.
- Set DLNA header for FLAC files.

I can't fix the problem with the players being slightly out of sync. The UPnP command to get the renderer player position only returns the time down to the second, not the millisecond. There is always going to be a small discrepancy there.


But feel free to ask me if you want me to test a specific combination of settings.

I'm going to send you a PM for a test version.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 08, 2025, 04:31:46 AM
Many thanks for all your effort, I think this makes Music Bee the first free Windows music player to have gapless UPNP without continuous stream :)

Cool. From some google searches I saw a few quotes stating that intel recommended to not support SetNextAVTransportURI because it might cause problems. But there were no intel sources listed so it seems like more of an urban myth. So I guess some developers just didn't bother supporting it due to that.

It's worse through Audiophile Renderer

I think that program is a bit undercooked. It only supports flac and wav and I had constant issues with it.

I tried to use Symfonium on android but it wouldn't detect my plugin at all. Neither the Mediaserver or Renderer devices. Foobar showed up but nothing I did could get it to show Musicbee. Not sure what the issue is there.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 08, 2025, 08:59:27 AM
I can't fix the problem with the players being slightly out of sync. The UPnP command to get the renderer player position only returns the time down to the second, not the millisecond. There is always going to be a small discrepancy there.
Does UPnP Eventing provide track progress (for renderers that support it)? I don't know how often you're polling, or the latency of replies, but I'm sure with a few carefully timed requests you'd be able to work out when the second is ticking over. That or add half a second to every update :)

I tried to use Symfonium on android but it wouldn't detect my plugin at all. Neither the Mediaserver or Renderer devices. Foobar showed up but nothing I did could get it to show Musicbee. Not sure what the issue is there.
Symfonium doesn't index UPnP servers but it should pick up the renderer. That being said I spent approximately 30 seconds trying the MusicBee renderer with BubbleUPnP and Hi-Fi Cast and it wouldn't play from another server, so it's possible Symfonium is choosing not to display it.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on March 08, 2025, 02:51:22 PM
Hello,

Plug'in 1.7

“Force little endian for PCM streams” works for 16bit files but not 24bit (slow track). It seems that the plug'in blocks ‘sample rate’ at 48khz.
The title and author appear but not the format (only PCM).

“Force native stream” nothing

flac and 24-bit output formats don't work.

No change with Raw PCM.

24-bit files work with “output as a continuous stream” but are limited to a 48Khz “sample rate”.


Code
 0; 1 Initialise - 08/03/2025 14:12:10
26; 2 GetNetworkAddresses - 192.168.1.11,dns=True,name=Ethernet,speed=1000000000
26; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
26; 4 GetNetworkAddresses - http://192.168.1.11:49382
1360; 5 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
90211; 6 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
90215; 7 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
93952; 8 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006',valid=True
96612; 9 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
98707; 10 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
98708; 11 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
98718; 12 Activate - Marantz ND8006:
106802; 13 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483643.L24)
106961; 14 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
106961; 15 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
106962; 16 StateTimer - Loading,old=Stopped
107063; 17 GetEncodedFile[1] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L24;rate=96000;channels=2,rate=96000,channels=2
114926; 18 StateTimer - Playing,old=Loading
118140; 19 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/3C81C1D7E1FC32DA0.L24
154607; 20 GetEncodedFile[1] - exit=0, playtime=47543
156493; 21 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
156493; 22 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
156514; 23 GetEncodedFile[2] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\02 - Mes indépendances et ma révolte.flac to 192.168.1.12; mime=audio/L24;rate=96000;channels=2,rate=96000,channels=2
210781; 24 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\02 - Mes indépendances et ma révolte.flac (http://192.168.1.11:49382/encode/3C81C1D7E1FC32DA-2147483633.L24)
215849; 25 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/3C81C1D7E1FC32DA0.L24
218415; 26 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/AD676C14909C61190.L24
220480; 27 GetEncodedFile[2] - exit=0, playtime=63966
225357; 28 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
225357; 29 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
225358; 30 GetEncodedFile[3] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\02 - Mes indépendances et ma révolte.flac to 192.168.1.12; mime=audio/L24;rate=96000;channels=2,rate=96000,channels=2
225393; 31 GetEncodedFile[3] - exit=10054, playtime=34
225427; 32 StateTimer - Paused,old=Playing
225427; 33 SyncNewPlayState - Paused,mb=Stopped
225515; 34 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
225515; 35 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
225523; 36 StateTimer - Stopped,old=Paused
225534; 37 GetEncodedFile[4] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\03 - Un paradis pour moi.flac to 192.168.1.12; mime=audio/L24;rate=96000;channels=2,rate=96000,channels=2
225605; 38 GetEncodedFile[4] - exit=10054, playtime=71
254113; 39 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006' disconnected
257742; 40 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006',valid=True
257743; 41 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
257743; 42 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
257778; 43 Activate - Marantz ND8006:
260624; 44 SyncNewPlayState - Stopped,mb=Paused
262562; 45 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
262662; 46 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
263177; 47 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
264937; 48 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483625.L24)
265149; 49 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
265149; 50 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
265149; 51 GetEncodedFile[5] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L24;rate=96000;channels=2,rate=96000,channels=2
265168; 52 StateTimer - Loading,old=Stopped
267482; 53 GetEncodedFile[5] - exit=10054, playtime=2333
267697; 54 StateTimer - Stopped,old=Loading
267697; 55 SyncNewPlayState - Stopped,mb=Playing
277818; 56 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483618.L24)
278024; 57 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
278024; 58 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
278025; 59 GetEncodedFile[6] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L24;rate=96000;channels=2,rate=96000,channels=2
278040; 60 StateTimer - Loading,old=Stopped
278971; 61 GetEncodedFile[6] - exit=10054, playtime=946
279041; 62 StateTimer - Stopped,old=Loading
279042; 63 SyncNewPlayState - Stopped,mb=Playing
319052; 64 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
319154; 65 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
319663; 66 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
322553; 67 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483611.L24)
322734; 68 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
322735; 69 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
322735; 70 GetEncodedFile[7] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L24;rate=96000;channels=2,rate=96000,channels=2
322757; 71 StateTimer - Loading,old=Stopped
324360; 72 StateTimer - Stopped,old=Loading
324361; 73 SyncNewPlayState - Stopped,mb=Playing
324380; 74 GetEncodedFile[7] - exit=10054, playtime=1644
329729; 75 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483604.L24)
329909; 76 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
329909; 77 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
329909; 78 GetEncodedFile[8] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L24;rate=96000;channels=2,rate=96000,channels=2
329929; 79 StateTimer - Loading,old=Stopped
330826; 80 GetEncodedFile[8] - exit=10054, playtime=917
330929; 81 StateTimer - Stopped,old=Loading
330929; 82 SyncNewPlayState - Stopped,mb=Playing
353541; 83 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
353639; 84 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
354148; 85 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
355953; 86 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483597.L16)
356168; 87 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
356168; 88 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
356168; 89 GetEncodedFile[9] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L16;rate=96000;channels=2,rate=96000,channels=2
356196; 90 StateTimer - Loading,old=Stopped
356697; 91 StateTimer - Playing,old=Loading
356710; 92 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/3C81C1D7E1FC32DA0.L16
385905; 93 GetEncodedFile[9] - exit=10054, playtime=29737
430780; 94 SyncNewPlayState - Stopped,mb=Paused
432891; 95 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
432991; 96 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
433507; 97 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
434409; 98 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483590.L16)
434579; 99 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
434579; 100 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
434579; 101 GetEncodedFile[10] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L16;rate=96000;channels=2,rate=96000,channels=2
434602; 102 StateTimer - Loading,old=Stopped
435103; 103 StateTimer - Playing,old=Loading
435117; 104 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/3C81C1D7E1FC32DA0.L16
468875; 105 GetEncodedFile[10] - exit=10054, playtime=34295
488793; 106 Play - E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac (http://192.168.1.11:49382/encode/C525C627A618DDAD-2147483583.L16)
489005; 107 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
489005; 108 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
489006; 109 GetEncodedFile[11] 192.168.1.11 - GET E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
489022; 110 StateTimer - Loading,old=Paused
489523; 111 StateTimer - Playing,old=Loading
489548; 112 SetNextAVTransportURI - Cleared
515267; 113 GetEncodedFile[11] - exit=10054, playtime=26260
542075; 114 SyncNewPlayState - Stopped,mb=Paused
544196; 115 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
544296; 116 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
544816; 117 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
545800; 118 Play - E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac (http://192.168.1.11:49382/encode/C525C627A618DDAD-2147483576.L16)
545975; 119 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
545975; 120 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
545975; 121 GetEncodedFile[12] 192.168.1.11 - GET E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
545999; 122 StateTimer - Loading,old=Stopped
546500; 123 StateTimer - Playing,old=Loading
546511; 124 SetNextAVTransportURI - Cleared
563323; 125 GetEncodedFile[12] - exit=10054, playtime=17347
603825; 126 SyncNewPlayState - Stopped,mb=Paused
605948; 127 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
606049; 128 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
606567; 129 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
607982; 130 Play - E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac (E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac)
607983; 131 Play - startIndex ne peut pas être supérieur à la longueur de la chaîne.
Nom du paramètre : startIndex
647026; 132 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
647125; 133 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
647647; 134 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
648831; 135 Play - E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac (http://192.168.1.11:49382/encode/C525C627A618DDAD-2147483567.L16)
648989; 136 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
648989; 137 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
648990; 138 GetEncodedFile[13] 192.168.1.11 - GET E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
649009; 139 StateTimer - Loading,old=Stopped
649508; 140 StateTimer - Playing,old=Loading
649519; 141 SetNextAVTransportURI - Cleared
679538; 142 GetEncodedFile[13] - exit=10054, playtime=30548
710454; 143 SyncNewPlayState - Stopped,mb=Paused
712575; 144 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
712676; 145 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
713194; 146 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
714287; 147 Play - E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac (http://192.168.1.11:49382/encode/C525C627A618DDAD-2147483560.L16)
714444; 148 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
714445; 149 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
714445; 150 GetEncodedFile[14] 192.168.1.11 - GET E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
714477; 151 StateTimer - Loading,old=Stopped
714965; 152 StateTimer - Playing,old=Loading
714976; 153 SetNextAVTransportURI - Cleared
728667; 154 GetEncodedFile[14] - exit=10054, playtime=14221
732623; 155 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483553.L16)
732919; 156 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
732920; 157 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
732920; 158 GetEncodedFile[15] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L16;rate=96000;channels=2,rate=96000,channels=2
732932; 159 StateTimer - Loading,old=Paused
733446; 160 StateTimer - Playing,old=Loading
733460; 161 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/3C81C1D7E1FC32DA0.L16
745377; 162 GetEncodedFile[15] - exit=10054, playtime=12457
763802; 163 SyncNewPlayState - Stopped,mb=Paused
765924; 164 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
766020; 165 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
766540; 166 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
767687; 167 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483546.L16)
767905; 168 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
767905; 169 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
767906; 170 GetEncodedFile[16] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L16;rate=96000;channels=2,rate=96000,channels=2
767931; 171 StateTimer - Loading,old=Stopped
768430; 172 StateTimer - Playing,old=Loading
768443; 173 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/3C81C1D7E1FC32DA0.L16
786665; 174 GetEncodedFile[16] - exit=10054, playtime=18758
797444; 175 SyncNewPlayState - Stopped,mb=Paused
799560; 176 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
799660; 177 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
800189; 178 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
801006; 179 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483539.L16)
801194; 180 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
801194; 181 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
801194; 182 GetEncodedFile[17] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L16;rate=96000;channels=2,rate=96000,channels=2
801212; 183 StateTimer - Loading,old=Stopped
801726; 184 StateTimer - Playing,old=Loading
801740; 185 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/3C81C1D7E1FC32DA0.L16
823018; 186 GetEncodedFile[17] - exit=10054, playtime=21823
1018390; 187 SyncNewPlayState - Stopped,mb=Paused
1020510; 188 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1020609; 189 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1021117; 190 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1032359; 191 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1032359; 192 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1032360; 193 Browse - 0,BrowseDirectChildren,0,45,sort=
1032361; 194 Browse - 0,BrowseDirectChildren,0,50,sort=
1033259; 195 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1033259; 196 Browse - 1,BrowseDirectChildren,0,45,sort=
1033261; 197 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1033261; 198 Browse - 1,BrowseDirectChildren,0,50,sort=
1033314; 199 ProcessRequest:Exception - Impossible d'écrire les données sur la connexion de transport : Une connexion établie a été abandonnée par un logiciel de votre ordinateur hôte.
   à System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   à System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
   à System.IO.Stream.CopyTo(Stream destination)
   à MusicBeePlugin.Plugin.HttpResponse.SendSoapSuccess(HttpRequest request)
   à MusicBeePlugin.Plugin.UpnpService.ProceedControl(HttpRequest request)
   à MusicBeePlugin.Plugin.HttpServer.ProcessRequest(Object parameters)
1034659; 200 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1034659; 201 Browse - 1_104,BrowseDirectChildren,0,45,sort=
1034670; 202 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1034671; 203 Browse - 1_104,BrowseDirectChildren,0,50,sort=
1034717; 204 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1034717; 205 Browse - 1_104,BrowseDirectChildren,50,50,sort=
1036087; 206 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1036087; 207 Browse - 1_104,BrowseDirectChildren,26,45,sort=
1036088; 208 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1036088; 209 Browse - 1_104,BrowseDirectChildren,0,50,sort=
1036134; 210 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1036134; 211 Browse - 1_104,BrowseDirectChildren,50,50,sort=
1037051; 212 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1037051; 213 Browse - 1_104_56,BrowseDirectChildren,0,45,sort=
1037052; 214 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1037052; 215 Browse - 1_104_56,BrowseDirectChildren,0,50,sort=
1047236; 216 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1047236; 217 Browse - 1_104_56_6,BrowseDirectChildren,0,45,sort=
1047237; 218 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1047237; 219 Browse - 1_104_56_6,BrowseDirectChildren,0,50,sort=
1050606; 220 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
1050607; 221 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
1050928; 222 GetEncodedFile[18] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Hauteurs\01. En Sagittaire.flac to 192.168.1.12; mime=audio/L16;rate=48000;channels=2,rate=48000,channels=2
1089201; 223 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1089202; 224 Browse - 1_104_56,BrowseDirectChildren,0,45,sort=
1089202; 225 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1089202; 226 Browse - 1_104_56,BrowseDirectChildren,0,50,sort=
1105199; 227 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1105199; 228 Browse - 1_104_56_20,BrowseDirectChildren,0,45,sort=
1105215; 229 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1105215; 230 Browse - 1_104_56_20,BrowseDirectChildren,0,50,sort=
1109219; 231 GetEncodedFile[18] - exit=10054, playtime=58290
1109229; 232 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
1109229; 233 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
1109264; 234 GetEncodedFile[19] 192.168.1.11 - GET E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\01 - Mockingbird.flac to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
1155548; 235 GetEncodedFile[19] - exit=10054, playtime=46283
1183413; 236 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1183513; 237 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1184031; 238 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1195076; 239 Play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac (http://192.168.1.11:49382/encode/6012959B7E531B16-2147483526.L16)
1195288; 240 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
1195288; 241 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
1195288; 242 GetEncodedFile[20] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L16;rate=96000;channels=2,rate=96000,channels=2
1195311; 243 StateTimer - Loading,old=Stopped
1195810; 244 StateTimer - Playing,old=Loading
1195822; 245 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/3C81C1D7E1FC32DA0.L16
1215791; 246 GetEncodedFile[20] - exit=10054, playtime=20503
1224977; 247 Play - E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac (http://192.168.1.11:49382/encode/C525C627A618DDAD-2147483519.L16)
1225225; 248 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
1225225; 249 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
1225226; 250 GetEncodedFile[21] 192.168.1.11 - GET E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac to 192.168.1.12; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
1225247; 251 StateTimer - Loading,old=Paused
1225758; 252 StateTimer - Playing,old=Loading
1225769; 253 SetNextAVTransportURI - Cleared
1242790; 254 GetEncodedFile[21] - exit=10054, playtime=17564
1814826; 255 SyncNewPlayState - Stopped,mb=Paused
1816931; 256 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1817033; 257 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1817553; 258 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1823383; 259 Play - E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac (E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac)
1823383; 260 Play - startIndex ne peut pas être supérieur à la longueur de la chaîne.
Nom du paramètre : startIndex
1858912; 261 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1859013; 262 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1859507; 263 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1860168; 264 Play - E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac (E:\Musique\Autres\Larkin Poe\Larkin Poe - Bloom\11 - Bloom Again.flac)
1860168; 265 Play - startIndex ne peut pas être supérieur à la longueur de la chaîne.
Nom du paramètre : startIndex
1979386; 266 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1979488; 267 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
1979996; 268 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1983204; 269 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483506.wav)
1983368; 270 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
1983368; 271 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
1983369; 272 GetEncodedFile[22] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
1983382; 273 StateTimer - Loading,old=Stopped
1983886; 274 StateTimer - Playing,old=Loading
1983897; 275 SetNextAVTransportURI - Cleared
2008796; 276 GetEncodedFile[22] - exit=10054, playtime=25426
2008796; 277 Play - stream (http://192.168.1.11:49382/encode/continuousstream-2147483496.wav)
2009017; 278 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
2009017; 279 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
2009017; 280 GetEncodedFile[23] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
2009038; 281 StateTimer - Loading,old=Paused
2009539; 282 StateTimer - Playing,old=Loading
2009550; 283 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/continuousstream0.wav
2477239; 284 ProcessMessage 192.168.1.11 - device 'uuid:7df81f0b-b085-a0d6-05bc-7c0b182ae1a2:HmsPlay (DESKTOP-D224U1O)',valid=True
2478670; 285 Profile - Generic Device, useragent=Windows/10.0.22631 UPnP/1.0 DLNADOC/1.50 DLNADOC/1.00 SEC_HHP_HomeMediaServer(UPnP,DLNA,HTTP)/6.03 Home Media Server (UPnP, DLNA, HTTP)/6.03
2478898; 286 Profile - Generic Device, useragent=Windows/10.0.22631 UPnP/1.0 DLNADOC/1.50 DLNADOC/1.00 SEC_HHP_HomeMediaServer(UPnP,DLNA,HTTP)/6.03 Home Media Server (UPnP, DLNA, HTTP)/6.03
2478914; 287 ProcessRequest:Exception - Impossible d'écrire les données sur la connexion de transport : Une connexion existante a dû être fermée par l’hôte distant.
   à System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   à MusicBeePlugin.Plugin.HttpResponse.SendHeaders()
   à MusicBeePlugin.Plugin.HttpResponse.SendSoapSuccess(HttpRequest request)
   à MusicBeePlugin.Plugin.UpnpService.ProceedControl(HttpRequest request)
   à MusicBeePlugin.Plugin.HttpServer.ProcessRequest(Object parameters)
2479707; 288 Profile - Generic Device, useragent=
2479707; 289 Browse - 1_102_2_21_2,BrowseMetadata,0,0,sort=
2479708; 290 Proceed Control - Une exception a été levée par la cible d'un appel.
"urn:schemas-upnp-org:service:ContentDirectory:1#Browse"
<?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:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
         <ObjectID>1_102_2_21_2</ObjectID>
         <BrowseFlag>BrowseMetadata</BrowseFlag>
         <Filter>*</Filter>
         <StartingIndex>0</StartingIndex>
         <RequestedCount>0</RequestedCount>
         <SortCriteria />
      </u:Browse>
   </s:Body>
</s:Envelope>

2479708; 291 Proceed Control - La référence d'objet n'est pas définie à une instance d'un objet.
   à MusicBeePlugin.Plugin.ItemManager.TryLocateNode(String[] objectIds, TemplateNode& node, FolderNode& folder, Int32& lookupIdCount)
   à MusicBeePlugin.Plugin.ItemManager.Browse(Dictionary`2 headers, String objectId, BrowseFlag browseType, String filter, Int32 startingIndex, Int32 requestedCount, String sortCriteria, String& result, String& numberReturned, String& totalMatches)
   à MusicBeePlugin.Plugin.ContentDirectoryService.Browse(HttpRequest request, String ObjectID, String BrowseFlag, String Filter, String StartingIndex, String RequestedCount, String SortCriteria)
2479708; 292 ProcessRequest:SoapException:501 - Action Failed
   à MusicBeePlugin.Plugin.UpnpService.ProceedControl(HttpRequest request)
   à MusicBeePlugin.Plugin.HttpServer.ProcessRequest(Object parameters)
2479723; 293 Profile - Generic Device, useragent=
2479723; 294 Browse - 1_104_56_29,BrowseMetadata,0,0,sort=
2479724; 295 Proceed Control - Une exception a été levée par la cible d'un appel.
"urn:schemas-upnp-org:service:ContentDirectory:1#Browse"
<?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:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
         <ObjectID>1_104_56_29</ObjectID>
         <BrowseFlag>BrowseMetadata</BrowseFlag>
         <Filter>*</Filter>
         <StartingIndex>0</StartingIndex>
         <RequestedCount>0</RequestedCount>
         <SortCriteria />
      </u:Browse>
   </s:Body>
</s:Envelope>

2479724; 297 ProcessRequest:SoapException:501 - Action Failed
   à MusicBeePlugin.Plugin.UpnpService.ProceedControl(HttpRequest request)
   à MusicBeePlugin.Plugin.HttpServer.ProcessRequest(Object parameters)
2479725; 298 Profile - Generic Device, useragent=
2479725; 299 Browse - 1_104_56_4,BrowseMetadata,0,0,sort=
2479725; 302 ProcessRequest:SoapException:501 - Action Failed
   à MusicBeePlugin.Plugin.UpnpService.ProceedControl(HttpRequest request)
   à MusicBeePlugin.Plugin.HttpServer.ProcessRequest(Object parameters)
2479726; 303 Profile - Generic Device, useragent=
2479726; 304 Browse - 0,BrowseMetadata,0,0,sort=
2479726; 305 ProcessRequest:Exception - Impossible d'écrire les données sur la connexion de transport : Une connexion existante a dû être fermée par l’hôte distant.
   à System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   à MusicBeePlugin.Plugin.HttpResponse.SendHeaders()
   à MusicBeePlugin.Plugin.HttpResponse.SendSoapSuccess(HttpRequest request)
   à MusicBeePlugin.Plugin.UpnpService.ProceedControl(HttpRequest request)
   à MusicBeePlugin.Plugin.HttpServer.ProcessRequest(Object parameters)
2479727; 306 Profile - Generic Device, useragent=
2479727; 307 Browse - 1_104_56_1,BrowseMetadata,0,0,sort=
2479747; 309 Profile - Generic Device, useragent=
2479747; 310 Browse - 1_104_56_16,BrowseMetadata,0,0,sort=
2479748; 312 Profile - Generic Device, useragent=
2479748; 313 Browse - 19D6C5D2F929BDEC,BrowseMetadata,0,0,sort=
2479749; 315 Profile - Generic Device, useragent=
2479749; 316 Browse - 603869C34556E7BD,BrowseMetadata,0,0,sort=
2479750; 318 Profile - Generic Device, useragent=
2479750; 319 Browse - 48B5B7546C83066A,BrowseMetadata,0,0,sort=
2479751; 321 Profile - Generic Device, useragent=
2479751; 322 Browse - 2E5276637A101A1D,BrowseMetadata,0,0,sort=
2479752; 324 Profile - Generic Device, useragent=
2479752; 325 Browse - 54323842D316FB3C,BrowseMetadata,0,0,sort=
2479753; 327 Profile - Generic Device, useragent=
2479755; 328 Browse - D84804998B651627,BrowseMetadata,0,0,sort=
2479755; 330 Profile - Generic Device, useragent=
2479755; 331 Browse - 1D6C05379A5A6109,BrowseMetadata,0,0,sort=
2479756; 333 Profile - Generic Device, useragent=
2479756; 334 Browse - E7AF5AEBB7195215,BrowseMetadata,0,0,sort=
2479757; 336 Profile - Generic Device, useragent=
2479757; 337 Browse - B477D9649F8ABFDA,BrowseMetadata,0,0,sort=
2479758; 339 Profile - Generic Device, useragent=
2479758; 340 Browse - 791E2A975E3E9D69,BrowseMetadata,0,0,sort=
2479759; 342 Profile - Generic Device, useragent=
2479759; 343 Browse - 6D85E4DFDCB65BA1,BrowseMetadata,0,0,sort=
2479760; 345 Profile - Generic Device, useragent=
2479760; 346 Browse - 1D08FCA52B654E1B,BrowseMetadata,0,0,sort=
2479761; 348 Profile - Generic Device, useragent=
2479761; 349 Browse - 7F8A46F6C7F70400,BrowseMetadata,0,0,sort=
2479761; 351 Profile - Generic Device, useragent=
2479762; 352 Browse - 344BC628979C375E,BrowseMetadata,0,0,sort=
2479762; 354 Profile - Generic Device, useragent=
2479762; 355 Browse - 61509C45E52EA533,BrowseMetadata,0,0,sort=
2479763; 357 Profile - Generic Device, useragent=
2479763; 358 Browse - 121B5D09EC51687F,BrowseMetadata,0,0,sort=
2479764; 360 Profile - Generic Device, useragent=
2479764; 361 Browse - 9FDBD61F9EE1FAE9,BrowseMetadata,0,0,sort=
2479765; 363 Profile - Generic Device, useragent=
2479765; 364 Browse - D716E3E7FA545B91,BrowseMetadata,0,0,sort=
2479766; 366 Profile - Generic Device, useragent=
2479766; 367 Browse - C379C2BBC471A38D,BrowseMetadata,0,0,sort=
2479767; 369 Profile - Generic Device, useragent=
2479767; 370 Browse - 90BB45467F008A30,BrowseMetadata,0,0,sort=
2479767; 372 Profile - Generic Device, useragent=
2479768; 373 Browse - FA755CD6E999E120,BrowseMetadata,0,0,sort=
2479768; 375 Profile - Generic Device, useragent=
2479768; 376 Browse - FE8193CB6033307D,BrowseMetadata,0,0,sort=
2479769; 378 Profile - Generic Device, useragent=
2479769; 379 Browse - 5FF6BC46EC5C28CD,BrowseMetadata,0,0,sort=
2479770; 381 Profile - Generic Device, useragent=
2479770; 382 Browse - BF5AAC93C658CD58,BrowseMetadata,0,0,sort=
2479771; 384 Profile - Generic Device, useragent=
2479771; 385 Browse - 4530B489FD16EFE2,BrowseMetadata,0,0,sort=
2479772; 387 Profile - Generic Device, useragent=
2479772; 388 Browse - 6B4E94DAC6343A51,BrowseMetadata,0,0,sort=
2479773; 390 Profile - Generic Device, useragent=
2479773; 391 Browse - F8D3A5DD800E8196,BrowseMetadata,0,0,sort=
2479774; 393 Profile - Generic Device, useragent=
2479774; 394 Browse - 03D4B8F31CD5F798,BrowseMetadata,0,0,sort=
2479775; 396 Profile - Generic Device, useragent=
2479775; 397 Browse - 338B18199B1E01D2,BrowseMetadata,0,0,sort=
2479776; 399 Profile - Generic Device, useragent=
2479776; 400 Browse - 0064B9C07BC11E2B,BrowseMetadata,0,0,sort=
2479777; 402 Profile - Generic Device, useragent=
2479777; 403 Browse - D4E6A978563F57B3,BrowseMetadata,0,0,sort=
2479778; 405 Profile - Generic Device, useragent=
2479778; 406 Browse - 1D248326B872764D,BrowseMetadata,0,0,sort=
2479779; 408 Profile - Generic Device, useragent=
2479779; 409 Browse - DC99D9B8CDA99F1B,BrowseMetadata,0,0,sort=
2479781; 411 Profile - Generic Device, useragent=
2479782; 412 Browse - 963A06E7C99BB3C4,BrowseMetadata,0,0,sort=
2479783; 414 Profile - Generic Device, useragent=
2479783; 415 Browse - 3B02A4C3E64D4900,BrowseMetadata,0,0,sort=
2479784; 417 Profile - Generic Device, useragent=
2479784; 418 Browse - 128266A883CB7F0B,BrowseMetadata,0,0,sort=
2479784; 420 Profile - Generic Device, useragent=
2479785; 421 Browse - 1855181E9EA3341D,BrowseMetadata,0,0,sort=
2479785; 423 Profile - Generic Device, useragent=
2479785; 424 Browse - 35685356EE5C6195,BrowseMetadata,0,0,sort=
2479786; 426 Profile - Generic Device, useragent=
2479786; 427 Browse - 01D13ADFE193DD3C,BrowseMetadata,0,0,sort=
2479787; 429 Profile - Generic Device, useragent=
2479787; 430 Browse - 2F9B734C739C3AAE,BrowseMetadata,0,0,sort=
2479788; 432 Profile - Generic Device, useragent=
2479788; 433 Browse - 1CBD6A6DD0BB7D4F,BrowseMetadata,0,0,sort=
2479789; 435 Profile - Generic Device, useragent=
2479789; 436 Browse - 031FFE61F0385B03,BrowseMetadata,0,0,sort=
2479790; 438 Profile - Generic Device, useragent=
2479790; 439 Browse - 00C9B62EB674324C,BrowseMetadata,0,0,sort=
2479791; 441 Profile - Generic Device, useragent=
2479791; 442 Browse - D8E2CDA6597CB484,BrowseMetadata,0,0,sort=
2479792; 444 Profile - Generic Device, useragent=
2479792; 445 Browse - 038258E03A03F6A1,BrowseMetadata,0,0,sort=
2479793; 447 Profile - Generic Device, useragent=
2479793; 448 Browse - 3B0C3978569E089A,BrowseMetadata,0,0,sort=
2479794; 450 Profile - Generic Device, useragent=
2479794; 451 Browse - BEBBE7C36A345661,BrowseMetadata,0,0,sort=
2479794; 453 Profile - Generic Device, useragent=
2479795; 454 Browse - 893617733B782FD1,BrowseMetadata,0,0,sort=
2479795; 456 Profile - Generic Device, useragent=
2479795; 457 Browse - 75FBBE077B74B125,BrowseMetadata,0,0,sort=
2479796; 459 Profile - Generic Device, useragent=
2479797; 460 Browse - C906B4041B47B4E6,BrowseMetadata,0,0,sort=
2479797; 462 Profile - Generic Device, useragent=
2479797; 463 Browse - 2FDBCBBF530B071D,BrowseMetadata,0,0,sort=
2507550; 466 Profile - Generic Device, useragent=
2507550; 467 Browse - 0,BrowseDirectChildren,0,100,sort=
2508786; 469 Profile - Generic Device, useragent=
2508787; 470 Browse - 1,BrowseDirectChildren,0,100,sort=
2510242; 472 Profile - Generic Device, useragent=
2510242; 473 Browse - 1_104,BrowseDirectChildren,0,100,sort=
2512962; 475 Profile - Generic Device, useragent=
2512962; 476 Browse - 1_104_56,BrowseDirectChildren,0,100,sort=
2515914; 477 Profile - Generic Device, useragent=
2515914; 478 Browse - 1_104_56_6,BrowseDirectChildren,0,100,sort=
2520428; 479 Profile - Generic Device, useragent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
2537458; 480 Profile - Generic Device, useragent=
2537458; 481 Browse - CABA24C46C414504,BrowseMetadata,0,0,sort=
2537624; 483 GetEncodedFile[23] - exit=10054, playtime=528606
2538265; 484 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
2538270; 485 GetFile[24] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Hauteurs\01. En Sagittaire.flac to 192.168.1.12
2538270; 486 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
2723968; 487 GetFile[24] - exit=0, playtime=185697
2726726; 488 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
2726726; 489 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
2726726; 490 GetEncodedFile - Stream zero=/encode/continuousstream0.wav
2726726; 491 httpresponse - Code 404
2726727; 492 ProcessRequest:HttpException:404 - File not found
  


Translated with DeepL.com (free version)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 08, 2025, 03:25:01 PM
Does UPnP Eventing provide track progress (for renderers that support it)? I don't know how often you're polling, or the latency of replies, but I'm sure with a few carefully timed requests you'd be able to work out when the second is ticking over. That or add half a second to every update :)

The documentation specifically states that time/position values are not evented. Considering how crap some devices are at just the basic UPnP functionality, I'd hate to think how many actually implement eventing and do it properly. I think it's a losing battle. Even if I could improve it slightly it will probably produce varying results for users depending on their PC/network speed and device. I'll have a think on it.

Symfonium doesn't index UPnP servers but it should pick up the renderer. That being said I spent approximately 30 seconds trying the MusicBee renderer with BubbleUPnP and Hi-Fi Cast and it wouldn't play from another server, so it's possible Symfonium is choosing not to display it.

It picked up foobar immediately but not musicbee. The renderer probably needs some work, I was just playing around and figured someone could get some use out of it as a remote control for musicbee over UPnP, while it can be used to play a track from musicbee's library it's probably not the best thing to do with it. It can't be sent a track from another device so it's not really a true renderer device. I also haven't tested it in a while so some of the changes with Musicbee might have messed it up.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 08, 2025, 03:46:06 PM
“Force little endian for PCM streams” works for 16bit files but not 24bit (slow track). It seems that the plug'in blocks ‘sample rate’ at 48khz.
The title and author appear but not the format (only PCM).
It's not blocking the sample rate. You can see in the log it's set to 96000
GetEncodedFile[1] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12; mime=audio/L24;rate=96000;channels=2,rate=96000,channels=2

flac and 24-bit output formats don't work.

What happens. It seems to be playing so does it just produce white noise? If it is white noise does it sound different with "force little endian" checked?

24-bit files work with “output as a continuous stream” but are limited to a 48Khz “sample rate”.
Continuous stream are set to 16 bit.

I can play 192k/24bit 5.1 flac natively and encoded to foobar and it seems to work fine so it's looking like this is another Marantz quirk.

Although I did notice it downmixed it to stereo even though It's not set to do that so that's an issue I need to fix. If set to PCM 24 it keeps the 6 channels. With output set to flac it's downmixing.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 08, 2025, 06:30:11 PM
I'm going to send you a PM for a test version.
Sent you the results, at this point I think mpds curl implementation is just fickle.

Does UPnP Eventing provide track progress (for renderers that support it)? I don't know how often you're polling, or the latency of replies, but I'm sure with a few carefully timed requests you'd be able to work out when the second is ticking over. That or add half a second to every update :)
Alternatively you could add a configurable offset in the plugin settings +-xxx ms (assuming the delay is at least consistent). If the upnp renderer only reports seconds precision, you could first ping the upnp device 5 times, average the result, add 20ms to that (or use a minimum of 50ms, that's more than precise enough) and use it as a polling rate. Then poll over more than 1s to narrow down the moment the second value changes.
I just pinged 3 of the pis and the usual ping was 1ms with a single ping of 9ms as an outlier.
I would've liked to propose the solution to upnp delay with synced lyrics (which are most sensitive to this problem) that Symfonium uses here as well, but you probably have no way to influence the lyrics panel.
(https://i.imgur.com/K6uCeZR.jpeg)
With the + and - you can adjust the lyrics offset in Symfonium to compensate for upnp/bluetooth delays (or poorly synced lyrics) during playback.
I tried to use Symfonium on android but it wouldn't detect my plugin at all. Neither the Mediaserver or Renderer devices. Foobar showed up but nothing I did could get it to show Musicbee. Not sure what the issue is there.
If you open a support ticket on the Symfonium forum (https://support.symfonium.app/) with debug logs, Tolriq (the dev) will most likely be able to tell you why your plugin does not show up. I've used Symfonium to cast to the pis, an onkyo receiver, Kodi (running on my HTPC) and a couple smart TVs. It's upnp implementation is pretty mature and the sync usually pretty good too.

"- NextURI will now be cleared if the associated track is removed from the now playing list and there is nothing to replace it."
This does not work for me.
I select 2 songs, start playback and the 2nd song is set as nexturi:
Code
1756610; 109 Activate - MaltePi3B-UPnP/AV:http-get:*:audio/L16:DLNA.ORG_PN=LPCM,http-get:*:application/flac:*,http-get:*:application/x-flac:*,http-get:*:application/ogg:*,http-get:*:application/vnd.apple.mpegurl:*,http-get:*:application/x-mpegurl:*,http-get:*:audio/flac:*,http-get:*:audio/x-flac:*,http-get:*:audio/aac:*,http-get:*:audio/x-aiff:*,http-get:*:audio/aif:*,http-get:*:audio/aiff:*,http-get:*:audio/dff:*,http-get:*:audio/x-dff:*,http-get:*:audio/dsd:*,http-get:*:audio/x-dsd:*,http-get:*:audio/dsf:*,http-get:*:audio/x-dsf:*,http-get:*:audio/m4a:*,http-get:*:audio/x-m4a:*,http-get:*:audio/matroska:*,http-get:*:audio/x-matroska:*,http-get:*:audio/mp1:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mpeg:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/ogg:*,http-get:*:audio/vorbis:*,http-get:*:audio/x-ape:*,http-get:*:audio/ape:*,http-get:*:audio/x-monkeys-audio:*,http-get:*:audio/wav:*,http-get:*:audio/x-wav:*,http-get:*:audio/wave:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ogg:*,http-get:*:audio/x-scpls:*,http-get:*:audio/x-vorbis+ogg:*,http-get:*:audio/x-vorbis:*,http-get:*:audio/x-wavpack:*,http-get:*:video/mp4:*
1761238; 110 Play - Z:\M4\bôa\Race Of A Thousand Camels\03 Duvet.flac (http://192.168.1.5:49382/files/BB9D29AE1267C776p.flac)
1761271; 111 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
1761275; 112 GetFile[17] 192.168.1.5 - GET Z:\M4\bôa\Race Of A Thousand Camels\03 Duvet.flac to 192.168.1.13
1761280; 113 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
1761397; 114 StateTimer - Playing,old=Stopped
1761415; 115 SetNextAVTransportURI - Success - http://192.168.1.5:49382/files/46F076508A85353Fp.flac
1763493; 116 GetFile[17] - exit=0, playtime=2209
Upon removing the second song from "Upcoming Tracks" in MusicBee, nothing new is logged by the plugin and when the first song ends, the second one starts playing with MB stuck on displaying the first one.
Code
1941531; 117 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
1941537; 118 GetFile[18] 192.168.1.5 - GET Z:\M2\Lola Marsh\Someday Tomorrow Maybe\02 Only For A Moment.flac to 192.168.1.13
1941625; 119 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
1943255; 120 GetFile[18] - exit=0, playtime=1626
1964952; 121 SetNextAVTransportURI - Success - http://192.168.1.5:49382/files/46F076508A85353Fp.flac
The 2nd song is even repeated once before playback stops.
Code
2380779; 122 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
2380784; 123 GetFile[19] 192.168.1.5 - GET Z:\M2\Lola Marsh\Someday Tomorrow Maybe\02 Only For A Moment.flac to 192.168.1.13
2380798; 124 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
2382461; 125 GetFile[19] - exit=0, playtime=1660
2572578; 126 StateTimer - Stopped,old=Playing
2572583; 127 SyncNewPlayState - Stopped,mb=Playing
Even more interesting is that upon adding another song to the Upcoming Tracks and then switching to the next song, the 2nd song is set as the nexturi once again.
Code
2606134; 128 Play - Z:\M4\Razorlight\Slipway Fires\01 Wire to Wire.flac (http://192.168.1.5:49382/files/1140C30883183379p.flac)
2606167; 129 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
2606182; 130 GetFile[20] 192.168.1.5 - GET Z:\M4\Razorlight\Slipway Fires\01 Wire to Wire.flac to 192.168.1.13
2606211; 131 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
2606306; 132 StateTimer - Playing,old=Stopped
2606336; 133 SetNextAVTransportURI - Success - http://192.168.1.5:49382/files/46F076508A85353Fp.flac
2607943; 134 GetFile[20] - exit=0, playtime=1727
And when I start playback with only a single song and that song ends, the plugin probably goes into an infinite loop of attempting to set the nexturi. I had 12.000 lines of log after a couple seconds with:
Code
3074663; 1694 PostSoapRequest - 500,send=POST /uuid-677a63db-6686-01d7-34a0-b827eb0b7fae/ctl-urn-schemas-upnp-org-service-AVTransport-1 HTTP/1.1
Host: 192.168.1.13:49152
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>
3074667; 1695 SoapRequest:SetNextAVTransportURI:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0,NextURI=,NextURIMetaData= - <?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>501</errorCode>
<errorDescription>Action Failed</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

3074671; 1696 SetNextAVTransportURI - Failed -
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on March 08, 2025, 06:39:36 PM
Good evening,

I listen to my files on the Marantz with the media player on the Jellyfin server.
It works fine, it recognizes the Marantz and the Marantz displays the right information (title, artist, format).
There's a plug-in for DLNA, with foobar and other profiles.

I'm not a computer scientist so I don't know if this would help you, but if you want to have a look, it's open source. https://github.com/jellyfin/jellyfin-plugin-dlna.

Many thanks for all your effort.


Translated with DeepL.com (free version)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Moodymann on March 09, 2025, 06:13:17 AM
Foobar (foo_upnp) has a great Playback Stream Capture feature that works almost perfectly (synchronization of rewinding by the track's graphic wave, availability of crossfade and other player settings). In MB streaming of files via the plugin does not work. Who can help me understand how to set this up? First of all, I am interested in streaming a file to a device without precoding

Plugin settings https://imgur.com/W7V288N (https://imgur.com/W7V288N)
(https://imgur.com/W7V288N)



Code
2327297; 464 GetEncodedFile[58] 192.168.1.101 - GET G:\_labels\T\The Bunker New York\[BK039] Wata Igarashi - Kioku - 2019\01 - Wata Igarashi - Body.mp3 to 192.168.1.100; mime=audio/wav,rate=44100,channels=2
2327471; 465 GetEncodedFile[58] - exit=10054, playtime=174
2327601; 466 SetNextAVTransportURI - Success - http://192.168.1.101:49382/encode/A8E4B128D9470A790.wav
2327615; 467 Profile - Generic Device, useragent=stagefright/1.2 (Linux;Android 13)
2327616; 468 Profile - Generic Device, useragent=stagefright/1.2 (Linux;Android 13)
2327616; 469 GetEncodedFile[59] 192.168.1.101 - GET G:\_labels\T\The Bunker New York\[BK039] Wata Igarashi - Kioku - 2019\01 - Wata Igarashi - Body.mp3 to 192.168.1.100; mime=audio/wav,rate=44100,channels=2
2332752; 470 GetEncodedFile[59] - exit=0, playtime=5135
2340277; 471 Profile - foobar2000, useragent=foobar2000/1.x
2340487; 472 Profile - foobar2000, useragent=foobar2000/1.x
2460488; 473 Profile - BubbleUPnP, useragent=Windows7/6.1 UPnP/1.0 BubbleUPnPServer/0.9-update50
2460494; 474 Profile - BubbleUPnP, useragent=Windows7/6.1 UPnP/1.0 BubbleUPnPServer/0.9-update50
2614392; 475 SyncNewPlayState - Stopped,mb=Playing
2616638; 476 Profile - BubbleUPnP, useragent=Windows7/6.1 UPnP/1.0 BubbleUPnPServer/0.9-update50
2616682; 477 Profile - BubbleUPnP, useragent=Android/13 UPnP/1.0 BubbleUPnP/4.4.8
2617231; 478 Profile - BubbleUPnP, useragent=Windows7/6.1 UPnP/1.0 BubbleUPnPServer/0.9-update50
2617258; 479 Profile - BubbleUPnP, useragent=Android/13 UPnP/1.0 BubbleUPnP/4.4.8
2617259; 480 Profile - BubbleUPnP, useragent=Android/13 UPnP/1.0 BubbleUPnP/4.4.8
2620542; 481 Play - stream (http://192.168.1.101:49382/encode/continuousstream-2147483214.L16)
2621296; 482 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
2621296; 483 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
2621296; 484 GetEncodedFile[60] 192.168.1.101 - GET  to 192.168.1.100; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
2621314; 485 GetEncodedFile[60] - exit=10053, playtime=17
2621593; 486 StateTimer - Loading,old=Stopped
2622917; 487 Profile - Generic Device, useragent=Lavf/61.9.101
2622917; 488 Profile - Generic Device, useragent=Lavf/61.9.101
2622917; 489 GetEncodedFile - Stream zero=/encode/continuousstream-2147483214.l16
2622917; 490 httpresponse - Code 404
2623098; 492 StateTimer - Stopped,old=Loading
2623098; 493 SyncNewPlayState - Stopped,mb=Playing
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 09, 2025, 12:02:33 PM
Sent you the results, at this point I think mpds curl implementation is just fickle.

Thanks for testing that out, yeah that was my last hurrah on that issue. I don't think there is anything else I can do from my end.

Alternatively you could add

I've got an idea on how to improve the sync, pretty sure it will work ok.

This does not work for me.
I select 2 songs, start playback and the 2nd song is set as nexturi:

I think I know the cause of this, I need to do some changes to accommodate some notification changes Steven has made. Hopefully that should get it to work for everyone.

And when I start playback with only a single song and that song ends, the plugin probably goes into an infinite loop of attempting to set the nexturi. I had 12.000 lines of log after a couple seconds with:

That's definitely odd. If 3 NextURI calls fail in a row it set to stop trying. In any case, I think it's all linked to the same issue which I should be able to fix for the next version.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 09, 2025, 12:07:11 PM
I listen to my files on the Marantz with the media player on the Jellyfin server.
It works fine, it recognizes the Marantz and the Marantz displays the right information (title, artist, format).
There's a plug-in for DLNA, with foobar and other profiles.
I'm not a computer scientist so I don't know if this would help you, but if you want to have a look, it's open source. https://github.com/jellyfin/jellyfin-plugin-dlna.

I'll check it out to see if there is anything they specifically do for Marantz devices.

Edit: They don't do anything special. The marantz profile is set to direct play for flac so no transcoding. Which is what "force native streams" should do for you. I noticed this on one of your previous logs
Code
2538270; 485 GetFile[24] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Hauteurs\01. En Sagittaire.flac to 192.168.1.12
2538270; 486 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
2723968; 487 GetFile[24] - exit=0, playtime=185697

That's a flac file that natively streamed for over 3 minutes. What happened here? Did it play noise, silence? Seems odd you would let it go for 3 minutes if it wasn't working.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 09, 2025, 12:17:36 PM
I am interested in streaming a file to a device without precoding

Ok, you started off as if you were wanting to stream to foobar, but the log says you are using bubbleUPnP to play the file and finally you state you are trying to stream to a device.

What exactly are you wanting to do?

Note - you are using an old version of the plugin. If you update to the latest version you will also need to update musicbee to the latest version. If you're happy to do that there is a "force native stream" option that will most likely get it to work for you without having to mess around with profile settings.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: RRoyce on March 09, 2025, 05:22:27 PM
Code
Still having no luck with getting native stream to Marantz PM7000n. This is the upnp log when "force native stream" is checked:

[code0; 1 Initialise - 09/03/2025 15:58:32
10; 2 GetNetworkAddresses - 192.168.0.11,dns=True,name=Ethernet,speed=1000000000
10; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
10; 4 GetNetworkAddresses - http://192.168.0.11:49382
31; 5 ProcessMessage 192.168.0.13 - device 'uuid:a528d32c-1f50-1e51-0080-000678ad6d92:Marantz PM7000N',valid=True
34; 6 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
34; 7 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
60; 8 Activate - Marantz PM7000N:
28756; 9 Play - G:\StevieB\Music\Kamasi Washington\Fearless Movement\10 Interstellar Peace (The Last Stance).flac (G:\StevieB\Music\Kamasi Washington\Fearless Movement\10 Interstellar Peace (The Last Stance).flac)
28757; 10 Play - startIndex cannot be larger than length of string.
Parameter name: startIndex]

It does play as 16 bit PCM with "force little endian" checked. This is the upnp log in that case:

[code0; 1 Initialise - 09/03/2025 15:52:05
10; 2 GetNetworkAddresses - 192.168.0.11,dns=True,name=Ethernet,speed=1000000000
10; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
10; 4 GetNetworkAddresses - http://192.168.0.11:49382
48; 5 ProcessMessage 192.168.0.13 - device 'uuid:a528d32c-1f50-1e51-0080-000678ad6d92:Marantz PM7000N',valid=True
50; 6 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
51; 7 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
75; 8 Activate - Marantz PM7000N:
152768; 9 Play - G:\StevieB\Music\Kamasi Washington\Fearless Movement\10 Interstellar Peace (The Last Stance).flac (http://192.168.0.11:49382/encode/0A39967DBFB6CA19-2147483643.L16)
152992; 10 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
152992; 11 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
153041; 12 StateTimer - Loading,old=Stopped
153084; 13 GetEncodedFile[1] 192.168.0.11 - GET G:\StevieB\Music\Kamasi Washington\Fearless Movement\10 Interstellar Peace (The Last Stance).flac to 192.168.0.13; mime=audio/L16;rate=48000;channels=2,rate=48000,channels=2
154041; 14 StateTimer - Playing,old=Loading
154327; 15 SetNextAVTransportURI - Cleared
158118; 16 GetEncodedFile[1] - exit=10054, playtime=5033][/code]
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Moodymann on March 09, 2025, 05:31:25 PM
I am interested in streaming a file to a device without precoding

Ok, you started off as if you were wanting to stream to foobar, but the log says you are using bubbleUPnP to play the file and finally you state you are trying to stream to a device.

What exactly are you wanting to do?

Note - you are using an old version of the plugin. If you update to the latest version you will also need to update musicbee to the latest version. If you're happy to do that there is a "force native stream" option that will most likely get it to work for you without having to mess around with profile settings.

Oh, thanks. From my first experience, the new version of the plugin works better - I'll need to configure it. Force native stream is exactly what I expected from the plugin. I want to output sound to the upnp device, while controlling it from MB (including rewinding, smooth transitions between tracks, etc.). That is, I need streaming without decoding, that is, for the file to be played in the same format and quality as the original.
Now it works with some failures (for example, the next track in the MB list plays on the upnp device, but does not go to the next one in the MB shell)
When the "output as continuous stream" option is enabled, playback does not work for me.
For me, this is critical, since I use the desktop version for navigation and viewing the library

Sorry, I hope you understand what is written here))

Plugin settings https://imgur.com/IhhrzRM
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 09, 2025, 11:09:59 PM
28756; 9 Play - G:\StevieB\Music\Kamasi Washington\Fearless Movement\10 Interstellar Peace (The Last Stance).flac (G:\StevieB\Music\Kamasi Washington\Fearless Movement\10 Interstellar Peace (The Last Stance).flac)
28757; 10 Play - startIndex cannot be larger than length of string.
Parameter name: startIndex]

Looks like there is an issue processing the URI for a native stream. I'll check it out.

edit: It's had an issue processing the metadata for that track. If you could PM me a link to that specific track that would be very helpful. I'll change the next version so it provides more info when this occurs. The startindex error is due to other parts of the program receiving
Code
G:\StevieB\Music\Kamasi Washington\Fearless Movement\10 Interstellar Peace (The Last Stance).flac
when it's expecting something like this.
Code
http://192.168.0.11:49382/files/0A39967DBFB6CA19p.flac

I'll fix that as well.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 09, 2025, 11:17:10 PM
Now it works with some failures (for example, the next track in the MB list plays on the upnp device, but does not go to the next one in the MB shell)

Did you upgrade to the latest version of musicbee? There is an issue with some layout configurations that I should be able to fix in the next version.

You should uncheck the "enable remote control of musicbee" option as you won't need that.

What device are you sending it to? If you want the "continuous stream" option to work you probably need to untick the "force little endian" option.

From what you have said I don't think you should use the continuous stream option anyway.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: RRoyce on March 10, 2025, 09:25:26 AM
Re. Marantz PM7000n it's not just that specific track that causes the issue but all tracks, flac or mp3. This only happens with "force native stream" enabled. If not enabled, and "little endian" not checked either, then you get white noise. With "little endian" enabled it plays as 16 bit PCM. I did test casting to BubbleUPnP Android, and all play as expected, "force native stream" enabled or not. I can still send you that track if you wish, but not sure how helpful that will be.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 10, 2025, 10:05:31 AM
Re. Marantz PM7000n it's not just that specific track that causes the issue but all tracks, flac or mp3. This only happens with "force native stream" enabled. If not enabled, and "little endian" not checked either, then you get white noise. With "little endian" enabled it plays as 16 bit PCM. I did test casting to BubbleUPnP Android, and all play as expected, "force native stream" enabled or not. I can still send you that track if you wish, but not sure how helpful that will be.

It would be helpful. The error that is occurring when you have "force native stream" ticked is not actually related to the marantz device. Something is going wrong with the plugin trying to create the metadata for the track. This is before it attempts to send anything to the device. From your response it's happening to all your tracks but it would just help if I had an example track to use with my system to see if I can get the error to trigger. It will make it a hell of a lot easier to fix.

It is odd that it works for BubbleUPnP though. On the bubbleupnp UI does it state it's playing a flac file or a different format?

edit: if it's too much hassle sending files you can wait for the next version, it should give more info in the error log for me to work with.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: RRoyce on March 10, 2025, 10:53:26 AM
Sent you a link to the track.

With BubbleUPnP the UI shows flac if I'm sending flac, mp3 if the track is mp3.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 10, 2025, 11:05:43 AM
Sent you a link to the track.

With BubbleUPnP the UI shows flac if I'm sending flac, mp3 if the track is mp3.

Thanks. Of course the file works fine for me >.<

This line in the logs is the issue
Code
28756; 9 Play - G:\StevieB\Music\Kamasi Washington\Fearless Movement\10 Interstellar Peace (The Last Stance).flac (G:\StevieB\Music\Kamasi Washington\Fearless Movement\10 Interstellar Peace (The Last Stance).flac)

it should look like something like this this
Code
28756; 9 Play - G:\StevieB\Music\Kamasi Washington\Fearless Movement\10 Interstellar Peace (The Last Stance).flac (http://192.168.0.11:49382/files/0A39967DBFB6CA19p.flac)

Looking at the code, the only way that can possibly happen is if creating the metadata fails which is independent of the device. So it's bizarre it works for bubbleupnp if the profile settings are the same.

I'll check if I've missed something but probably not much I can do until the next version which should give me a better indication of the cause. It should be out tomorrow.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Moodymann on March 10, 2025, 02:22:12 PM
Now it works with some failures (for example, the next track in the MB list plays on the upnp device, but does not go to the next one in the MB shell)

Did you upgrade to the latest version of musicbee? There is an issue with some layout configurations that I should be able to fix in the next version.

You should uncheck the "enable remote control of musicbee" option as you won't need that.

What device are you sending it to? If you want the "continuous stream" option to work you probably need to untick the "force little endian" option.

From what you have said I don't think you should use the continuous stream option anyway.

Yes, I have a new version of MB. And I see that the plugin has started working better by small signs. My renderer is a phone based on Android + BubbleUPnP 4.4.8.
But continuous stream with these settings https://imgur.com/yRxgDLF does not work.

I'm still testing, but I noticed that when the "output as a continuous stream" function is disabled, the track being played is displayed in MB and in BubbleUPnp, but the title does not change with the next track. In MB, only the first track from the playlist plays. Then the playback progress freezes.


Code
1272148; 270 GetEncodedFile[31] 192.168.1.103 - GET  to 192.168.1.101; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
1272165; 271 GetEncodedFile[31] - exit=10054, playtime=17
1272349; 272 StateTimer - Loading,old=Stopped
1272465; 273 Profile - Generic Device, useragent=Lavf/61.9.101
1272465; 274 Profile - Generic Device, useragent=Lavf/61.9.101
1272465; 275 GetEncodedFile - Stream zero=/encode/continuousstream-2147483578.l16
1272465; 276 httpresponse - Code 404
1272867; 278 StateTimer - Stopped,old=Loading
1272867; 279 SyncNewPlayState - Stopped,mb=Playing
1274114; 280 Profile - BubbleUPnP, useragent=BubbleUPnP/4.4.8 okhttp/4.12.0
1277121; 281 Play - stream (http://192.168.1.103:49382/encode/continuousstream-2147483566.L16)
1277737; 282 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1277737; 283 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1277737; 284 GetEncodedFile[32] 192.168.1.103 - GET  to 192.168.1.101; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
1277757; 285 GetEncodedFile[32] - exit=10054, playtime=20
1277969; 286 StateTimer - Loading,old=Stopped
1278077; 287 Profile - Generic Device, useragent=Lavf/61.9.101
1278077; 288 Profile - Generic Device, useragent=Lavf/61.9.101
1278078; 289 GetEncodedFile - Stream zero=/encode/continuousstream-2147483566.l16
1278078; 290 httpresponse - Code 404
1278486; 292 StateTimer - Stopped,old=Loading
1278486; 293 SyncNewPlayState - Stopped,mb=Playing
1323653; 294 Profile - BubbleUPnP, useragent=Android/13 UPnP/1.0 BubbleUPnP/4.4.8
1324165; 295 Profile - BubbleUPnP, useragent=Android/13 UPnP/1.0 BubbleUPnP/4.4.8
1324560; 296 Play - stream (http://192.168.1.103:49382/encode/continuousstream-2147483554.L16)
1325209; 297 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1325210; 298 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1325210; 299 GetEncodedFile[33] 192.168.1.103 - GET  to 192.168.1.101; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
1325229; 300 GetEncodedFile[33] - exit=10054, playtime=19
1325406; 301 StateTimer - Loading,old=Stopped
1325530; 302 Profile - Generic Device, useragent=Lavf/61.9.101
1325531; 303 Profile - Generic Device, useragent=Lavf/61.9.101
1325531; 304 GetEncodedFile - Stream zero=/encode/continuousstream-2147483554.l16
1325531; 305 httpresponse - Code 404
1325927; 307 StateTimer - Stopped,old=Loading
1325928; 308 SyncNewPlayState - Stopped,mb=Playing
1406846; 309 Play - stream (http://192.168.1.103:49382/encode/continuousstream-2147483538.L16)
1407487; 310 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1407487; 311 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1407488; 312 GetEncodedFile[34] 192.168.1.103 - GET  to 192.168.1.101; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
1407505; 313 GetEncodedFile[34] - exit=10054, playtime=17
1407714; 314 StateTimer - Loading,old=Stopped
1408104; 315 Profile - Generic Device, useragent=Lavf/61.9.101
1408104; 316 Profile - Generic Device, useragent=Lavf/61.9.101
1408104; 317 GetEncodedFile - Stream zero=/encode/continuousstream-2147483538.l16
1408104; 318 httpresponse - Code 404
1408213; 320 StateTimer - Stopped,old=Loading
1408214; 321 SyncNewPlayState - Stopped,mb=Playing
1411360; 322 Play - stream (http://192.168.1.103:49382/encode/continuousstream-2147483523.L16)
1412008; 323 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1412008; 324 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1412009; 325 GetEncodedFile[35] 192.168.1.103 - GET  to 192.168.1.101; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
1412026; 326 GetEncodedFile[35] - exit=10054, playtime=17
1412230; 327 StateTimer - Loading,old=Stopped
1412688; 328 Profile - Generic Device, useragent=Lavf/61.9.101
1412689; 329 Profile - Generic Device, useragent=Lavf/61.9.101
1412689; 330 GetEncodedFile - Stream zero=/encode/continuousstream-2147483523.l16
1412689; 331 httpresponse - Code 404
1413250; 333 StateTimer - Stopped,old=Loading
1413250; 334 SyncNewPlayState - Stopped,mb=Playing
1577083; 335 Play - stream (http://192.168.1.103:49382/encode/continuousstream-2147483510.L16)
1577733; 336 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1577733; 337 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1577733; 338 GetEncodedFile[36] 192.168.1.103 - GET  to 192.168.1.101; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
1577751; 339 GetEncodedFile[36] - exit=10054, playtime=17
1577957; 340 StateTimer - Loading,old=Stopped
1578393; 341 Profile - Generic Device, useragent=Lavf/61.9.101
1578393; 342 Profile - Generic Device, useragent=Lavf/61.9.101
1578393; 343 GetEncodedFile - Stream zero=/encode/continuousstream-2147483510.l16
1578393; 344 httpresponse - Code 404
1578964; 346 StateTimer - Stopped,old=Loading
1578964; 347 SyncNewPlayState - Stopped,mb=Playing
1583220; 348 Play - stream (http://192.168.1.103:49382/encode/continuousstream-2147483495.L16)
1583858; 349 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1583859; 350 Profile - BubbleUPnP, useragent=BubbleUPnP UPnP/1.1
1583859; 351 GetEncodedFile[37] 192.168.1.103 - GET  to 192.168.1.101; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
1583876; 352 GetEncodedFile[37] - exit=10054, playtime=17
1584063; 353 StateTimer - Loading,old=Stopped
1584501; 354 Profile - Generic Device, useragent=Lavf/61.9.101
1584501; 355 Profile - Generic Device, useragent=Lavf/61.9.101
1584501; 356 GetEncodedFile - Stream zero=/encode/continuousstream-2147483495.l16
1584501; 357 httpresponse - Code 404
1585111; 359 StateTimer - Stopped,old=Loading
1585112; 360 SyncNewPlayState - Stopped,mb=Playing
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 10, 2025, 10:26:47 PM
But continuous stream with these settings https://imgur.com/yRxgDLF does not work.
You need to untick force native stream if you have continuous stream ticked. But based on what you wanted to do in your original post I'm sure you don't want to use continuous stream.

I'm still testing, but I noticed that when the "output as a continuous stream" function is disabled, the track being played is displayed in MB and in BubbleUPnp, but the title does not change with the next track. In MB, only the first track from the playlist plays. Then the playback progress freezes.

In bubbleUPnP
- go to the now playing tab.
- Tap the square icon on the top right next to the 3 dots menu
- A select renderer tab will pop up at the bottom, click the 3 dots menu button on the renderer you are using (probably the local renderer) and select settings
- Enable Gapless Playback.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Moodymann on March 11, 2025, 09:43:04 AM
But continuous stream with these settings https://imgur.com/yRxgDLF does not work.
You need to untick force native stream if you have continuous stream ticked. But based on what you wanted to do in your original post I'm sure you don't want to use continuous stream.

I'm still testing, but I noticed that when the "output as a continuous stream" function is disabled, the track being played is displayed in MB and in BubbleUPnp, but the title does not change with the next track. In MB, only the first track from the playlist plays. Then the playback progress freezes.

In bubbleUPnP
- go to the now playing tab.
- Tap the square icon on the top right next to the 3 dots menu
- A select renderer tab will pop up at the bottom, click the 3 dots menu button on the renderer you are using (probably the local renderer) and select settings
- Enable Gapless Playback.

With these settings https://imgur.com/6phXusa tracks do not start. I like how the "Playback Stream Capture" function worked in Foobar...
But nevertheless, thank you for your plugin, it works much better than its predecessor.
I would like to see a manual on the settings and scenarios for the plugin in the future.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 11, 2025, 10:28:10 AM

With these settings https://imgur.com/6phXusa tracks do not start. I like how the "Playback Stream Capture" function worked in Foobar...
But nevertheless, thank you for your plugin, it works much better than its predecessor.
I would like to see a manual on the settings and scenarios for the plugin in the future.

It could be the maximum picture size you have set. By default it's 160 but I haven't tested larger sizes so I don't know how large you can go with BubbleUPnP. Or you might need to set the content length to default instead of fixed.

You should probably change the user agent field to BubbleUPnP|stagefright (note the pipe symbol | between the 2 words)

Again, even if it did work, continuous stream will not give you the functionality you initially listed that you wanted.

At some point I do plan to put a user guide on the Musicbee wiki.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 11, 2025, 10:24:40 PM
New version - mb_Upnp2025_1.8 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- minimum version required 3.6.9201 (https://getmusicbee.com/patches/MusicBee36_Patched.zip)3.6.9201
- NextURI should now behave properly when altering the playing tracks list.
- SetNextAVTransport entries in the log now show the original URL so it's more clear which track has been set.
- Improved logging of Metadata errors.
- 5.1 encoded flac streams will no longer be downmixed to stereo unless "stereo only" is checked.
- improved playback syncing. It's not perfect and never will be but it's better than what it was. You may see a small fluctuation in the progress bar around the 1 second mark.

Even though Foobar can play a native 5.1 flac stream, it errors if you send it an encoded 5.1 flac stream. BubbleUPnP has no issue with the same stream. The foobar upnp log is insanely verbose and contains absolutely zero information about errors. I've created a post on Hydrogenaud.io

The solution for improving the playback sync increases network traffic for a small period when play first starts and during a track transition. I haven't gone too overboard so hopefully it doesn't cause any problems, particularly with older devices.

If RRoyce could attempt to play a native flac stream again and link the log that should help me sort that problem out.

Just a reminder, once you have finished any troubleshooting, don't forget to untick the debug log option.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: RRoyce on March 12, 2025, 07:39:42 AM
Re. Marantz PM7000n. Updated plugin to 1.8 and latest 3.6 patch.

This is the log with no options checked. Hear white noise.

Code
1; 1 Initialise - 12/03/2025 06:13:09
11; 2 GetNetworkAddresses - 192.168.0.11,dns=True,name=Ethernet,speed=1000000000
11; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
11; 4 GetNetworkAddresses - http://192.168.0.11:49382
39; 5 ProcessMessage 192.168.0.13 - device 'uuid:a528d32c-1f50-1e51-0080-000678ad6d92:Marantz PM7000N',valid=True
73093; 6 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
73094; 7 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
73122; 8 Activate - Marantz PM7000N:
86242; 9 Play - Input - G:\StevieB\Music\Kokoroko\Could We Be More\03 Ewà Inú.flac Output - (http://192.168.0.11:49382/encode/2B05989D52F42F8F-2147483643.L16)
86481; 10 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
86481; 11 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
86522; 12 StateTimer - Loading,old=Stopped
86575; 13 GetEncodedFile[1] 192.168.0.11 - GET G:\StevieB\Music\Kokoroko\Could We Be More\03 Ewà Inú.flac to 192.168.0.13; mime=audio/L16;rate=48000;channels=2,rate=48000,channels=2
86792; 14 StateTimer - Playing,old=Loading
86976; 15 SetNextAVTransportURI - Cleared
106255; 16 GetEncodedFile[1] - exit=10054, playtime=19678

This the log with "force native stream" checked. Hear nothing and track does not advance, though no pop-up window anymore.

[code0; 1 Initialise - 12/03/2025 06:17:01
10; 2 GetNetworkAddresses - 192.168.0.11,dns=True,name=Ethernet,speed=1000000000
10; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
10; 4 GetNetworkAddresses - http://192.168.0.11:49382
31; 5 ProcessMessage 192.168.0.13 - device 'uuid:a528d32c-1f50-1e51-0080-000678ad6d92:Marantz PM7000N',valid=True
34; 6 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
35; 7 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
65; 8 Activate - Marantz PM7000N:
11164; 9 DIDL Error - startIndex cannot be larger than length of string.
Parameter name: startIndex
11164; 10 Play - Input - G:\StevieB\Music\Kokoroko\Could We Be More\03 Ewà Inú.flac Output - ()][/code]

Don't know if it's helpful, but this is the log with "Little endian" checked, when it does play.

[code0; 1 Initialise - 12/03/2025 06:20:13
10; 2 GetNetworkAddresses - 192.168.0.11,dns=True,name=Ethernet,speed=1000000000
10; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
10; 4 GetNetworkAddresses - http://192.168.0.11:49382
30; 5 ProcessMessage 192.168.0.13 - device 'uuid:a528d32c-1f50-1e51-0080-000678ad6d92:Marantz PM7000N',valid=True
33; 6 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
33; 7 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
60; 8 Activate - Marantz PM7000N:
4955; 9 Play - Input - G:\StevieB\Music\Kokoroko\Could We Be More\03 Ewà Inú.flac Output - (http://192.168.0.11:49382/encode/2B05989D52F42F8F-2147483643.L16)
5180; 10 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
5180; 11 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
5226; 12 StateTimer - Loading,old=Stopped
5273; 13 GetEncodedFile[1] 192.168.0.11 - GET G:\StevieB\Music\Kokoroko\Could We Be More\03 Ewà Inú.flac to 192.168.0.13; mime=audio/L16;rate=48000;channels=2,rate=48000,channels=2
6499; 14 StateTimer - Playing,old=Loading
6742; 15 SetNextAVTransportURI - Cleared
29428; 16 GetEncodedFile[1] - exit=10054, playtime=24154
][/code]
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 12, 2025, 08:41:30 AM
11164; 9 DIDL Error - startIndex cannot be larger than length of string.
Parameter name: startIndex

I wasn't expecting that to produce the same error as last time. I thought the DIDL failing was causing that error somewhere else in the plugin and the DIDL error would be different....

Anyway it gives me something to look for. Thanks.

edit: Pretty sure I've found the issue. If I'm right it's most likely being triggered by the Marantz not advertising that it supports flac. Or possibly the way it advertises this information is not standard and the plugin can't read it.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 12, 2025, 09:25:27 AM
New version - mb_Upnp2025_1.8.1 (https://getmusicbee.com/addons/534/upnp-2025)

Changes
- Added a possible fix for devices that either don't advertise they support certain codecs or the plugin has issues reading that data.

RRoyce if you could do the native stream test again with a flac file. Fingers crossed this should get it working.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: RRoyce on March 12, 2025, 09:51:42 AM
Merry Xmas! All working now (with "force native stream" enabled). Plays both flac and mp3 without problem. The Marantz display indicates it is receiving original format.

Code
0; 1 Initialise - 12/03/2025 08:38:26
10; 2 GetNetworkAddresses - 192.168.0.11,dns=True,name=Ethernet,speed=1000000000
10; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
10; 4 GetNetworkAddresses - http://192.168.0.11:49382
36; 5 ProcessMessage 192.168.0.13 - device 'uuid:a528d32c-1f50-1e51-0080-000678ad6d92:Marantz PM7000N',valid=True
38; 6 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
39; 7 Profile - Marantz PM7000N, useragent=|LINUX UPnP/1.0 Denon-Heos/fc67c7b91c9f70d6c175610bb51c54463b1e5afa
62; 8 Activate - Marantz PM7000N:
9175; 9 Play - Input - G:\StevieB\Music\Kokoroko\Could We Be More\03 Ewà Inú.flac Output - (http://192.168.0.11:49382/files/2B05989D52F42F8Fp.flac)
9414; 10 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
9455; 11 StateTimer - Loading,old=Stopped
9506; 12 GetFile[1] 192.168.0.11 - GET G:\StevieB\Music\Kokoroko\Could We Be More\03 Ewà Inú.flac to 192.168.0.13
9506; 13 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
9873; 14 StateTimer - Playing,old=Loading
10083; 15 SetNextAVTransportURI - Cleared
37920; 16 GetFile[1] - exit=10054, playtime=28413
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 12, 2025, 10:01:17 AM
Merry Xmas! All working now (with "force native stream" enabled). Plays both flac and mp3 without problem. The Marantz display indicates it is receiving original format.

Sweet. I'll fix up the next version so it's more obvious in the log when that issue is occurring.

Happy days.

I just have to sort out Jean's issue (I think that's different to yours) and that's all the problem devices sorted for now.

Except Sonos devices,, I'm not going anywhere near that dumpster fire.

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: RRoyce on March 12, 2025, 10:18:41 AM
We appreciate your hard work. Thanks.

Sonos? What's that?  :D
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 12, 2025, 11:16:21 AM
Except Sonos devices,, I'm not going anywhere near that dumpster fire.

I have a couple of old Play 1's and they're working well, as I've always found them to with UPnP control points. I've only tested with 16/44.1 material, but playing, skipping and seeking are working, be it with native streams or encoded (replygain/crossfade).

If I seek within a track when playing to a WiiM renderer, playback of the current track does resume but it doesn't transition to the next track. Would you like to see a log (I think you originally said you wouldn't address seeking issues)?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 12, 2025, 11:51:44 AM
I have a couple of old Play 1's and they're working well, as I've always found them to with UPnP control points. I've only tested with 16/44.1 material, but playing, skipping and seeking are working, be it with native streams or encoded (replygain/crossfade).

I think it's more of an issue with newer devices. They have moved away from the DLNA/UPnP standard and from what I've read don't seem overly interested in fixing any issues in that regard. Based on the notes in Lyrion Music Server's source code, the Sonos do some really stupid crap with seeking and even If I wanted to entertain that nonsense, I don't think the workaround LMS use would be possible for me to implement with how the plugin works.

If I seek within a track when playing to a WiiM renderer, playback of the current track does resume but it doesn't transition to the next track. Would you like to see a log (I think you originally said you wouldn't address seeking issues)?

Seeking wasn't a priority but I will check it out if you provide the log. It's the Sonos seeking issue I'm not going to bother trying to fix.

I haven't done as much testing as I probably should have with all the changes I've made lately so It's possible some of those changes caused issues with seeking.

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on March 12, 2025, 01:57:15 PM
Hello,

version 1.8 idem RRoyce

Version 1.8.1

only “Force native stream”, and everything in 24 bits, for music everything works, sound and display (artist, title and format).

For radio, you still need “output as a continuous stream”.

Very good work, thank you
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Moodymann on March 12, 2025, 03:22:49 PM
https://imgur.com/7Fd0mK4
Does anyone know this?
With what settings can crossfade work, or is it not possible. There are no such settings in BubbleUPnP
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on March 12, 2025, 06:51:35 PM
Good evening,

I wrote too quickly.
When listening to a certain album, on Musicbee, only one song advances and on the Marantz two tracks start in a row and then the album stops.
On others, there's a one-track lag between Musicbee and the Marantz.
When the album is launched, Musicbee doubles the 1st track and everything shifts.

I enclose the log file

Code
 0; 1 Initialise - 12/03/2025 18:34:40
25; 2 GetNetworkAddresses - 192.168.1.11,dns=True,name=Ethernet,speed=1000000000
25; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
25; 4 GetNetworkAddresses - http://192.168.1.11:49382
41; 5 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006',valid=True
44; 6 Profile - Marantz ND8006 | AvegaMedia, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
44; 7 Profile - Marantz ND8006 | AvegaMedia, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
98; 8 Activate - Marantz ND8006:
1343; 9 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1441; 10 Profile - Marantz ND8006 | AvegaMedia, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
8062; 11 Play - Input - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac Output - (http://192.168.1.11:49382/files/6012959B7E531B16p.flac)
8223; 12 Profile - Marantz ND8006 | AvegaMedia, useragent=AvegaMediaServer/2.0 Linux/2.6
8252; 13 StateTimer - Loading,old=Stopped
8319; 14 GetFile[1] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac to 192.168.1.12
8319; 15 Profile - Marantz ND8006 | AvegaMedia, useragent=AvegaMediaServer/2.0 Linux/2.6
9058; 16 StateTimer - Playing,old=Loading
9440; 17 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/3C81C1D7E1FC32DAp.flac:E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\02 - Mes indépendances et ma révolte.flac
225198; 18 GetFile[1] - exit=0, playtime=216877
226613; 19 Profile - Marantz ND8006 | AvegaMedia, useragent=AvegaMediaServer/2.0 Linux/2.6
226645; 20 GetFile[2] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\02 - Mes indépendances et ma révolte.flac to 192.168.1.12
226645; 21 Profile - Marantz ND8006 | AvegaMedia, useragent=AvegaMediaServer/2.0 Linux/2.6
238005; 22 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/AD676C14909C6119p.flac:E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\03 - Un paradis pour moi.flac
467210; 23 GetFile[2] - exit=0, playtime=240565
468794; 24 Profile - Marantz ND8006 | AvegaMedia, useragent=AvegaMediaServer/2.0 Linux/2.6
468794; 25 GetFile[3] 192.168.1.11 - GET E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\03 - Un paradis pour moi.flac to 192.168.1.12
468810; 26 Profile - Marantz ND8006 | AvegaMedia, useragent=AvegaMediaServer/2.0 Linux/2.6
701299; 27 GetFile[3] - exit=0, playtime=232489
716045; 28 StateTimer - Stopped,old=Playing
716045; 29 SyncNewPlayState - Stopped,mb=Playing

  
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 12, 2025, 08:44:40 PM
For radio, you still need “output as a continuous stream”.

I haven't done any testing with radio streams but I expect as they are a continuous stream themselves, the plugin will always need to be set to continuous stream for them to work. I could change the plugin to always send them as continuous streams so it won't be necessary to change settings if you alternate between radio streams and normal tracks.

I enclose the log file

I'll probably need a screen shot of your now playing list before you click play to confirm what's happening there as the log looks relatively normal.

The log shows.
The following track is set to play - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\01 - Faire.flac
While that is playing the following track is set to play next - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\02 - Mes indépendances et ma révolte.flac
The first track plays for 3min 47 seconds and then switches to - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\02 - Mes indépendances et ma révolte.flac
While the second track is playing the following track is set to play next - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\03 - Un paradis pour moi.flac
The second track plays for 4 min and then switches to - E:\Musique\Chanson Française\Blondino\Blondino - Un paradis pour moi\03 - Un paradis pour moi.flac
This third track plays for 3 min 52 seconds and playback ends

The only thing that does seem odd is it doesn't seem to attempt to perform SetNextAVTransport while the third track is playing.

edit:
When the album is launched, Musicbee doubles the 1st track and everything shifts.

I know what can cause this but I thought I'd fixed it. I'll take another look.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 12, 2025, 08:49:01 PM
https://imgur.com/7Fd0mK4
Does anyone know this?
With what settings can crossfade work, or is it not possible. There are no such settings in BubbleUPnP

You need to use a continuous stream for crossfading to work. So you need to choose if you want crossfading or if you want native playback which you initially stated was a requirement, you can't have both.

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Moodymann on March 13, 2025, 01:07:06 PM
https://imgur.com/7Fd0mK4
Does anyone know this?
With what settings can crossfade work, or is it not possible. There are no such settings in BubbleUPnP

You need to use a continuous stream for crossfading to work. So you need to choose if you want crossfading or if you want native playback which you initially stated was a requirement, you can't have both.


Yes, I initially needed a continuous stream. But I can't find the settings to make it work.
Do I need to add the plugin port to the win 7 firewall?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 13, 2025, 02:12:27 PM
Yes, I initially needed a continuous stream. But I can't find the settings to make it work.
Do I need to add the plugin port to the win 7 firewall?

BubbleUPnP usually plays pretty much everything so there is a good chance your issues are windows 7 related. Windows 10 did change some fundamental network functions because the company I worked for at the time had a big argument with a software vendor, we had just paid a pretty big license fee and windows 10 broke the network functionality of the software and they wanted to charge us another license for a windows 10 version. Anyway, point being whatever they changed could be why the plugin isn't working for you.

At the risk of sounding like a prick, rocking windows 7 at this point is pretty nuts unless you have a specific piece of software that won't work in windows 10. If you're worried about all the telemetry/spy stuff that can be turned off. I'd be extremely surprised if your PC didn't run better on Windows 10 vs Windows 7 not to mention the massive security risk. You probably cant upgrade for free anymore but windows 10 keys are less than $20.

Windows 10 is amazing on older hardware which you must be running if you still have windows 7. Hell, it's amazing on new hardware, it gives better gaming frame rates than windows 11.

Sorry but I don't think I have it in me to troubleshoot a windows 7 install. It's over 15 years old at this point.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Moodymann on March 13, 2025, 02:39:33 PM
Yes, I initially needed a continuous stream. But I can't find the settings to make it work.
Do I need to add the plugin port to the win 7 firewall?

BubbleUPnP usually plays pretty much everything so there is a good chance your issues are windows 7 related. Windows 10 did change some fundamental network functions because the company I worked for at the time had a big argument with a software vendor, we had just paid a pretty big license fee and windows 10 broke the network functionality of the software and they wanted to charge us another license for a windows 10 version. Anyway, point being whatever they changed could be why the plugin isn't working for you.

At the risk of sounding like a prick, rocking windows 7 at this point is pretty nuts unless you have a specific piece of software that won't work in windows 10. If you're worried about all the telemetry/spy stuff that can be turned off. I'd be extremely surprised if your PC didn't run better on Windows 10 vs Windows 7 not to mention the massive security risk. You probably cant upgrade for free anymore but windows 10 keys are less than $20.

Windows 10 is amazing on older hardware which you must be running if you still have windows 7. Hell, it's amazing on new hardware, it gives better gaming frame rates than windows 11.

Sorry but I don't think I have it in me to troubleshoot a windows 7 install. It's over 15 years old at this point.
Thanks anyway. There are other modes of operation of the plugin besides the stream. I am happy with it.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 14, 2025, 11:18:17 AM
New version - mb_Upnp2025_1.8.2 (https://getmusicbee.com/addons/534/upnp-2025)

Changes
- Better logging of mime type errors, specifically when it cannot be verified if a device supports a mime type.
- Improvements to track transition handling for gapless playback.

I have no way of knowing if a device has transitioned to a NextUri track other than checking timers. I was doing a secondary check of comparing what the device had stored as the currentURI and NextURI. If they matched it was assumed it had transitioned. The logic for this falls over if you queue the same track multiple times. I think it will also cause problems if the device is a bit slow transitioning as the plugin was waiting until they matched. If it waited too long Musicbee would automatically start playing the same track from the start.

It would be great if the NextURI was set to null once the device switched as that would be a very easy way to ascertain if the device had switched to the next track. I think that is actually what is supposed to happen but the AvTransport documentation is worded poorly and from the devices I've tested, none do this. When the device transitions, it copies the NextURI to the CurrentURI so they are the same value until another NextURI is set.

So I have removed the currentURI/NextURI comparison check as it was pretty much pointless. The plugin/Musicbee will now just transition to the next track once a track ends with the assumption being the device has switched as well. I believe it should work better than it did previously. If the device is slow switching it should sync the track progress bar once it gets there and if something goes wrong with the transition it will get picked up pretty quickly on a playstate check that occurs regularly.

Eventing is another way of getting notified when it's transitioned but I feel like trying to support that functionality will be a massive headache. Some of these devices don't even support basic UPnP functionality properly so the odds they did eventing correct is slim.

edit: No changes to radio streams automatically being set to continuous streams in this version, I'll look at that in the next version.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on March 14, 2025, 07:18:03 PM
Hello,

version 1.8.2  idem version 1.8.1

the song hasn't started and this stops the rest of the list.

866449; 35 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/3557F57DA3E94307p.flac:E:\Musique\Chanson Française\Bernard Lavilliers\Bernard Lavilliers - Sous un soleil énorme\03. Je tiens d'elle.flac



Code
 1; 1 Initialise - 14/03/2025 18:10:00
23; 2 GetNetworkAddresses - 192.168.1.11,dns=True,name=Ethernet,speed=1000000000
23; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
23; 4 GetNetworkAddresses - http://192.168.1.11:49382
1339; 5 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
95550; 6 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006',valid=True
98004; 7 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
601210; 8 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
601210; 9 Profile - Marantz ND8006, useragent=|LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
601226; 10 Activate - Marantz ND8006:
612342; 11 Play - Input - stream Output - (http://192.168.1.11:49382/encode/continuousstream-2147483641.wav)
612576; 12 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
612576; 13 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
612577; 14 GetEncodedFile[1] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
612609; 15 StateTimer - Loading,old=Stopped
612836; 16 StateTimer - Playing,old=Loading
612855; 17 SetNextAVTransportURI - Success - http://192.168.1.11:49382/encode/continuousstream0.wav:E:\Musique\Chanson Française\Bernard Lavilliers\Bernard Lavilliers - Sous un soleil énorme\02. Voyages.flac
643182; 18 StateTimer - Paused,old=Playing
651617; 19 SyncNewPlayState - Stopped,mb=Paused
651693; 20 GetEncodedFile[1] - exit=10054, playtime=39116
653732; 21 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
653745; 22 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
653833; 23 Profile - Marantz ND8006, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
657406; 24 Play - Input - E:\Musique\Chanson Française\Bernard Lavilliers\Bernard Lavilliers - Sous un soleil énorme\01. Le cœur du monde.flac Output - (http://192.168.1.11:49382/files/535025555998162Fp.flac)
657628; 25 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
657657; 26 StateTimer - Loading,old=Stopped
657759; 27 GetFile[2] 192.168.1.11 - GET E:\Musique\Chanson Française\Bernard Lavilliers\Bernard Lavilliers - Sous un soleil énorme\01. Le cœur du monde.flac to 192.168.1.12
657760; 28 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
658240; 29 StateTimer - Playing,old=Loading
658469; 30 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/086EC385A9C351FFp.flac:E:\Musique\Chanson Française\Bernard Lavilliers\Bernard Lavilliers - Sous un soleil énorme\02. Voyages.flac
848278; 31 GetFile[2] - exit=0, playtime=190517
849675; 32 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
849675; 33 GetFile[3] 192.168.1.11 - GET E:\Musique\Chanson Française\Bernard Lavilliers\Bernard Lavilliers - Sous un soleil énorme\02. Voyages.flac to 192.168.1.12
849675; 34 Profile - Marantz ND8006, useragent=AvegaMediaServer/2.0 Linux/2.6
866449; 35 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/3557F57DA3E94307p.flac:E:\Musique\Chanson Française\Bernard Lavilliers\Bernard Lavilliers - Sous un soleil énorme\03. Je tiens d'elle.flac
1131969; 36 GetFile[3] - exit=0, playtime=282293
1151899; 37 StateTimer - Stopped,old=Playing
1151899; 38 SyncNewPlayState - Stopped,mb=Playing

Playlist
https://imgur.com/a/moDSUo5
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 14, 2025, 10:54:31 PM
the song hasn't started and this stops the rest of the list.
866449; 35 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/3557F57DA3E94307p.flac:E:\Musique\Chanson Française\Bernard Lavilliers\Bernard Lavilliers - Sous un soleil énorme\03. Je tiens d'elle.flac

Based on the log, the first 2 tracks on the list play through successfully. Is this correct?
Does everything display correctly on Musicbee while the first 2 tracks are playing?

With the info supplied so far it looks like the Marantz is stopping when attempting to play the 3rd track. The NextURI is getting set correctly so the device should just transition to that 3rd track automatically. The log isn't showing any errors from Musicbee's side.

As a test, can you create a playlist of the same tracks but change the play order so the third track is in position 2. Try playing that again and see if it stops on the same track.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on March 14, 2025, 11:43:28 PM
Quote
Based on the log, the first 2 tracks on the list play through successfully. Is this correct?
yes
Quote
Does everything display correctly on Musicbee while the first 2 tracks are playing?
yes

Quote
As a test, can you create a playlist of the same tracks but change the play order so the third track is in position 2. Try playing that again and see if it stops on the same track.
 i
dem

I reversed tracks 2 and 3 in the list.
Track 2, which has become 3, is displayed in the bottom bar in MusicBee but remains at 00:00. It does not start and the Marantz stops.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 15, 2025, 12:24:50 AM
I reversed tracks 2 and 3 in the list.
Track 2, which has become 3, is displayed in the bottom bar in MusicBee but remains at 00:00. It does not start and the Marantz stops.

So just to confirm, it played the first 2 tracks successfully and stopped again on the 3rd track?

If that is the case, I don't think there is much I can do there. The plugin is setting the NextURI successfully, Musicbee is switching to the 3rd track like it should but the device is not. When the plugin checks the play state of the device, it's returning that it has stopped so it stops Musicbee.

The device should be automatically switching over to the third track but it isn't. It's not even making a request for the file. This problem appears to be caused by the device and there isn't much I can do about that.

Maybe try a few different combinations of tracks and see if it always stops on the third one.

You could check "disable NextURI support". This will most likely work but you will lose gapless playback. You will probably need to restart Musicbee to make sure the setting change applies.


edit: Actually before you try those suggestions, there is something else I can try. I previously had a delay when setting the NextURI but with recent changes there is a scenario where it may be attempting to set a NextURI right when the device is switching tracks. That might be causing problems. Leave it with me.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 15, 2025, 01:19:33 AM
New version - mb_Upnp2025_1.8.3 (https://getmusicbee.com/addons/534/upnp-2025)

Changes
- The plugin will now only attempt to set the NextURI once it has confirmed the device has transitioned to the next track and added a small delay before setting NextURI to avoid possible device issues.


edit: I've noticed the progress bar sync isn't always occurring after a track transition. I'm looking into it.

edit2: Yeah, don't bother downloading this version. I'm overhauling the track transition code.... again. The recent changes highlighted some other issues that have been in the background unnoticed. I'll get another version out soonish that should handle it all a lot better.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 15, 2025, 11:22:33 AM
Before I put out the next version I wanted to set it up so radio streams default to a continuous stream so the user doesn't have to manually set it every time they want to play a radio stream vs normal tracks.

Musicbee actually reads the plugin's settings and provides an empty URL string to the plugin if continuous stream is set and the plugin knows what to do with that when continuous stream is set.

If you try and play a radio stream without continuous stream set, Musicbee will provide the URL to the radio stream eg) something like - http://www.abc.net.au/res/streaming/audio/aac/triplej.pls
This makes the plugin fall over as it's expecting a normal file path (or network path) when continuous stream is not set.

What I was planning on doing was checking if the URL started with "http" and setting it blank if that was the case.

Before I did that I just wanted to double check if that would cause issues. Is there any scenario where someone would have a library that uses URL's starting with HTTP? eg) Can musicbee be set to use a library at an offsite location requiring HTTP URL's to connect?

I could make it an optional thing but I'm trying to avoid that, the config page is already getting too busy with options.

edit: actually I imagine some people might be using a HTTP path to connect to their NAS instead of UNC paths. It might be better to check the path extension for stream formats instead. Nope, that's not going to work as some streams end in .mp3
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on March 15, 2025, 03:51:24 PM
Hello,

Quote
So just to confirm, it played the first 2 tracks successfully and stopped again on the 3rd track? 
yes


Radio playlist sites
“http://radio.pervii.com/fr/online-playlists-m3u.htm”
“https://fluxradios.blogspot.com/p/vlc-playlist.html”

Streaming works, and depending on the radio station, the tracks may or may not be displayed in MusiBee.
ex: “http://ouifm5.ice.infomaniak.ch/ouifm5.mp3”

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 15, 2025, 08:57:53 PM
Does anyone have the 1.6 file? 1.8.3 behaves erratically (repeats tracks, skips tracks, etc...), 1.6 was perfect. Thanks!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 15, 2025, 09:20:18 PM
Does anyone have the 1.6 file? 1.8.3 behaves erratically (repeats tracks, skips tracks, etc...), 1.6 was perfect. Thanks!

mb_Upnp2025_1.6.zip (https://www.mediafire.com/file/slljzi82afkwy12/mb_Upnp2025_1.6.zip/file)

I'll have another version out later today that should fix the 1.8.3 issues.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 15, 2025, 09:37:11 PM
Many thanks!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 15, 2025, 10:29:32 PM
New version - mb_Upnp2025_1.9 (https://getmusicbee.com/addons/534/upnp-2025)

Changes
- Fixed issues introduced with 1.8.3 and improved progress bar syncing further. It seems a lot better to me than previous versions.
- Progress bar will now re-sync after Seeking. Previously seeking could result in it going out of sync by half a second due to the UPnP limitation of only returning seconds for the play position.
- Radio streams will automatically switch to continuous play even if continuous play is unchecked. Unfortunately the 2 renderers I have for testing just will not play a radio stream. They drop out after a few seconds. So I can't really test it. The logic for deciding if it's a stream is if the file property kind flag's last 6 characters equal "Stream".

This version runs well for me, barring any serious problems for other users I'm going to let this version sit for a while and stop pushing out constant updates.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 15, 2025, 11:19:04 PM
It's still 1.8.3 at the link :)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on March 16, 2025, 04:30:31 PM
Hello,

version 1.9
Everything is working now.

music with “force nature stream "
Flac in 24bits, MP3
Streaming radio

many thank's
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 16, 2025, 04:48:59 PM
In my case, 1.9 is still erratic, back to 1.6 - just playing flac files to a MXN10 streamer.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 16, 2025, 10:46:25 PM
In my case, 1.9 is still erratic, back to 1.6 - just playing flac files to a MXN10 streamer.

I guess it will stay that way. I left my psychic powers in my other pants.

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 16, 2025, 10:55:32 PM
I left my psychic powers in my other pants.
gold
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 17, 2025, 12:05:44 AM
In my case, 1.9 is still erratic, back to 1.6 - just playing flac files to a MXN10 streamer.

I guess it will stay that way. I left my psychic powers in my other pants.



It's great as it is :)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 17, 2025, 04:05:48 AM
It's great as it is :)

Fair call. I've certainly broken my fair share of things by installing an update even though it was already working fine.

I'm looking at you Emby!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 17, 2025, 12:11:21 PM
It's great as it is :)

Fair call. I've certainly broken my fair share of things by installing an update even though it was already working fine.

I'm looking at you Emby!

Great!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 17, 2025, 03:08:21 PM
New version - mb_Upnp2025_1.9 (https://getmusicbee.com/addons/534/upnp-2025)

With 1.9 Sonos and WiiM (I haven't tried Volumio) stop after track 2. I've only tested with 'force native stream' as I'm a bit tight on time and both were working with 1.8.1.

WiiM log
Code
0; 1 Initialise - 17/03/2025 13:56:47
101; 7 ProcessMessage 192.168.1.137 - device 'uuid:FF98F09C-E144-D1DA-CB98-6867FF98F09C:WiiM Pro-60F6',valid=True
105; 8 Profile - WiiM Home App, useragent=|Linux/4.9.113
105; 9 Profile - WiiM Home App, useragent=|Linux/4.9.113
128; 10 Activate - WiiM Pro-60F6:http-get:*:audio/wav:DLNA.ORG_PN=LPCM,http-get:*:audio/x-wav:DLNA.ORG_PN=LPCM,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3X,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO,http-get:*:audio/mpeg:DLNA.ORG_PN=MP2_MPS,http-get:*:audio/mp3:*,http-get:*:audio/wma:*,http-get:*:audio/mpeg:*,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS_320,http-get:*:audio/m4a:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/aac:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/ac3:DLNA.ORG_PN=AC3,http-get:*:audio/ogg:*,http-get:*:audio/ape:*,http-get:*:audio/x-ape:*,http-get:*:audio/flac:*
5797; 11 Play - Input - D:\MUSIC_EXAMPLE\MusicBee Test\music\LatestTest\LONG_TONE#01.flac Output - (http://192.168.1.12:49382/files/FBB0A689829191C4p.flac)
6066; 12 Profile - WiiM Pro, useragent=Lavf/58.45.100
6076; 13 GetFile[1] 192.168.1.12 - GET D:\MUSIC_EXAMPLE\MusicBee Test\music\LatestTest\LONG_TONE#01.flac to 192.168.1.137
6077; 14 Profile - WiiM Pro, useragent=Lavf/58.45.100
6094; 15 GetFile[1] - exit=0, playtime=15
6167; 16 StateTimer - Loading,old=Stopped
6390; 17 StateTimer - Playing,old=Loading
8773; 18 SetNextAVTransportURI - Success - http://192.168.1.12:49382/files/F06F2D2A7BFC8927p.flac:D:\MUSIC_EXAMPLE\MusicBee Test\music\LatestTest\LONG_TONE#02.flac
8884; 19 Profile - WiiM Pro, useragent=Lavf/58.45.100
8886; 20 GetFile[2] 192.168.1.12 - GET D:\MUSIC_EXAMPLE\MusicBee Test\music\LatestTest\LONG_TONE#02.flac to 192.168.1.137
8889; 21 Profile - WiiM Pro, useragent=Lavf/58.45.100
8902; 22 GetFile[2] - exit=0, playtime=11
40887; 23 StateTimer - Stopped,old=Playing
40888; 24 SyncNewPlayState - Stopped,mb=Playing
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 17, 2025, 09:59:06 PM
New version - mb_Upnp2025_1.9 (https://getmusicbee.com/addons/534/upnp-2025)

Changes
- Fixed issues introduced with 1.8.3 and improved progress bar syncing further. It seems a lot better to me than previous versions.
- Progress bar will now re-sync after Seeking. Previously seeking could result in it going out of sync by half a second due to the UPnP limitation of only returning seconds for the play position.
- Radio streams will automatically switch to continuous play even if continuous play is unchecked. Unfortunately the 2 renderers I have for testing just will not play a radio stream. They drop out after a few seconds. So I can't really test it. The logic for deciding if it's a stream is if the file property kind flag's last 6 characters equal "Stream".

This version runs well for me, barring any serious problems for other users I'm going to let this version sit for a while and stop pushing out constant updates.
Is the syncing supposed to happen nonstop?
The sync doesn't drift but with synced lyrics it's a bit of a wild ride to read along haha.

(https://i.imgur.com/t3qQ9Bz.gif)
The playback itself works flawlessly for me (with force original quality). Listened to 3 albums in a row like that today.

Might be related to the fact that it's still spamming the log with tens of thousands of errors.

To be exact, the error spamming only occurs when the last track in Upcoming Tracks is playing. I think it infinitely tries and fails to set an empty SetNextAVTransportURI.

Here's me playing 2 songs and as soon as the 2nd starts playing, the spam commences.
Code
25739142; 1142 Play - Input - Z:\M3\Debney, John\The Halloween Tree (Original Motion Picture Score)\01 Main Title  Introduction.flac Output - (http://192.168.1.5:49382/files/0706C28B2CCB0D09p.flac)
25739163; 1143 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
25739171; 1144 GetFile[38] 192.168.1.5 - GET Z:\M3\Debney, John\The Halloween Tree (Original Motion Picture Score)\01 Main Title  Introduction.flac to 192.168.1.13
25739184; 1145 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
25739390; 1146 StateTimer - Playing,old=Paused
25740099; 1147 GetFile[38] - exit=0, playtime=896
25740255; 1148 SetNextAVTransportURI - Success - http://192.168.1.5:49382/files/7CA19E0E9577FDCCp.flac:Z:\M3\Debney, John\The Halloween Tree (Original Motion Picture Score)\02 Getting Ready For Halloween.flac
25824977; 1149 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
25824983; 1150 GetFile[39] 192.168.1.5 - GET Z:\M3\Debney, John\The Halloween Tree (Original Motion Picture Score)\02 Getting Ready For Halloween.flac to 192.168.1.13
25825079; 1151 Profile - Generic Device, useragent=Music Player Daemon 0.23.12
25826059; 1152 GetFile[39] - exit=0, playtime=976
25846620; 1153 PostSoapRequest - 500,send=POST /uuid-677a63db-6686-01d7-34a0-b827eb0b7fae/ctl-urn-schemas-upnp-org-service-AVTransport-1 HTTP/1.1
Host: 192.168.1.13:49152
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>
25846626; 1154 SoapRequest:SetNextAVTransportURI:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0,NextURI=,NextURIMetaData= - <?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>501</errorCode>
<errorDescription>Action Failed</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

25846631; 1155 SetNextAVTransportURI - Failed -

When there is at least 1 more track in the Upcoming Tracks, the sync works as intended and doesn't go back and forth. So I think the syncing part should be fine. The error spam also starts when I remove all but the playing track from Upcoming Tracks.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 17, 2025, 10:34:13 PM
New version mb_Upnp2025_1.9.1 (https://getmusicbee.com/addons/534/upnp-2025)

Changes
- Some small changes to hopefully fix simbun's issues.

Here is mb_Upnp2025_1.8.1.zip (https://www.mediafire.com/file/9887ode47jmffyv/mb_Upnp2025_1.8.1.zip/file) if you need to roll back to that version.

1.9.1 will not fix Casual Tea's problem.

I suspect the issue there is your device doesn't accept receiving a blank NextURI which is what the plugin sends when there is no next track to play. Once the device errors it's not responding correctly for the sync information. Actually it looks like the NextURIMetadata field is being set as a dash when the NextURI is blank. That could be the problem.

edit: Actually the dash is only added when it's logging the error, NextURIMetadata is sent through as an empty string. I still think attempting to set a blank NextURI is the issue for you though. I'll see what I can do there.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 18, 2025, 01:18:48 AM
I went through the source code of upmpdcli. I hate trying to navigate C++ code.... Looks like this is the problem in upmpd.cxx starting at line 621

Code
it = setnext? sc.args.find("NextURI") : sc.args.find("CurrentURI");
if (it == sc.args.end() || it->second.empty()) {
return UPNP_E_INVALID_PARAM;
}

It's returning "UPNP_E_INVALID_PARAM if the NextURI string is empty.

The problem is "UPNP_E_INVALID_PARAM" is never declared anywhere else in the code, it doesn't have a value linked to it anywhere and I can't see any handling of a call and what it does when that value is returned. As upmpdcli is a front end for Music Player Deamon, I figured it must be something MPD uses. I went through the MPD source code and there is no reference to that response at all. I guess it's some fixed value in Linux?

None of that answers why the plugin creates thousands of log entries. It's configured so if the response to the SetNextAVTransportURI is not 200, it will only try 3 times before it stops trying completely. And even if that failsafe didn't kick in, it's set to run on a fixed System Timer so the absolute most it should be logging is 10x per second. I just can't see any way for the SetNext code to be executed thousands of times. It's bizarre.

All I can do is ad an option so the plugin doesn't send a blank NextURI but that might cause the player to just repeat the last song over and over again. Musicbee is supposed to stop if I call NextTrackPlayStarted and there is no next track in the now playing list so that might make everything work ok for you.

edit: looks like that response code is part of libupnp, it's a neverending rabbit hole....
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 18, 2025, 04:17:28 AM
All I can do is ad an option so the plugin doesn't send a blank NextURI but that might cause the player to just repeat the last song over and over again. Musicbee is supposed to stop if I call NextTrackPlayStarted and there is no next track in the now playing list so that might make everything work ok for you.

edit: looks like that response code is part of libupnp, it's a neverending rabbit hole....
I've set upmpdcli to debug level logging and captured what happens when MusicBee clears the nexturi. When removing the next song from Upcoming Tracks, the next song is correctly dropped by upmpdcli/mpd.
upmpdcli log:
Code
:4:../libupnpp/device/device.cxx:434::UPNP_CONTROL_ACTION_REQUEST: SetNextAVTransportURI args: InstanceID = 0
NextURI =
NextURIMetaData =

:4:../src/avtransport.cxx:396::Set(next)AVTransportURI: next 1 uri  metadata[]
:4:../src/mpdcli.cxx:886::MPDCli::repeat:0
:4:../src/mpdcli.cxx:910::MPDCli::random:0
:4:../src/mpdcli.cxx:922::MPDCli::single:0
:4:../src/mpdcli.cxx:898::MPDCli::consume:0
:4:../src/mpdcli.cxx:1063::MPDCli::deletePosRange [1, 2[
:4:../src/mpdcli.cxx:983::MPDCli::insert at :1 uri
:5:../src/mpdcli.cxx:254::MPDCli::eventloop: mpd_run_idle_mask: 4
:2:../src/mpdcli.cxx:336::(m_lastinsertid = mpd_run_add_id_to(m_conn, uri.c_str(), (unsigned)pos)) != -1 failed: No such song
:2:../src/mpdcli.cxx:339::(m_lastinsertid = mpd_run_add_id_to(m_conn, uri.c_str(), (unsigned)pos)) != -1 server error: 50
:2:../libupnpp/device/device.cxx:467::UpnpDevice: Action failed:  code -911
:4:../src/mpdcli.cxx:181::MPDCli::pollerCtl: mpd is playing
:5:../src/avtransport.cxx:363::AVTransport::onMpdEvent()
:4:../src/mpdcli.cxx:1124::MPDCli::getQueueData
:4:../src/mpdcli.cxx:1104::MPDCli::getQueueSongs: 1 songs
:4:../src/ohplaylist.cxx:262::OHPlaylist::makeIdArray: dropping uri http://192.168.1.5:49382/files/2BDE9E2934676BABp.flac
:4:../src/ohplaylist.cxx:269::OHPlaylist::makeIdArray: saving metacache
:5:../src/ohservice.cxx:69::Playlist: change: IdArray -> AAAAAg==
:4:../src/ohmetacache.cxx:98::dmcacheSave: got save task: 1 entries to /var/cache/upmpdcli//metacache
:5:../src/ohservice.cxx:69::Info: change: BitRate -> 799000

However after this it keeps repeating:
Code
:4:../libupnpp/device/device.cxx:434::UPNP_CONTROL_ACTION_REQUEST: SetNextAVTransportURI args: InstanceID = 0
NextURI =
NextURIMetaData =

:4:../src/avtransport.cxx:396::Set(next)AVTransportURI: next 1 uri  metadata[]
:4:../src/mpdcli.cxx:886::MPDCli::repeat:0
:4:../src/mpdcli.cxx:910::MPDCli::random:0
:4:../src/mpdcli.cxx:922::MPDCli::single:0
:4:../src/mpdcli.cxx:898::MPDCli::consume:0
:4:../src/mpdcli.cxx:983::MPDCli::insert at :1 uri
:2:../src/mpdcli.cxx:336::(m_lastinsertid = mpd_run_add_id_to(m_conn, uri.c_str(), (unsigned)pos)) != -1 failed: No such song
:2:../src/mpdcli.cxx:339::(m_lastinsertid = mpd_run_add_id_to(m_conn, uri.c_str(), (unsigned)pos)) != -1 server error: 50
:2:../libupnpp/device/device.cxx:467::UpnpDevice: Action failed:  code -911
:4:../libupnpp/device/device.cxx:434::UPNP_CONTROL_ACTION_REQUEST: GetTransportInfo args: InstanceID = 0

:4:../libupnpp/device/device.cxx:475::Response data: CurrentTransportState = PLAYING
CurrentTransportStatus = OK
CurrentSpeed = 1
At an insane rate (the log got to multiple MB in the span of 2 <3min test songs).

So I guess just send the command once and treat the "action failed" as the expected behavior I guess?

When casting from Symfonium and clearing the remaining tracks from the queue, the nexturi is cleared in the same way but there are no more requests after that.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 18, 2025, 05:26:36 AM
I've set upmpdcli to debug level logging and captured what happens when MusicBee clears the nexturi. When removing the next song from Upcoming Tracks, the next song is correctly dropped by

I don't think that is what is happening. It attempts to insert the track with a blank NextURI and it produces an error.
Code
:2:../src/mpdcli.cxx:336::(m_lastinsertid = mpd_run_add_id_to(m_conn, uri.c_str(), (unsigned)pos)) != -1 failed: No such song
:2:../src/mpdcli.cxx:339::(m_lastinsertid = mpd_run_add_id_to(m_conn, uri.c_str(), (unsigned)pos)) != -1 server error: 50

The line where it's dropping a track is where it's removing the track that's just played.
Code
:4:../src/ohplaylist.cxx:262::OHPlaylist::makeIdArray: dropping uri http://192.168.1.5:49382/files/2BDE9E2934676BABp.flac

But it does seem to be the plugin that's sending thousands of SetNextAVTransport commands so there is something wrong on my end. It shouldn't matter what upmpdcli returns. If it's not 200 it should just log the attempt as failed and move on, not just resend indefinitely. I'll go through it again, I've missed something somewhere.

So I guess just send the command once and treat the "action failed" as the expected behavior I guess?

The method that sends the NextURI checks for a 200 code. 200 means it worked, anything other than 200 means the device had an error. I'm pretty sure that part of the code is fine as there is just no way for it to get stuck in a loop sending the command thousands of times. But it sends the command via a SOAP request which is handled elsewhere in the code, this handles all the communication and returns the response code to the NextURI method. I expect that's where it's falling over.

edit: for comparison, when the plugin sends a blank NextURI to foobar or BubbleUPnP they respond with 200. Accepting an error code when a blankURI is sent won't be a problem, I just need to figure out why it's looping.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 18, 2025, 05:48:52 AM
edit: Nope, I was wrong with that idea.

With the log spam, is it just upmpdcli log that gets spammed or does the plugin error log get spammed as well?

If it's both I'm going to be surprised as I can't find any way for the plugin to be doing this. I think it's upmpdcli getting stuck in the loop after erroring on the blank NextURI. Which means going back to the idea I had previously of just adding an option to stop it sending a blank one.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 18, 2025, 09:56:25 AM
New version mb_Upnp2025_1.9.1 (https://getmusicbee.com/addons/534/upnp-2025)

Changes
- Some small changes to hopefully fix simbun's issues.

That's fixed it for both renderers.

So far I've only really checked FLAC native and decoded (applying replaygain) gapless playback, which seems to work well, so I'll try and spend some time testing seeking/skipping/continuous stream in the next day or two.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 18, 2025, 10:41:17 AM
So far I've only really checked FLAC native and decoded (applying replaygain) gapless playback, which seems to work well, so I'll try and spend some time testing seeking/skipping/continuous stream in the next day or two.

Take your time. Let me bask in the light of small victories before you find something else :)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Casual Tea on March 18, 2025, 04:20:30 PM
I've asked medoc (the dev of upmpdcli) about how to properly clear the nexturi. His response:
Quote
I’m afraid that this case is not expected by the current code. The UPnP standard does not seem to offer guidance on this.

I can have a look at fixing the code, but it won’t help with existing instances.

At the moment, the best idea I can come up with is to send a valid but guaranteed to not play command, setNextAVTransportURI with something like:
Code
uri = "http://192.2.0.2:0/song.mp3"
metadata = '<?xml version="1.0" encoding="utf-8"?><DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/"><item id="abc" parentID="ab" restricted="1" searchable="0"><dc:title>a</dc:title><upnp:class>object.item.audioItem.musicTrack</upnp:class><res duration="0:0:0" size="0" bitrate="192000" sampleFrequency="44100" bitsPerSample="16" nrAudioChannels="2" protocolInfo="http-get:*:audio/mpeg:* ">http://192.2.0.2:0/song.mp3</res></item></DIDL-Lite>'
Quote
You could probably get by with less metadata, I did not try for a minimal record which would still parse. The problem is that some of the renderers will have the checkcontentformat parameter set, and this wants valid metadata.
So until it's fixed on the side of  upmpdcli, you could try if this workaround works.

edit: Nope, I was wrong with that idea.

With the log spam, is it just upmpdcli log that gets spammed or does the plugin error log get spammed as well?

If it's both I'm going to be surprised as I can't find any way for the plugin to be doing this. I think it's upmpdcli getting stuck in the loop after erroring on the blank NextURI. Which means going back to the idea I had previously of just adding an option to stop it sending a blank one.

The log spam happens in both logs. The error spam stops the second I change the playback device to a local one in musicbee, so it's not like upmpdcli gets stuck (that would also happen when clearing the last track via Symfonium and that works without issues). So I'm fairly certain the plugin is causing it (sorry, haha).

Here's a quick repro of exactly what I'm doing:
(https://i.imgur.com/7zmw8uI.gif)
In this 40s demonstration the plugin log grew to 508 lines of errors. The
Code
SetNextAVTransportURI - Failed -
block is in there 20 times.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 18, 2025, 05:17:43 PM
OK!
It looks like I am finally getting somewhere with getting this to work with LMS.

But, it is only working with MP3's.
Flac, Opus, Ape and Wav won't play.
SqueezePlay will show a popup: "Problem: Unable to play filetype:" for those.

(https://i.imgur.com/CycuybB.png)

I can get them all to play using 'force transcoding to MP3', but I would rather have them play at their original format/quality.
(playing them from LMS itself is working fine, so I don't think the problem is with LMS or SqueezePlay)

Any clue what I could do to get this to work?

In case it is helpful, here is the log after first playing an mp3 (successfully) and then a FLAC (unsuccessfully)

Code
11153; 11 Profile - Generic Device, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
14527; 12 Play - Input - K:\_MusicBee test library\_flac opus mp3\flac - mp3 - opus - ape\Walter Becker - 01 - Door Number Two - MP3.mp3 Output - (http://192.168.2.1:49382/files/4B6B04DD1FA4405Fp.mpeg)
14541; 13 Profile - LMS, useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
14548; 14 GetFile[1] 192.168.2.1 - GET K:\_MusicBee test library\_flac opus mp3\flac - mp3 - opus - ape\Walter Becker - 01 - Door Number Two - MP3.mp3 to 192.168.2.1
14548; 15 GetFile - range=bytes 0-8256988/8256989
14549; 16 Profile - LMS, useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
14661; 17 StateTimer - Loading,old=Stopped
14874; 18 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
14881; 19 SetNextAVTransportURI - Success - http://192.168.2.1:49382/encode/D57E65A1C1CE182E0.L16:K:\_MusicBee test library\_flac opus mp3\Don Grusin - Banana Fish\07 - Don Grusin - Goodbye.mp3
25633; 20 GetFile[1] - exit=10054, playtime=11083
27564; 21 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
27564; 22 Play - Input - K:\_MusicBee test library\_flac opus mp3\flac - mp3 - opus - ape\Walter Becker - 01 - Door Number Two - FLAC.flac Output - (http://192.168.2.1:49382/encode/C440319DFEE4A51F-2147483637.L16)
27685; 23 StateTimer - Loading,old=Stopped

Looking at this myself, I am wondering why the log contains something like:
Profile - Generic Device, useragent=LINUX UPnP/1.0 Denon-Heos
and
Profile - LMS, useragent=iTunes/4.7.1

I don't have iTunes installed.
I do have a Marantz receiver somewhere in the network, but it is off and not configured in the plugin.
(Marantz and Denon is the same company, so their DLNA/HEOS stuff is probably the same)

Perhaps I have set the profile incorrectly?:

(https://i.imgur.com/6cLnY3w.png)

- - -

edit

When checking ''force native stream (global setting)" things improve somewhat.
Flac will now also play. (so maybe it wasn't playing a Flac stream with that option unchecked?)

But when trying to play Opus or Ape there is now a MusicBee error popup: "Unable to start playback"
(Wav will now also play, it being with a small 'click' at the beginning)

Here's the log for first playing a Flac (successfully) and then an Opus (unsuccessfully)
(some weird "<?xml version=..." at the bottom?)

Code
9680; 11 Profile - Generic Device, useragent=LINUX UPnP/1.0 Denon-Heos/08de8fcd6d08b43bcefbbc8c6001666b16418674
12772; 12 Play - Input - K:\_MusicBee test library\_flac opus mp3\flac - mp3 - opus - ape\Walter Becker - 01 - Door Number Two - FLAC.flac Output - (http://192.168.2.1:49382/files/C440319DFEE4A51Fp.x-flac)
12792; 13 Profile - LMS, useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
12800; 14 GetFile[1] 192.168.2.1 - GET K:\_MusicBee test library\_flac opus mp3\flac - mp3 - opus - ape\Walter Becker - 01 - Door Number Two - FLAC.flac to 192.168.2.1
12800; 15 GetFile - range=bytes 0-26558156/26558157
12800; 16 Profile - LMS, useragent=iTunes/4.7.1 (Windows; N; Windows 10; 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.5.2/1716215514
12908; 17 StateTimer - Loading,old=Stopped
13017; 18 SetNextAVTransportURI - Success - http://192.168.2.1:49382/files/D57E65A1C1CE182Ep.mpeg:K:\_MusicBee test library\_flac opus mp3\Don Grusin - Banana Fish\07 - Don Grusin - Goodbye.mp3
23317; 19 GetFile[1] - exit=10054, playtime=10515
26748; 20 Mimetype Error - Mimetype support cannot be verified with Renderer
26748; 21 DIDL Error - startIndex cannot be larger than length of string.
Parameter name: startIndex
26748; 22 Play - Input - K:\_MusicBee test library\_flac opus mp3\flac - mp3 - opus - ape\Walter Becker - 01 - Door Number Two - OPUS.opus Output - ()
26756; 23 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#Play"
Content-Length: 304

<?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:Play xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID><Speed>1</Speed></u:Play></s:Body></s:Envelope>
26756; 24 SoapRequest:Play:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0,Speed=1 - <?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">716</errorCode><errorDescription xsi:type="xsd:string">Resource not found</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>
26756; 25 Play - status=500,url=

- - -

edit 2

Perhaps when we have this figured out and have the plugin working well for LMS, you could add a preset for   LMS (Logitech Media Server/Lyrion) ?

It's fun to see how many people are using LMS, and still own—sometimes a lot of—various Squeezebox devices.
They seem even more popular and appreciated than in the ole' days.
The days when I could buy a good 2nd hand Squeezebox Classic for some 25 gulden/euro/dollars are also gone now ;-)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on March 18, 2025, 05:33:12 PM
1.9.1 is now working fine with an MXN10 streamer from Cambridge Audio, just heard a full album without any issues.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 18, 2025, 11:15:59 PM
So until it's fixed on the side of  upmpdcli, you could try if this workaround works.

Looking at the upmpdcli code, I think an invalid url (track that doesn't exist) will produce the same error code. And seeing as you have stated both logs are getting spammed, I don't think it will solve the problem. Although the code I was looking at hasn't been updated for 12 years so maybe I was just looking at an old fork of the code if the developer is still working on it.

Can you send me the plugin log that shows multiple instances of the error, just half a dozen or so. 500 lines over 40 seconds is not as spammy as I thought. That could be the NextURI code triggering every time the status check is made which probably just means I've missed something when the device returns an error for that command.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 18, 2025, 11:46:45 PM
Any clue what I could do to get this to work?

In case it is helpful, here is the log after first playing an mp3 (successfully) and then a FLAC (unsuccessfully)

The flac is getting encoded because you have DSP or replaygain settings. The plugin has to encode the track to apply those.
27564; 22 Play - Input - K:\_MusicBee test library\_flac opus mp3\flac - mp3 - opus - ape\Walter Becker - 01 - Door Number Two - FLAC.flac Output - (http://192.168.2.1:49382/encode/C440319DFEE4A51F-2147483637.L16)

L16 is 16 bit PCM. I need to see the next few lines of the log to see what happens when you try and play this. Does it just stop or play noise?

Looking at this myself, I am wondering why the log contains something like:
Profile - Generic Device, useragent=LINUX UPnP/1.0 Denon-Heos
and
Profile - LMS, useragent=iTunes/4.7.1

iTunes is the useragent LMS uses. It's probably for compatibility reasons somewhere.

Marantz and denon do seem to show up as HEOS from the logs I've seen. Are you sure it's turned off? LMS could be using it too I suppose I can't remember.

Some devices use multiple useragents to communicate. You can see how many individual devices there are at the start of the log. Devices are listed after a "ProcessMessage" entry. It will show the IP address, uuid and name of the device.

Perhaps I have set the profile incorrectly?:

That should work. The useragent field just has to be a partial match of the useragent. If LMS is also using heos you can separate multiple useragents with a pipe symbol. So Logitech Media Server|Denon


But when trying to play Opus or Ape there is now a MusicBee error popup: "Unable to start playback"
(Wav will now also play, it being with a small 'click' at the beginning)

Ape? that's a new one. The plugin doesn't recognise those mimetypes currently. I should be able to sort that out. I assume LMS supports Opus and Ape?

Perhaps when we have this figured out and have the plugin working well for LMS, you could add a preset for   LMS (Logitech Media Server/Lyrion) ?

I think the issue you are going to have is you will want to use DSP/relaygain settings which will always trigger an encode. There is no way around that. I expect LMS might do some encoding of it's own if the incoming format isn't supported by the Squeezebox.

If you want the track to keep it's original samplerate, bit depth etc... just set the ranges for the output sample rate to the minimum and maximum values, leave "stereo only" unchecked and set the max bit depth to 24.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 19, 2025, 04:34:01 AM
New version mb_Upnp2025_1.9.3 (https://getmusicbee.com/addons/534/upnp-2025)

Changes
- Added support for Opus mimetypes. The musicbee API doesn't support Ape. The fact I only first heard of it today and it's 25 years old might be why....
- Errors occurring when setting a blank URI will now be ignored. It will be reported in the logs when this occurs.
- Fixed an issue that would cause the plugin to retry indefinitely when a NextURI call repeatedly fails. After 4 failed attempts in a row, sending NextURI will be disabled for that device until Musicbee is restarted.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 19, 2025, 05:39:52 PM
iTunes is the useragent LMS uses. It's probably for compatibility reasons somewhere.

Marantz and denon do seem to show up as HEOS from the logs I've seen. Are you sure it's turned off? LMS could be using it too I suppose I can't remember.

Some devices use multiple useragents to communicate. You can see how many individual devices there are at the start of the log. Devices are listed after a "ProcessMessage" entry. It will show the IP address, uuid and name of the device.
The Marantz receiver is in standby actually. (no actual on/off button) It's probably advertising itself on the network in that mode.


Quote from: BoringName
The useragent field just has to be a partial match of the useragent. If LMS is also using heos you can separate multiple useragents with a pipe symbol. So Logitech Media Server|Denon
I have changed the 'match useragent' to Logitech|iTunes
Do you think that is good?
(I won't be using the Marantz for this)


Quote from: BoringName
Ape? that's a new one. The plugin doesn't recognise those mimetypes currently. I should be able to sort that out.
I assume LMS supports Opus and Ape?
Yes it does.
When Ape came out, I think it was the first lossless audio compression algorithm, and that gained it a lot of popularity.
I also used it a lot:
(https://i.imgur.com/dEDjkR5.png)
But later on Flac became more and more popular and pretty much won the battle.
(Flac being open source and Ape not, being one of the reasons for that)
After a couple of years I converted all my Ape files to Flac and stuck with that.

But, these days I have a dedicated purpose for Ape again, so I would like to be able to play them using UPnP2025.
(I'll post a request to have APE added to the API)


Quote from: BoringName
I think the issue you are going to have is you will want to use DSP/relaygain settings which will always trigger an encode. There is no way around that.
I won't be using DSP or EQ, but I do want to use ReplayGain.

Making sure that I understand correctly:
So as soon as you play a song that has ReplayGain tags, and you have ReplayGain activated in MusicBee, the plugin will re-encode the file to PCM?
But if a song does not have ReplayGain tags, and/or ReplayGain is deactivated in MusicBee, it should be possible to stream the song in its original format, and preserving its RG tags?

Hm, I would prefer not to re-encode the files, and I want to use the ReplayGain information present in the tags.
Because same as MusicBee, LMS can also use ReplayGain. (album-, track-, smart- etc.)
So if the track would not be re-encoded, I am guessing LMS should be able to use the RG tag values?

If that is the case, I would need to turn off RG in MB when using UPnP2025, and then turn it on again after that.
Would it be possible for the plugin to have an option that can disable RG in MusicBee when the plugin is being used?
LMS will then take care of the correct loudness by using the RG tags, and re-encoding can be avoided?
(but hold on before doing anything. I'll first need to confirm that LMS will indeed use the RG tags information when rendering from UPnP2025, and for now that seems to fail)


- - -


A new test, using UPnP2025 v1.9.3.0 and MB v3.6.9208, no DSP, EQ or ReplayGain

using these settings:
(https://i.imgur.com/wruKV9n.png)

I played a couple of tracks for some 10 seconds:

play an mp3 file
plays fine
stop

play a Flac file
no sound
stop

play an Opus file
no sound
stop

play a Wav file
no sound
stop

play an mp3 file again
plays fine
stop


the logfile:

Code
23080; 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)
23131; 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
23139; 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
23139; 13 GetFile - range=bytes 0-8256988/8256989
23140; 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
23235; 15 StateTimer - Loading,old=Stopped
23458; 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>
23458; 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>
23461; 18 SetNextAVTransportURI - Failed - Ignored as a blank URI is probable cause.
36813; 19 GetFile[1] - exit=10054, playtime=13672
39418; 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)
39430; 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
39431; 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
39431; 23 GetFile - range=bytes 0-26558156/26558157
39431; 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
39557; 25 StateTimer - Loading,old=Stopped
50722; 26 GetFile[2] - exit=10054, playtime=11290
53881; 27 Play - Input - K:\_MusicBee test library\UPnP test\Walter Becker - 03 - Door Number Two - OPUS.opus Output - (http://192.168.2.1:49382/encode/BECBE4282A21C9BD-2147483633.L16)
54009; 28 StateTimer - Loading,old=Stopped
54252; 29 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
54253; 30 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
54254; 31 GetEncodedFile[3] - range=bytes 0-52468415/52468416
54254; 32 GetEncodedFile[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; mime=audio/L16;rate=48000;channels=2,rate=48000,channels=2
64643; 33 GetEncodedFile[3] - exit=10054, playtime=10387
66959; 34 Play - Input - K:\_MusicBee test library\UPnP test\Walter Becker - 05 - Door Number Two - PCM.wav Output - (http://192.168.2.1:49382/encode/472DD050DD4B6785-2147483622.L16)
67095; 35 StateTimer - Loading,old=Stopped
67311; 36 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
67312; 37 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
67312; 38 GetEncodedFile[4] - range=bytes 0-48204119/48204120
67312; 39 GetEncodedFile[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; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
77482; 40 GetEncodedFile[4] - exit=10054, playtime=10169
79575; 41 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)
79586; 42 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
79586; 43 GetFile[5] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\Walter Becker - 01 - Door Number Two - MP3.mp3 to 192.168.2.1
79586; 44 GetFile - range=bytes 0-8256988/8256989
79586; 45 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
79698; 46 StateTimer - Loading,old=Stopped
79909; 47 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>
79909; 48 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>
79912; 49 SetNextAVTransportURI - Failed - Ignored as a blank URI is probable cause.
90182; 50 GetFile[5] - exit=10054, playtime=10596

- - -

edit:

OK, this is weird.

Trying it again less than an hour later, Flac will now also play.
Without me having changed any setting at all.
(Opus and Wav still fail)

Code
0; 1 Initialise - 3/19/2025 18:14:26
30; 2 GetNetworkAddresses - 192.168.2.1,dns=True,name=Ethernet 2,speed=1000000000
30; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
30; 4 GetNetworkAddresses - http://192.168.2.1:49382
50; 5 ProcessMessage 192.168.2.111 - device 'uuid:6e52c5d4-d3c1-1894-0080-0005cdf71792:Marantz NR1509',valid=True
963; 6 ProcessMessage 127.0.0.1 - device 'uuid:AB9A065F-27CA-0727-FA47-55F54D527FA3:SqueezePlay',valid=True
965; 7 Profile - LMS (Lyrion/Logitech Media Server), useragent=|Logitech Media Server (8.5.2 - 1716215514)
966; 8 Profile - LMS (Lyrion/Logitech Media Server), useragent=|Logitech Media Server (8.5.2 - 1716215514)
981; 9 Activate - SqueezePlay:http-get:*:audio/mpeg:*,http-get:*:audio/L16;rate=8000;channels=1:*,http-get:*:audio/L16;rate=8000;channels=2:*,http-get:*:audio/L16;rate=11025;channels=1:*,http-get:*:audio/L16;rate=11025;channels=2:*,http-get:*:audio/L16;rate=12000;channels=1:*,http-get:*:audio/L16;rate=12000;channels=2:*,http-get:*:audio/L16;rate=16000;channels=1:*,http-get:*:audio/L16;rate=16000;channels=2:*,http-get:*:audio/L16;rate=22050;channels=1:*,http-get:*:audio/L16;rate=22050;channels=2:*,http-get:*:audio/L16;rate=24000;channels=1:*,http-get:*:audio/L16;rate=24000;channels=2:*,http-get:*:audio/L16;rate=32000;channels=1:*,http-get:*:audio/L16;rate=32000;channels=2:*,http-get:*:audio/L16;rate=44100;channels=1:*,http-get:*:audio/L16;rate=44100;channels=2:*,http-get:*:audio/L16;rate=48000;channels=1:*,http-get:*:audio/L16;rate=48000;channels=2:*,http-get:*:audio/vnd.dlna.adts:*,http-get:*:audio/vnd.dlna.adts:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ms-wma:*,http-get:*:application/ogg:*,http-get:*:audio/x-flac:*
1865; 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)
1879; 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
1886; 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
1886; 13 GetFile - range=bytes 0-8256988/8256989
1886; 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
2204; 15 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>
2205; 16 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>
2207; 17 SetNextAVTransportURI - Failed - Ignored as a blank URI is probable cause.
12478; 18 GetFile[1] - exit=10054, playtime=10587
15268; 19 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)
15278; 20 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
15278; 21 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
15278; 22 GetFile - range=bytes 0-26558156/26558157
15279; 23 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
15390; 24 StateTimer - Loading,old=Stopped
15613; 25 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>
15613; 26 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>
15616; 27 SetNextAVTransportURI - Failed - Ignored as a blank URI is probable cause.
25736; 28 GetFile[2] - exit=10054, playtime=10456
28196; 29 Play - Input - K:\_MusicBee test library\UPnP test\Walter Becker - 03 - Door Number Two - OPUS.opus Output - (http://192.168.2.1:49382/encode/BECBE4282A21C9BD-2147483632.L16)
28211; 30 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
28211; 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
28213; 32 GetEncodedFile[3] - range=bytes 0-52468415/52468416
28213; 33 GetEncodedFile[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; mime=audio/L16;rate=48000;channels=2,rate=48000,channels=2
28327; 34 StateTimer - Loading,old=Stopped
38960; 35 GetEncodedFile[3] - exit=10054, playtime=10746
40924; 36 Play - Input - K:\_MusicBee test library\UPnP test\Walter Becker - 05 - Door Number Two - PCM.wav Output - (http://192.168.2.1:49382/encode/472DD050DD4B6785-2147483621.L16)
40935; 37 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
40935; 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
40935; 39 GetEncodedFile[4] - range=bytes 0-48204119/48204120
40935; 40 GetEncodedFile[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; mime=audio/L16;rate=44100;channels=2,rate=44100,channels=2
41051; 41 StateTimer - Loading,old=Stopped
51777; 42 GetEncodedFile[4] - exit=10054, playtime=10840
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 19, 2025, 11:05:22 PM
I have changed the 'match useragent' to Logitech|iTunes
Do you think that is good?

That should be fine.

So as soon as you play a song that has ReplayGain tags, and you have ReplayGain activated in MusicBee, the plugin will re-encode the file to PCM?
But if a song does not have ReplayGain tags, and/or ReplayGain is deactivated in MusicBee, it should be possible to stream the song in its original format, and preserving its RG tags?

If replaygain is enabled AND the track has replaygain tags, it will be encoded.
If replaygain is enabled and the track does not have replaygain tags, it will not be encoded.
If replaygain is disabled, the track will not be encoded whether it has tags or not.
If the equaliser or any DSP is enabled, the track will be encoded regardless of any tags.

So if the track would not be re-encoded, I am guessing LMS should be able to use the RG tag values?

Replaygain is currently not included in the metadata that is sent to the device. I'll see if that's possible.

Would it be possible for the plugin to have an option that can disable RG in MusicBee when the plugin is being used?

"force native stream" does this.

(but hold on before doing anything. I'll first need to confirm that LMS will indeed use the RG tags information when rendering from UPnP2025, and for now that seems to fail)

As above, that information isn't currently passed on to the device.

using these settings:
(https://i.imgur.com/wruKV9n.png)

I played a couple of tracks for some 10 seconds:

If you look at the start of the log, it lists all the mimetypes supported by squeezeplay. Opus and Wav are not listed there so the plugin is encoding those files to L16. I don't know why they are not playing any audio though.

Try it again with "force native stream" and see what happens.

I'll probably have to install LMS again to sort this one out.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 19, 2025, 11:25:38 PM
Actually, what you want to do isn't going to work. LMS isn't really involved in the process other than providing the Squeezeplay renderer.

Musicbee is the control point.
Squeezeplay is the renderer.

For what you want to do LMS would need to be the control point. That's why Opus and Wav are getting encoded, even though LMS supports those codecs, the Squeezeplay device does not and LMS is not really involved when Musicbee sends a track to the Squeezeplay device.

If the Squeezeplay device supports replaygain tags in the metadata it might work.

edit: Nope, replaygain isn't included in the standard so you're out of luck there sorry.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 20, 2025, 07:58:42 AM
Thanks for the explanations and thoughts about all this.
I'll digest and test things further later.

That's why Opus and Wav are getting encoded, even though LMS supports those codecs, the Squeezeplay device does not...
Are you sure about that?
As I said before, all formats including Wav and Ape play fine using LMS > Squeezeplay.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 20, 2025, 08:47:20 AM
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.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 20, 2025, 12:17:46 PM
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
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 20, 2025, 12:47:22 PM
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.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 20, 2025, 01:13:17 PM
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 (https://forums.lyrion.org/forum/user-forums/general-discussion/93838-squeezeplay-for-windows-with-asio-directsound-wasapi-and-wdmks-device-support?96573-SqueezePlay-for-Windows-with-ASIO-DirectSound-WASAPI-and-WDMKS-device-support=&highlight=Squeezeplay)
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)
 
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: MoboMini on March 20, 2025, 03:26:25 PM
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.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 20, 2025, 05:19:26 PM
Simply download the .zip file.
Then in MusicBee:
Preferences > Plugins > Add Plugin...
and navigate to, and select the .zip file.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: MoboMini on March 20, 2025, 09:52:16 PM
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?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 20, 2025, 10:02:02 PM
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.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 20, 2025, 10:25:19 PM
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
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 20, 2025, 10:51:43 PM
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?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 20, 2025, 11:39:49 PM
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.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 20, 2025, 11:49:51 PM
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.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 21, 2025, 12:03:56 AM
For one, I don't see any options or check boxes changing when selecting a different profile.
DLNA Profiles (https://imgur.com/a/j4T5eGM)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 21, 2025, 12:05:57 AM
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.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 21, 2025, 12:40:01 AM
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.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 21, 2025, 02:05:21 AM
LMS has issues....

Part of the flac problem is it lists that it supports audio/x-flac but doesn't like the file to have a .x-flac extension. In the ticket I created for Opus and Wav I did specify they should change it to .flac so hopefully they sort that issue out at the same time.

It advertises that it supports NextURI and I can set it successfully but it doesn't transition to the next song automatically. In fact it never transitions to the next song even if I disable NextURI. I can get it to play one song but then it just stops. It looks like it's not responding to playstate requests so the plugin can't tell where it's up to and when to send the next track. The LMS log is filled with requests but I'm not getting a response.

PCM just flat out does not work.

I've got a separate UPnP program I use to query devices on the network and that's having issues talking to it as well. I'll have to play around with it a bit more to see what's going on.

edit: Found the problem, Lyrion always returns a play state of "TRANSITIONING" no matter what it's play state actually is. I've created a ticket for this as well.

edit: I've also found the reason PCM don't work. Squeezeplay doesn't actually support PCM (L16). So it advertises that it supports PCM but doesn't. It doesn't advertise that is supports WAV even though it does.... I've added that to the ticket.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 22, 2025, 04:11:45 AM
So LMS...

The bad
LMS don't do a 32 bit version anymore. From the github page it sounds like something broke with the build process and they are not going to fix it.
Any changes made to fix any issues will require the user to update to the 64 bit version to take advantage of those changes.

The good
We discussed it a few months ago, the 64 bit version installs Perl to run it. I don't know if having Perl installed is a good thing but it means LMS server is stored on the computer as it's source code. So I can make direct changes to the source and see straight away if it will work.

Which I have done for Wav and Opus support. Opus works and profiles that are set to transcode to 16/24 PCM now get sent as Wav which works correctly.

I've created a pull request on their github page for these changes and to fix x-flac/flac. I can't figure out what's going on with the playstate issue though so hopefully someone else can sort that one out.

I'll update the thread once those issues have been sorted. As stated above, you will need to upgrade to the latest 64 bit version. There is nothing I can do to get the older versions to work.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 22, 2025, 07:50:23 AM
Brilliant! Thanks for the additional effort on this, much appreciated.
Updating to a 9.xx version won't be that terrible.
I think there is a way to make it use the traditional interface instead of the Material skin.
And I am guessing/hoping any Windows issues will also be ironed out by then.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 22, 2025, 01:16:27 PM
Brilliant! Thanks for the additional effort on this, much appreciated.

I don't know how it will go, it seems the LMS UPnP plugin code was never really finished and it's been in that state for a long time.... see what happens.

Can you confirm what happens when you queue up multiple tracks and hit play with your device.

With the SqueezePlay software player I can't get it to transition to another track. Does it work for you? Eg) what happens when the first track finishes playing, does it switch to the next track automatically?

If it doesn't work can you also do the same test with NextURI disabled. You may need to restart musicbee for that setting to apply properly.

While the LMS plugin accepts NextURI commands I don't think it actually does anything with that information from what I can tell. I could be wrong....

I have a theory the reason it gets stuck in a "TRANSITIONING" state is the LMS plugin is supposed to subscribe to player events but that isn't working for the SqueezePlayer. I'm hoping it works for your Squeezebox.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on March 22, 2025, 01:40:59 PM
Updating to a 9.xx version won't be that terrible.
I think there is a way to make it use the traditional interface instead of the Material skin.
While I haven't updated to LMS 9.x yet, I'm pretty sure it's using what they call the "Material Skin." Which I am using. It takes some time to learn where things are and I will often go back to the original (default) skin. Somewhere in this thread you (hiccup) stated that you found the new skin hard to navigate and I showed you how to continue to use the default skin. To save you the time of searching for it...
- Open the default skin. It should look like this:
(https://i.imgur.com/ayqp9Et.jpeg)
- Click on "Settings" in the lower-right.
- You're now at the default skin settings.
(https://i.imgur.com/qhi4ZtD.jpeg)
- Be sure to click "Apply" in the lower-right to save any changes you made

-For those watching at home, the "new" material skin looks like this...
(https://i.imgur.com/KAWx9gw.jpeg)
- It just took me a few minutes to find out how to reach the settings page <sigh>
- Click on the icon at the upper-left (hamburger menu with green plus sign)
- That opens a drop-down with settings for the interface, the player, and the server

- This is the server settings landing screen. There's a drop-down at the upper-right to reach what in the default skin are the other tabs
(https://i.imgur.com/o83XcJI.jpeg)
- This shows what had been the tabs in the default skin
(https://i.imgur.com/OZQJGj4.jpeg)

Let me know how the upgrade to LMS 9.x goes.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: MoboMini on March 22, 2025, 03:29:59 PM
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

Thanks.

How do I point musicbee to wiim streamer? Sorry , I'm pretty new to this.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 22, 2025, 04:07:58 PM
How do I point musicbee to wiim streamer? Sorry , I'm pretty new to this.
It should be visible and selectable through: Preferences > Player > Output:
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 22, 2025, 04:32:41 PM
Let me know how the upgrade to LMS 9.x goes.
I wont be updating to 9.x unless they release an updated version that has the improvements suggested by BoringName regarding its UPnP functionality.
When that happens, I'm sure you will read about it in this thread ;-)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on March 22, 2025, 04:44:41 PM
I wont be updating to 9.x unless they release an updated version that has the improvements suggested by BoringName regarding its UPnP functionality.
When that happens, I'm sure you will read about it in this thread ;-)
I'll be watching.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: MoboMini on March 22, 2025, 04:59:00 PM
How do I point musicbee to wiim streamer? Sorry , I'm pretty new to this.
It should be visible and selectable through: Preferences > Player > Output:

Yes, that worked! Thanks very much for your help.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 22, 2025, 06:28:54 PM
Can you confirm what happens when you queue up multiple tracks and hit play with your device.
With the SqueezePlay software player I can't get it to transition to another track. Does it work for you? Eg) what happens when the first track finishes playing, does it switch to the next track automatically?
If it doesn't work can you also do the same test with NextURI disabled. You may need to restart musicbee for that setting to apply properly.
You are right.
All sorts of funny stuff going on when lining up multiple tracks.

Playing to my Squeezebox Classic device:

Test #1

First track plays fine.
Then it progresses to track #2, but there is no sound.

After that, it won't progress to track #3, and MusicBee's progressbar is losing all its marbles:

(https://i.imgur.com/06fUyNk.gif)
for those who wonder: 'massage' is spelled correctly here


logfile:
Code
22668; 10 Play - Input - K:\_MusicBee test library\UPnP test\short album\1-12 - Raspberry.mp3 Output - (http://192.168.2.1:49382/files/E67D39556002AB39p.mpeg)
22684; 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
22692; 12 GetFile[1] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\short album\1-12 - Raspberry.mp3 to 192.168.2.120
22692; 13 GetFile - range=bytes 0-1152865/1152866
22693; 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
22786; 15 StateTimer - Loading,old=Stopped
23249; 16 GetFile[1] - exit=0, playtime=555
23441; 17 SetNextAVTransportURI - Success - http://192.168.2.1:49382/files/64A255F26911481Ep.mpeg:K:\_MusicBee test library\UPnP test\short album\1-26 - Massage From the Swedish Prime Minister, Part 2.mp3


Test #2 with 'Disable NextURI' checked':

Track #1 plays fine, but after that it won't progress to track #2, and the progressbar again gets fuc*ed up identical to test #1.

logfile:
Code
0; 1 Initialise - 3/22/2025 18:08:59
32; 2 GetNetworkAddresses - 192.168.2.1,dns=True,name=Ethernet 2,speed=1000000000
32; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
32; 4 GetNetworkAddresses - http://192.168.2.1:49382
52; 5 ProcessMessage 192.168.2.111 - device 'uuid:6e52c5d4-d3c1-1894-0080-0005cdf71792:Marantz NR1509',valid=True
998; 6 ProcessMessage 192.168.2.1 - device 'uuid:3B9596A5-0FAC-3FD9-F599-8A25E8F10962:Squeezebox Classic',valid=True
1002; 7 Profile - LMS (Lyrion/Logitech Media Server), useragent=|Logitech Media Server (8.5.2 - 1716215514)
1003; 8 Profile - LMS (Lyrion/Logitech Media Server), useragent=|Logitech Media Server (8.5.2 - 1716215514)
1019; 9 Activate - Squeezebox Classic:http-get:*:audio/mpeg:*,http-get:*:audio/L16;rate=8000;channels=1:*,http-get:*:audio/L16;rate=8000;channels=2:*,http-get:*:audio/L16;rate=11025;channels=1:*,http-get:*:audio/L16;rate=11025;channels=2:*,http-get:*:audio/L16;rate=12000;channels=1:*,http-get:*:audio/L16;rate=12000;channels=2:*,http-get:*:audio/L16;rate=16000;channels=1:*,http-get:*:audio/L16;rate=16000;channels=2:*,http-get:*:audio/L16;rate=22050;channels=1:*,http-get:*:audio/L16;rate=22050;channels=2:*,http-get:*:audio/L16;rate=24000;channels=1:*,http-get:*:audio/L16;rate=24000;channels=2:*,http-get:*:audio/L16;rate=32000;channels=1:*,http-get:*:audio/L16;rate=32000;channels=2:*,http-get:*:audio/L16;rate=44100;channels=1:*,http-get:*:audio/L16;rate=44100;channels=2:*,http-get:*:audio/L16;rate=48000;channels=1:*,http-get:*:audio/L16;rate=48000;channels=2:*,http-get:*:audio/vnd.dlna.adts:*,http-get:*:audio/vnd.dlna.adts:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ms-wma:*,http-get:*:application/ogg:*,http-get:*:audio/x-flac:*
0; 1 Initialise - 3/22/2025 18:09:19
33; 2 GetNetworkAddresses - 192.168.2.1,dns=True,name=Ethernet 2,speed=1000000000
33; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
33; 4 GetNetworkAddresses - http://192.168.2.1:49382
54; 5 ProcessMessage 192.168.2.111 - device 'uuid:6e52c5d4-d3c1-1894-0080-0005cdf71792:Marantz NR1509',valid=True
250; 6 ProcessMessage 192.168.2.1 - device 'uuid:3B9596A5-0FAC-3FD9-F599-8A25E8F10962:Squeezebox Classic',valid=True
253; 7 Profile - LMS (Lyrion/Logitech Media Server), useragent=|Logitech Media Server (8.5.2 - 1716215514)
253; 8 Profile - LMS (Lyrion/Logitech Media Server), useragent=|Logitech Media Server (8.5.2 - 1716215514)
269; 9 Activate - Squeezebox Classic:http-get:*:audio/mpeg:*,http-get:*:audio/L16;rate=8000;channels=1:*,http-get:*:audio/L16;rate=8000;channels=2:*,http-get:*:audio/L16;rate=11025;channels=1:*,http-get:*:audio/L16;rate=11025;channels=2:*,http-get:*:audio/L16;rate=12000;channels=1:*,http-get:*:audio/L16;rate=12000;channels=2:*,http-get:*:audio/L16;rate=16000;channels=1:*,http-get:*:audio/L16;rate=16000;channels=2:*,http-get:*:audio/L16;rate=22050;channels=1:*,http-get:*:audio/L16;rate=22050;channels=2:*,http-get:*:audio/L16;rate=24000;channels=1:*,http-get:*:audio/L16;rate=24000;channels=2:*,http-get:*:audio/L16;rate=32000;channels=1:*,http-get:*:audio/L16;rate=32000;channels=2:*,http-get:*:audio/L16;rate=44100;channels=1:*,http-get:*:audio/L16;rate=44100;channels=2:*,http-get:*:audio/L16;rate=48000;channels=1:*,http-get:*:audio/L16;rate=48000;channels=2:*,http-get:*:audio/vnd.dlna.adts:*,http-get:*:audio/vnd.dlna.adts:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ms-wma:*,http-get:*:application/ogg:*,http-get:*:audio/x-flac:*
8843; 10 Play - Input - K:\_MusicBee test library\UPnP test\short album\1-12 - Raspberry.mp3 Output - (http://192.168.2.1:49382/files/E67D39556002AB39p.mpeg)
8860; 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
8868; 12 GetFile[1] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\short album\1-12 - Raspberry.mp3 to 192.168.2.120
8868; 13 GetFile - range=bytes 0-1152865/1152866
8868; 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
9432; 15 GetFile[1] - exit=0, playtime=562
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on March 22, 2025, 11:32:58 PM
Part of the flac problem is it lists that it supports audio/x-flac but doesn't like the file to have a .x-flac extension. In the ticket I created for Opus and Wav I did specify they should change it to .flac so hopefully they sort that issue out at the same time.
I know we've touched on this before but I think you'd be better off just changing the extension of the served file to .flac; the 'x-' in audio/x-flac simply indicates that it's not an official mime type it has nothing to do with the file extension.

Can you confirm what happens when you queue up multiple tracks and hit play with your device.

With the SqueezePlay software player I can't get it to transition to another track. Does it work for you? Eg) what happens when the first track finishes playing, does it switch to the next track automatically?
I have a little experience with LMS and the legacy DLNA/UPnP Media Interface, and the only way it worked reliably with BubbleUPnP was if I enabled eventing. As you've noted already this plugin was abandoned over a decade ago, so I'd be surprised to see any further development/fixes.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 23, 2025, 12:09:54 AM
First track plays fine.
Then it progresses to track #2, but there is no sound.

Does the LMS interface switch to the second track? I'm guessing not.

It's the same issue I get with the SqueezePlayer. I know the cause of the issues but fixing it might be tricky.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 23, 2025, 12:25:16 AM
I know we've touched on this before but I think you'd be better off just changing the extension of the served file to .flac; the 'x-' in audio/x-flac simply indicates that it's not an official mime type it has nothing to do with the file extension.

It's because the plugin extracts the extension from the mimetype value. There is a lot of code that goes into it comparing advertised mimetypes with supported types. That applies to all codecs so it's not something I want to mess around with at the moment in case it breaks other devices/formats. I also don't want to be adding bits of code to alter things just for one codec. End of the day, the issue is the device not the plugin. The pull request I made for LMS changes it's advertised format to audio/flac which will solve the problem.

I have a little experience with LMS and the legacy DLNA/UPnP Media Interface, and the only way it worked reliably with BubbleUPnP was if I enabled eventing. As you've noted already this plugin was abandoned over a decade ago, so I'd be surprised to see any further development/fixes.

That's interesting and confirms my suspicions on what is causing the issues. I hope you mean eventing in LMS as that's something I can work with. I'll have a dig through the settings. At any rate, if it's a BubbleUPnP setting it will still help me troubleshoot if I can get the two working together properly.

Well it's had one development/fix in the last 10 years, the pull request I made yesterday is technically an update to the DLNA/UPnP Media Interface code.

edit: Bugger, it seems to be a setting for BubbleUPnP.
So I either have to enable event support for this plugin or alter the LMS plugin to update the play state when eventing isn't supported. Actually both is probably required to have everything work as it should.... it's going to be a while before either is done.

edit2: Just confirming that eventing is the issue. With eventing enabled for the squeezePlayer in BubbleUPnP it transitions to the next track successfully. Also confirming that LMS does not support NextURI. The code is there but it doesn't queue it on the playlist.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 23, 2025, 03:52:53 AM
it's going to be a while before either is done.

I lied.... I've configured the LMS plugin so it updates the play state without requiring an event subscription. Track transitions are a little slow, especially the first one but it's working.

I've got NextURI working as well but there is a weird issue I'm having problems sorting out. When I set the NextURI, a toast message pops up on the SqueezePlayer UI stating the NextURI track is being added to the playlist. The information in this toast popup is correct. But when I look at the playlist it's showing 2 identical tracks. The NextURI has been added with the same track title as the first track. If I check the track info on these 2 tracks, they show the correct info for each track so it's just the title in the playlist that is wrong. The weird part is if I restart LMS, when it loads back up the playlist titles are what they should be.

The incorrect title persists through track transitions, so while it's playing the correct song with the correct duration, the cover displayed and title are wrong. If I let it play a few tracks, every time it adds a new NextURI, they are all added with the track title of the first track played. For whatever reason the title isn't getting refreshed when I add a new track to the playlist....

So I just need to figure that out and put in a few checks on the current playlist state and it should be good to go.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 23, 2025, 06:22:14 PM
Does the LMS interface switch to the second track? I'm guessing not.
Indeed it doesn't.


I lied....
that's great (https://www.youtube.com/watch?v=uCGD9dT12C0)
(I couldn't find a great live version, so this endearingly bad official video will have to suffice)

Btw, I'm impressed how fast your suggestions and contributions seem to get picked up over at Lyrion.
If I understand correctly, an upcoming LMS 9.1 version will already contain some suggested improvements?

nice
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 23, 2025, 10:47:45 PM
Btw, I'm impressed how fast your suggestions and contributions seem to get picked up over at Lyrion.
If I understand correctly, an upcoming LMS 9.1 version will already contain some suggested improvements?

I don't know what their release schedule is. The Wav and Opus checks have been merged already so they will be in the next version. I'm going to try and get the transport state changes added today so that will make it work with this plugin.

I've found the issue with the wrong track titles for NextURI (that was a bastard to find). But I'm not sure when I will add NextURI support as I have to figure out how to manage the playlist in LMS so it only displays the Current and NextURI tracks.

edit: Because the 64 bit just runs off the source code. You could just download the code from github at any time and overwrite the files on your machine so you don't have to wait for a release before updating.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 24, 2025, 06:55:07 AM
I've been kicking goals today. Pull request is submitted to fix the transport state issue with LMS. That should allow the LMS plugin to work with all Control Points that don't support eventing.

I also have NextURI working on my home system. Once the pull request above is merged (if it's ok) I'll do another one to add NextURI support.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 26, 2025, 11:18:20 PM
The pull request to fix LMS eventing requirement has been accepted. This change means track transitions will occur properly with this plugin and also any other Control Point like BubbeUPnP without requiring eventing to be enabled.  I've tested them both and they work.

The changes I've made so far will not be in the 9.0.3 version. They are applying to the development version 9.1.0. And it looks like that gets built every Sunday. So if you download the development build on Monday morning it should have the changes. Alternatively you can download 9.0.3 nightly build and manually copy the changes off github which I can help with. It just involves copy pasting 2 text files.

NextURI support has not been fixed yet. LMS currently advertises that it supports LMS to Control Points but it doesn't. With BubbleUPnP you need to make sure Gapless Playback is disabled. With this plugin in Musicbee you need to check "disable NextUri Support" and restart everything to make sure the setting applies.

I have NextURI support working on my home system with this plugin but BubbleUPnP is not quite working correctly. It plays each track twice before moving to the next one. When making changes to LMS I need to make sure it works with everything, well, more than just this plugin.

If I can't get BubbleUPnP to work I'll submit the changes anyway as having it work with this plugin is still better than it's current state but I should at least make an effort to get it working with multiple Control Points.

edit: Fixed it, bubbleUPnP is working with gapless playback.

edit2: Gapless also works with Foobar as a Control Point. The interface is a bit clunky on that.

That's good enough for me to submit those changes to LMS.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 27, 2025, 08:07:48 AM
The changes I've made so far will not be in the 9.0.3 version. They are applying to the development version 9.1.0. And it looks like that gets built every Sunday. So if you download the development build on Monday morning it should have the changes
Good news!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 28, 2025, 01:19:19 AM
The Gapless Playback fix has been submitted. I don't expect it will make Mondays development build so it will be at least another week. Assuming it's accepted.

There's a few changes in it so they might want to review it for a while.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 28, 2025, 10:31:09 AM
The Gapless Playback fix has been submitted. I don't expect it will make Mondays development build so it will be at least another week. Assuming it's accepted.
There's a few changes in it so they might want to review it for a while.
I have noticed that you are in deep over there ;-)
It looks like your #1367 is still in progress and being discussed though?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 29, 2025, 01:19:19 AM
I have noticed that you are in deep over there ;-)

Yeah :(

Not going to lie, it's a bit frustrating having my submissions seemingly held to a higher standard than the original code. Especially when I'm adding functionality that didn't exist before on code noone has bothered to update in over a decade. But I get it. I really hate going through that code and I've taken some easy options instead of spending hours trying to understand how it all works. There is a lot of code there and one call can jump through half a dozen files with multiple calls in each, it's a massive headache to follow.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 29, 2025, 09:20:30 AM
Not going to lie, it's a bit frustrating having my submissions seemingly held to a higher standard than the original code.
Well, I read it as Herger dude truly appreciating and valuing what you are doing, but him not being all that knowledgeable about this UPnP stuff himself, being extra careful to get things right this time.
After all, Lyrion is his baby, and he may fear a situation where issues arise later, and then you might not be around anymore to help solve them.
From my point of view, things seem to be progressing quite well in a steady pace.
The both of you seem equally committed to solving this little puzzle in the best possible way.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: phred on March 29, 2025, 01:04:49 PM
Well, I read it as Herger dude truly appreciating and valuing what you are doing, but him not being all that knowledgeable about this UPnP stuff himself, being extra careful to get things right this time.
From my time on the (now) Lyrion forum, MHerger, BoomX2, and Paul Webster are the three most helpful forum members, If I followed it correctly, MHerger and BoomX2 were employed (and may still have a connection to) Logitech's Squeezebox development team. Each one of the three has helped me out more than once over the years.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 29, 2025, 01:54:36 PM
Well, I read it as Herger dude truly appreciating and valuing what you are doing, but him not being all that knowledgeable about this UPnP stuff himself, being extra careful to get things right this time.
After all, Lyrion is his baby, and he may fear a situation where issues arise later, and then you might not be around anymore to help solve them.

I get where he is coming from. I'm probably causing him more grief than the other way around. I'm just not setup to handle perl code so I'm having to make changes, test them then copy those changes around manually. It's not great and easier to make more mistakes than I already do, plus github is basically advertising your silly mistakes to all and sundry. I've just been trying to get it over with quickly which doesn't lead to the best result.

I think we are on the home stretch now though so should be out of each others hair soon.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on March 30, 2025, 07:29:09 AM
Looks like we are in business. The LMS pull request has been accepted so it might make the next development build.

If you're going to test this out, just make sure the playlist in LMS is cleared when you first start it up before starting playback in Musicbee.

When hitting play the playlist should be cleared and the track queued up followed by the NextURI. This all works fine. If you stop and then select play now on a different track it clears the list and queues the new tracks. But I've just noticed on first starting up, if LMS has a track in the playlist from a previous session, sometimes this causes some odd behaviour. I'm not sure if it's an issue with this plugin or the LMS plugin but I should be able to sort it out. It could also just be something to do with the SqueezePlay software and not effect devices.

Apart from that small issue it should just work..... hopefully. Either way, the bulk of the hardwork is done so any required fixes shouldn't be a problem.

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on March 31, 2025, 06:23:27 PM
Looks like we are in business. The LMS pull request has been accepted so it might make the next development build..
Yes, it has and it is now available:

https://lyrion.org/downloads/#v910-development-build
https://htmlpreview.github.io/?https://raw.githubusercontent.com/LMS-Community/slimserver/public/9.1/Changelog9.html

I will try it out and report back. (probably later this week)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 03, 2025, 07:47:20 PM
I began testing the plugin using Lyrion 9.1.0 and things are looking (sounding) very promising!

There are some things that I can't get to work just yet, but it will need more testing–and understanding– before I will be able to present things in a clear and repeatable manner.
But one issue I planned to report is related to the audio pitch changing depending on the 'output sample rate'.
Coincidentally (or not), today there was a bug report about something similar:
This (https://getmusicbee.com/forum/index.php?topic=42811.msg234552#msg234552) is the post about it in the Bug reports board.
Just curious if these issues are indeed related, and the issue is maybe with MusicBee itself and not with UPnP2025.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 04, 2025, 09:50:17 AM
Some questions to prevent me from doing further testing and reporting based on possibly incorrect assumptions:

1.
With all setting boxes for 'problem devices' unchecked, and MusicBee not using ReplayGain or any DSP functionality:
Will the streams to the device be in their original audio format, or are they converted to a pcm stream, depending on settings on the right side of the settings panel?

-  If in their original format, is all metadata supposed to be included and relayed to the receiving device?
-  If they are streamed as pcm, is the original metadata preserved and relayed to the receiving device somehow?

(PS, I assume MusicBee's volume slider does not affect (transcoding) the stream itself, but adjusts the volume on the playing device?)


2.
I have been wrecking my brain over the 'output sample rate' setting.
At first I thought it would set a fixed sample rate for all file types.
But reading the tooltip, it does something very different.

(https://i.imgur.com/FFYjhWC.png)
I've read it a couple of times, but I'm still not sure I understand it.
Why or when should you use this?


3.
Could you elaborate on what settings are stored for device profiles exactly?
Is it only the five checkbox options under 'problem devices' and the user-agent info, or is it everything that is available in the configuration panel?
And it is stored in the UPnPSettings.dat file, correct?
edit
Never mind, it looks like it should store everything on the lower half of the panel.
I was uncertain because I probably didn't understand how saving it exactly worked, and because there seems to be a small bug with it:
The 'force little endian' setting is remembered globally, not per preset.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 04, 2025, 01:00:09 PM
Here's an odd one.

Using UPnP2025's default settings,
My regular opus files play fine.

But, I have created a set of test files that include some very short opus tracks.
And those will not play.
MusicBee's progressbar won't move either.
(MusicBee itself will play them fine using my soundcard as output)

I've PM'ed you a link to the test files I am using.
There are 8 'discs' in it. Each disc contains a short song split in three parts.  (handy for testing gapless playback)
Each disc is in a different audio format.
So the opus disc that won't play is disc #3

the log file:
Code
30865; 16 Listen - denied 82.169.192.127
30866; 17 Listen - denied 82.169.192.127
30966; 18 Profile - Generic Device, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
0; 1 Initialise - 4/4/2025 14:29:40
33; 2 GetNetworkAddresses - 192.168.2.1,dns=True,name=Ethernet 2,speed=1000000000
34; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
34; 4 GetNetworkAddresses - http://192.168.2.1:49382
56; 5 ProcessMessage 192.168.2.111 - device 'uuid:6e52c5d4-d3c1-1894-0080-0005cdf71792:Marantz NR1509',valid=True
988; 6 ProcessMessage 192.168.2.1 - device 'uuid:3B9596A5-0FAC-3FD9-F599-8A25E8F10962:Squeezebox Classic',valid=True
990; 7 Profile - Generic Device, useragent=|Lyrion Music Server (9.1.0 - 1743612904)
991; 8 Profile - Generic Device, useragent=|Lyrion Music Server (9.1.0 - 1743612904)
1004; 9 Activate - Squeezebox Classic:http-get:*:audio/mpeg:*,http-get:*:audio/L16;rate=8000;channels=1:*,http-get:*:audio/L16;rate=8000;channels=2:*,http-get:*:audio/L16;rate=11025;channels=1:*,http-get:*:audio/L16;rate=11025;channels=2:*,http-get:*:audio/L16;rate=12000;channels=1:*,http-get:*:audio/L16;rate=12000;channels=2:*,http-get:*:audio/L16;rate=16000;channels=1:*,http-get:*:audio/L16;rate=16000;channels=2:*,http-get:*:audio/L16;rate=22050;channels=1:*,http-get:*:audio/L16;rate=22050;channels=2:*,http-get:*:audio/L16;rate=24000;channels=1:*,http-get:*:audio/L16;rate=24000;channels=2:*,http-get:*:audio/L16;rate=32000;channels=1:*,http-get:*:audio/L16;rate=32000;channels=2:*,http-get:*:audio/L16;rate=44100;channels=1:*,http-get:*:audio/L16;rate=44100;channels=2:*,http-get:*:audio/L16;rate=48000;channels=1:*,http-get:*:audio/L16;rate=48000;channels=2:*,http-get:*:audio/vnd.dlna.adts:*,http-get:*:audio/vnd.dlna.adts:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ms-wma:*,http-get:*:application/ogg:*,http-get:*:audio/flac:*,http-get:*:audio/wav:*,http-get:*:audio/opus:*
1354; 10 Listen - denied 82.169.192.127
1457; 11 Profile - Generic Device, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
5464; 12 Play - Input - K:\_MusicBee test library\UPnP test\short album\Bach cantata split in three\1-1.flac Output - (http://192.168.2.1:49382/files/0E7E3DA01C34082Ep.flac)
5599; 13 StateTimer - Playing,old=Stopped
5621; 14 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10 (64-bit); 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Lyrion Music Server/9.1.0/1743612904
5629; 15 GetFile[1] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\short album\Bach cantata split in three\1-1.flac to 192.168.2.120
5629; 16 GetFile - range=bytes 0-355816/355817
5629; 17 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10 (64-bit); 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Lyrion Music Server/9.1.0/1743612904
6120; 18 GetFile[1] - exit=0, playtime=490
6255; 19 SetNextAVTransportURI - Success - http://192.168.2.1:49382/files/DCA260A21775818Dp.flac:K:\_MusicBee test library\UPnP test\short album\Bach cantata split in three\1-2.flac
7943; 20 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10 (64-bit); 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Lyrion Music Server/9.1.0/1743612904
7943; 21 GetFile[2] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\short album\Bach cantata split in three\1-2.flac to 192.168.2.120
7943; 22 GetFile - range=bytes 0-407106/407107
7943; 23 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10 (64-bit); 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Lyrion Music Server/9.1.0/1743612904
8024; 24 GetFile[2] - exit=0, playtime=81
11509; 25 SetNextAVTransportURI - Success - http://192.168.2.1:49382/files/E37D9943109A49ECp.flac:K:\_MusicBee test library\UPnP test\short album\Bach cantata split in three\1-3.flac
11513; 26 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10 (64-bit); 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Lyrion Music Server/9.1.0/1743612904
11513; 27 GetFile[3] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\short album\Bach cantata split in three\1-3.flac to 192.168.2.120
11513; 28 GetFile - range=bytes 0-371066/371067
11513; 29 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10 (64-bit); 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Lyrion Music Server/9.1.0/1743612904
11863; 30 GetFile[3] - exit=0, playtime=350
16432; 31 SetNextAVTransportURI - Cleared
16537; 32 Listen - denied 82.169.192.127
21509; 33 Listen - denied 82.169.192.127
22122; 34 StateTimer - Stopped,old=Playing
27059; 35 Play - Input - K:\_MusicBee test library\UPnP test\short album\Bach cantata split in three\1-1.opus Output - (http://192.168.2.1:49382/files/0E7DF7070C38F6DFp.opus)
27072; 36 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10 (64-bit); 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Lyrion Music Server/9.1.0/1743612904
27072; 37 GetFile[4] 192.168.2.1 - GET K:\_MusicBee test library\UPnP test\short album\Bach cantata split in three\1-1.opus to 192.168.2.1
27072; 38 GetFile - range=bytes 0-174726/174727
27072; 39 Profile - LMS (Lyrion/Logitech Media Server), useragent=iTunes/4.7.1 (Windows; N; Windows 10 (64-bit); 8664; EN; cp1252) SqueezeCenter, Squeezebox Server, Lyrion Music Server/9.1.0/1743612904
27073; 40 GetFile[4] - exit=0, playtime=0
34693; 41 Listen - denied 82.169.192.127
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 05, 2025, 12:37:14 AM
But one issue I planned to report is related to the audio pitch changing depending on the 'output sample rate'.

I'll check it out, It might be including the wrong sample rate metadata.

Will the streams to the device be in their original audio format, or are they converted to a pcm stream, depending on settings on the right side of the settings panel?
-  If in their original format, is all metadata supposed to be included and relayed to the receiving device?
-  If they are streamed as pcm, is the original metadata preserved and relayed to the receiving device somehow?
(PS, I assume MusicBee's volume slider does not affect (transcoding) the stream itself, but adjusts the volume on the playing device?)

They will be in their original format unless they are outside the criteria listed in the right side of the panel. eg) if you have a samplerate range of 48000-92000 and the track is
44100 it will get encoded. Or if stereo only is checked and you play a 5.1 track.
Metadata is sent separately in XML format, it's not part of the audio stream. Most of the metadata is included but some things are not part of the UPnP standard. eg) replaygain isn't.
Yes, the volume slider just changes the volume on the target device.

I have been wrecking my brain over the 'output sample rate' setting.

The plugin will set the output sample rate to whatever value you have set in this field unless it is outside the sample rate range.You might have the sample rate range set to 48000-96000 so anything in that range plays natively but when something falls outside that range and gets encoded, if you want that to be 88200 you would put that value in the output sample rate. I'd expect most people would just leave it at "same as source".

edit: just to add to this. If you had the output ranges set to 48000-96000 and the output sample rate to 22050. the output sample rate will be ignored because it's outside of the range. The range is supposed to reflect the devices capabilities which is why it won't attempt 22050 in this scenario. Tracks below 48000 will get encoded to 48000, tracks above 96000 will get encoded to 96000. Anything inbetween will not get encoded.

Could you elaborate on what settings are stored for device profiles exactly?
The following settings are global
force little endian for PCM streams - I should make this profile specific.
force transcoding
force native stream
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 05, 2025, 01:20:05 AM
But, I have created a set of test files that include some very short opus tracks.
And those will not play.
MusicBee's progressbar won't move either.

Lyrion is trying to encode them to flac and failing for some reason. And I've just realised the OPUS files I have previously been testing and thought worked natively are just getting encoded to flac. But it's reporting to SqueezePlay that it's playing OPUS.... that's frustrating as I made a post on the SqueezePlay github stating it supports OPUS when it doesn't.

One problem is the file is 44.1k but musicbee was listing it as 48k. I re-encoded them with ffmpeg  
Code
ffmpeg -i "1-1.opus" "1-1 output.opus"
This fixed the mismatch but it still didn't work.

It might be an issue because they are so short. I'm not sure. Now I need to go explain why I'm dumb on the SqueezePlay github....
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Steven on April 05, 2025, 03:13:05 AM
The musicbee API doesn't support Ape. The fact I only first heard of it today and it's 25 years old might be why....
I am not planning to add encoder support for APE, so i think you are free to add your own enumeration to FileCodec and build play support without the ability to convert other formats to APE
Ape = 19

i will reserve it on the MB side so that enum value is not used in the future on the MB side
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 05, 2025, 08:05:25 AM
I am not planning to add encoder support for APE, so i think you are free to add your own enumeration to FileCodec and build play support without the ability to convert other formats to APE
Ape = 19
i will reserve it on the MB side so that enum value is not used in the future on the MB side

I see what you did there. Who am I supposed to blame now if I just didn't want to do the testing for it  :P

I'll add it in while I'm looking into the Opus issues.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 05, 2025, 08:17:09 AM
One problem is the file is 44.1k but musicbee was listing it as 48k.
Are you sure about that?
I always thought it was technically impossible for opus to be 44.1 kHz.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 05, 2025, 09:09:46 AM
Are you sure about that?
I always thought it was technically impossible for opus to be 44.1 kHz.

I was sure because MediaInfo (https://mediaarea.net/en/MediaInfo) reported it as 44.1 but I just used ffprobe and that reports it as 48 so I don't know now. That 44.1 must have come from somewhere and it reports 48k after I encode it with ffmpeg.

Anyway, it wasn't the cause of the problem because neither version worked.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 05, 2025, 09:24:59 AM
I was sure because MediaInfo (https://mediaarea.net/en/MediaInfo) reported it as 44.1 but I just used ffprobe and that reports it as 48 so I don't know now.
It looks like the guys at MediaInfo are aware of this flaw, but they don't care much about Opus and won't fix it.
What it probably shows for the sample rate is the sample rate of the originating file.

I encoded a 22.050 kHz flac to Opus to test this.
The Opus file is now 48 kHz but MediaInfo says it is 22.05 kHz.
foobar2000 shows it the best:

(https://i.imgur.com/0PX8BJa.png)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 05, 2025, 05:33:47 PM
Metadata is sent separately in XML format, it's not part of the audio stream. Most of the metadata is included but some things are not part of the UPnP standard. eg) replaygain isn't.
I see.
So that means that if you want to play your music making use of ReplayGain, it can only be done at MusicBee's side.
Which means that files will then always be transcoded to what is set in the plugin's preferences.
Ah well, I don't think that is really a problem. If you have it set to output as flac or pcm, there will be no audible degradation.

BTW, for Opus files ReplayGain does work at the side of the rendering device.
That will be because Opus stores RG information in the header of the file itself and not as metadata.



Quote
If you had the output ranges set to 48000-96000 and the output sample rate to 22050. the output sample rate will be ignored because it's outside of the range. The range is supposed to reflect the devices capabilities which is why it won't attempt 22050 in this scenario.
So does this mean the sample rate will be increased when set below the defined range, but it will also get decreased when set above the defined range?
If so, the current infotool text is not accurate?:
'If this is set lower than the minimum sample rate for this device the stream will be upsampled to match the minimum setting.'

Something like this would then be better?:
'if the value is set outside the range of what is defined under 'output sample rate', the nearest value of that range will be used'

Also, there are currently two 'output sample rate' fields.
Perhaps change the first one to: 'output sample rate range:' ?


Suggestion/request #1

Could a preset for LMS be added?
After some testing and investigation, it seems something like this should work well for the majority of LMS /Squeezebox users.

(https://i.imgur.com/dMvarCL.png)


Suggestion/request #2

There is one setting field that is white, but all others are grey:
(https://i.imgur.com/iuQTuLF.png)

Suggestion:
- make them all white
- make them al grey (greyed out and inactive) when 'force native stream' is selected.
  (assuming I understand correctly how things work)


'sound bug'

Every time a pcm stream or a wav file plays, it starts with a rather loud click and it ends with a click.
They sound like a vinyl record that has some very serious dust particles on it, on the verge of pushing the needle out of the groove. (an aspect of vinyl that I don't miss at all ;-)

Here is a gif.
Pretty much useless since there is no sound, but imagine pretty loud clicks at every start and end of a track.

(https://i.imgur.com/oQnnWGE.gif)
(It's 'album #5' from the test files that I send you earlier)

Also I notice that the progressbar behaves a bit weird. It starts moving at first, but then skips back a little bit.
Maybe there is some clue in that?


Just a thought

Perhaps add the option to convert to Opus?
Considering it is better than MP3, both in sound quality and streaming optimalisations.


PS
Big brains over at LMS are working on trying to fix the APE issue for the x64 version of Lyrion.
Nice.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 05, 2025, 06:44:39 PM
I would suggest that everyone for whom that plugin works to post the setup or devices that are used so there could be a database of supported devices. My interest would be which audio streamers (like WIIM mini) work with this plugin.
What have you done to try and test this yourself?
Do you have any recommendations for a possible WIIM preset that works, and other MusicBee/WIIM users may benefit from?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Moodymann on April 05, 2025, 06:57:56 PM
Guys, describe your experience of streaming Soundcloud in BubbleUPnP for Android using the plugin? What specific plugin settings are needed for this? If it is even possible? I have BubbleUPnP selected as the sound output in the settings, but the track does not play and this message pops up:

https://imgur.com/Kj0AdSf

I also provide the settings window, maybe you will immediately understand what is wrong:

https://imgur.com/yxnzNJ3
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 05, 2025, 07:42:57 PM
I also provide the settings window, maybe you will immediately understand what is wrong:
I know close to nothing about BubbleUPnP.
But I notice that you have changed the default preset for it.
Does it work using the original default settings?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 06, 2025, 12:21:21 AM
So that means that if you want to play your music making use of ReplayGain, it can only be done at MusicBee's side.

Correct.

Quote
Something like this would then be better?:
'if the value is set outside the range of what is defined under 'output sample rate', the nearest value of that range will be used'

Yes.

Quote
Also, there are currently two 'output sample rate' fields.
Perhaps change the first one to: 'output sample rate range:' ?

They are under different sub headings. If I change it to what you suggested it would encroach on the min field and I would have to re-align a bunch of elements. This form is just in raw code format, there is no designer UI where I can drag around the elements, I have to manually change all the location values.

Quote
Could a preset for LMS be added?
After some testing and investigation, it seems something like this should work well for the majority of LMS /Squeezebox users.

I could but I would suggest having force native stream ticked will work just as well. Especially when LMS just encodes anything the device doesn't support anyway.

Quote
There is one setting field that is white, but all others are grey:

This is to indicate it's a value that can be manually entered. Due to the reason mentioned above I'm not going to change this.

Quote
- make them all grey (greyed out and inactive) when 'force native stream' is selected.

I'll think about it. I'll be honest I'm not that motivated to perfect the options page. It's something 99% of users will play around with once and never look at again once things are working. The return on investment is low....

Quote
Every time a pcm stream or a wav file plays, it starts with a rather loud click and it ends with a click.
They sound like a vinyl record that has some very serious dust particles on it, on the verge of pushing the needle out of the groove. (an aspect of vinyl that I don't miss at all ;-)

I get this as well. Some other users were not reporting it as an issue so I figured it was hardware specific.

Quote
Also I notice that the progressbar behaves a bit weird. It starts moving at first, but then skips back a little bit.

When a track first starts playing the plugin will attempt to sync the progress bars at the 1 second mark. The UPnP standard only allows for the device to report playback position in seconds, not milliseconds. So I try and capture the moment where it changes from 0 to 1 second and set the Musicbee progress bar to 1 second at this moment. This can cause the progress bar in musicbee to jump a little bit but it doesn't effect the playback at all. Earlier attempts at this did actually seek the playing track which caused some clicks. This was solved. I don't think I'll be able to solve this particular issue.

Quote
Perhaps add the option to convert to Opus?
Considering it is better than MP3, both in sound quality and streaming optimalisations.

Is there actually a streaming device that supports Opus? Keep in mind it's only working on your squeezebox because LMS is converting it to flac.

What's wrong with just using flac?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 06, 2025, 12:41:29 AM
Guys, describe your experience of streaming Soundcloud in BubbleUPnP for Android using the plugin? What specific plugin settings are needed for this? If it is even possible? I have BubbleUPnP selected as the sound output in the settings, but the track does not play and this message pops up:

If you're streaming from the net like a radio station or soundcloud, I expect you will need to tick "output as continuous stream" at the top of the settings page. There is no getting around that. Make sure to read the little note there about not being able to display track information.

Also untick "enable remote control of musicbee via UPnP". That option is only needed if you are using Musicbee as a renderer for a control point which is very unlikely.

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 06, 2025, 12:42:27 AM
Thanks.
I will (literally) sleep on what you explained and your standpoints on things.
Most of it I can sympathise with and understand why it may not be worth the effort of making changes.
I'll probably be back later about things that I think I  don't agree with.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Moodymann on April 06, 2025, 06:55:49 AM
Guys, describe your experience of streaming Soundcloud in BubbleUPnP for Android using the plugin? What specific plugin settings are needed for this? If it is even possible? I have BubbleUPnP selected as the sound output in the settings, but the track does not play and this message pops up:

If you're streaming from the net like a radio station or soundcloud, I expect you will need to tick "output as continuous stream" at the top of the settings page. There is no getting around that. Make sure to read the little note there about not being able to display track information.

Also untick "enable remote control of musicbee via UPnP". That option is only needed if you are using Musicbee as a renderer for a control point which is very unlikely.

"Continuous stream" has never worked for me, and not with local files either. I listen to files from the library in the "force native stream" mode. It suits me. But it is not suitable for radio and Soundcloud streaming. It looks like there are some BubbleUPnP settings that I don't know about)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 06, 2025, 09:06:13 AM
About improving the configuration panel:
I understand it if it's not worth your time. It's non-essential.

About the progressbar hiccup in the first second:
It doesn't bother me. I only mentioned it in case it was related to the sound clicks.

About a preset for LMS:
A new and non-savvy user will have no clue what boxes to check, or what to enter under user agent.
Isn't that what presets are for?

About adding Opus as an output format option:
Since Opus is much better for streaming purposes than e.g. mp3, I assumed there would be devices that support it. If not, there probably will be in the future?
But it's certainly not essential.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 07, 2025, 12:20:27 AM
"Continuous stream" has never worked for me, and not with local files either. I listen to files from the library in the "force native stream" mode. It suits me. But it is not suitable for radio and Soundcloud streaming. It looks like there are some BubbleUPnP settings that I don't know about)

Continuous mode will not work with "force native stream" ticked. I should probably change it so they can't both be ticked at the same time.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 07, 2025, 12:41:05 AM
About the progressbar hiccup in the first second:
It doesn't bother me. I only mentioned it in case it was related to the sound clicks.

It's also a lot more noticeable when you are playing a bunch of very short tracks. There might be be a better way to sync the bars up but I don't know what it is. Every setup will be different in how long it takes the device to start playing a track once it's been sent a play command, so waiting for the device to report back when it's hit the 1 second mark seemed like the best way to do it. Eventing might provide a better result but that's a bit of work to setup and I have a feeling a lot of devices won't support it.

Quote
About a preset for LMS:
A new and non-savvy user will have no clue what boxes to check, or what to enter under user agent.
Isn't that what presets are for?

Yes but I've set it up now so "force native stream" is ticked by default. This should just work for a vast majority of users without having to mess around with presets at all. Profiles are a bit redundant really. It's only benefit is for users that stream to multiple devices which have different capabilities. And that's probably only an issue if some of those devices are old.

Quote
About adding Opus as an output format option:
Since Opus is much better for streaming purposes than e.g. mp3, I assumed there would be devices that support it. If not, there probably will be in the future?
But it's certainly not essential.

Is there a need for it though? I might just be ignorant on the details but I think hardware has outgrown the need for more efficient encoding when it comes to audio. In terms of bandwidth and storage. For lossy codecs anyway....
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on April 07, 2025, 01:14:18 PM
I have an Eversolo A6 Gen2 for testing, and after Eversolo's recent UPNP fix, it works flawlessly with MusicBee's plugin, at least for listening an album from top to bottom.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Moodymann on April 07, 2025, 05:37:12 PM
"Continuous stream" has never worked for me, and not with local files either. I listen to files from the library in the "force native stream" mode. It suits me. But it is not suitable for radio and Soundcloud streaming. It looks like there are some BubbleUPnP settings that I don't know about)

Continuous mode will not work with "force native stream" ticked. I should probably change it so they can't both be ticked at the same time.
I run continuous mode separately from force native stream and it doesn't work
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 10, 2025, 07:14:42 AM
I'll check it out, It might be including the wrong sample rate metadata.

It doesn't appear to be an issue with the plugin, it's sending the correct sample rates to the device. It's an issue with the Opus codec and possibly the Bass library. Maybe associated with the original sample rate stored in the header. I've replied to the bug post with a bit more info.

Ive added Ape support and that seems to be working fine. Files show as Monkey Audio in foobar as a native stream and there doesn't appear to be any issues when Ape files are encoded to other formats. I won't be setting Ape as an output format (probably can't even if I wanted to). Also considering the limitations of Opus (details in the bug thread link), I think that will create more issues than it solves so won't be making that an output format either.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 11, 2025, 06:08:40 AM
I run continuous mode separately from force native stream and it doesn't work

It looks like I've broken something here. I'll look into it.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 11, 2025, 11:41:14 AM
Continuous streaming to BubbleUPnP is broken and I don't think there is anything I can do to fix that. The issue is BubbleUPnP queries the stream first, closes it then requests it again. For normal file streaming this isn't a problem as the plugin can just open a new stream to the track but for continuous streams this is not possible.

There was a bug where Musicbee would not close streams and eventually lock up, this bug is probably what allowed BubbleUPnP to previously work with continuous streams as it's attempts to close the stream wouldn't actually close it. Fixing that bug made the plugin a lot more stable and allowed normal streams to work properly with multiple renderers including BubbleUPnP but it has obviously broken continuous streams for BubbleUPnP.

Also continuous streaming was generally just an option to get the plugin to work with difficult devices. I think we are at a point now where most devices work without the need for the continuous stream setting. Which is good because you couldn't display track information with that method, I think cross fading is probably the only thing lacking.

Continuous stream does still work with Foobar except there seems to be a problem with Musicbee switching to the next track when it reaches 50% of the current playing track. I'm currently trying to work out if that's a plugin or Musicbee issue.
Edit: Actually there isn't a problem. Musicbee just transitions to the next song early because it's caching it ahead of time. Foobar still plays the initial song to the end and transitions to the next song ok.

I can't get radio streams to work. I've set the plugin to force those streams as continuous play but they stop after 5 seconds with Foobar. I don't think that's something I can fix either. I'll run it by Steven when I sort out the 50% issue listed above. It might be possible to send the original URL to the device but then you lose any ability to change the format so it would be dependent on the device supporting whatever format the stream is in.
Edit: This isn't going to work. If I manually force continuous streams for radio streams Musicbee wont stream it correctly. It's just how it works. So to stream radio the 'output as continuous stream' option will need to be checked. The stream stopping after 5 seconds appears to be Musicbee stopping the stream and not a foobar issue so I'll discuss that with Steven.

In the meantime I'd suggest just opening radio streams on the device directly. If it's running android there's probably a desktop service like VNC you can use to connect to it from your PC.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 12, 2025, 03:53:56 PM
About a preset for LMS:
A new and non-savvy user will have no clue what boxes to check, or what to enter under user agent.
Isn't that what presets are for?
Yes but I've set it up now so "force native stream" is ticked by default. This should just work for a vast majority of users without having to mess around with presets at all. Profiles are a bit redundant really. It's only benefit is for users that stream to multiple devices which have different capabilities. And that's probably only an issue if some of those devices are old.
That won't work for me, because when using your suggested default setting using 'force native stream':
-  ReplayGain information is ignored/not working (Opus being the sole exception)
-  24 bit audio won't play
-  less common file types such as APE won't play
  (I am aware APE may be fixed after ongoing updates for both LMS and UPnP2025, but there are also other file types that MusicBee 'knows' but LMS can't play)

So I persist in my belief that having a build-in LMS preset will be beneficial.
Contrary to some 'default' setting, I'm pretty sure this proposed preset of mine will 'just work' for all LMS users and owners of Squeezebox devices.

Perhaps other older existing presets can get rid of to clean things up?
But that may require feedback from other users that are using this plugin and are using those hardware or software players.

Or maybe take the Elon Musk approach?:
Remove all presets.

And then only add presets for software/hardware devices that forum members have tested, recommended and specified because the default setting didn't work well for them and their device?

Some software and hardware devices that I think have been mentioned in this thread that seem relevant enough to make sure they work with either a default setting or else a custom preset:

-  foobar2000
-  LMS (Logitech/Lyrion Media Server)
-  Cambridge devices
-  Denon/Marantz devices
-  Eversolo devices
-  WIIM devices

And perhaps some popular gaming devices such as PlayStation and Xbox, but I don't think there has been any input or responses from users of such devices so far, so those devices can probably be ignored for now.
 
And… perhaps it makes sense to add MusicBee as a renderer preset?
edit: no, not a very smart suggestion, since that would require some UPnP rendering plugin/functionality that currently does not exist.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 12:23:27 AM
New version - mb_Upnp2025_2.0.1 (https://www.mediafire.com/file/ns3iazyi0eeg91d/mb_Upnp2025_2.0.1.zip/file) link deleted, see further post for newer version.

Changes
- Updated some tooltips.
- Added support for source files using Monkey Audio (Ape). I haven't done extensive testing but it seems to work fine with Foobar.
- 'force native stream' will be automatically unchecked if 'continuous stream' is checked.
- The plugin will ignore the state of 'disable NextURI Support' and not send a NextURI if continuous stream is checked. It's not automatically unchecked like 'force native stream' because it's a profile specific setting.
- Added a preset for Logitech/Lyrion music server. Note - presets are only loaded during initial install of the plugin.
- Added some limited support for radio streams. Continuous output needs to be unchecked.

For radio streams, the plugin will send the original radio stream URL to the device. It basically bypasses Musicbee so it can't be encoded to a different format. The device needs to support the radio stream format for it to work. I tested in Foobar and BubbleUPnP and it worked but foobar didn't like one radio stream ending in .pls, it played streams ending in .mp3 and .aac ok. Edit: .m3u8 also work. Musicbee will display the name of the radio station, the current play position and name of the first track if it's provided with the stream but it will not continually update the playing track. Not much I can do about that. When I was testing Foobar would update the current playing track if that metadata was provided in the stream but Musicbee always displayed the initial track title.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 13, 2025, 12:33:37 AM
New version - mb_Upnp2025_2.0.1 (https://www.mediafire.com/file/ns3iazyi0eeg91d/mb_Upnp2025_2.0.1.zip/file)
- Added a preset for Logitech/Lyrion music server. Note - presets are only loaded during initial install of the plugin.
Selecting that preset still seems to force native stream?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 12:37:57 AM
Selecting that preset still seems to force native stream?1

'force native stream' is a global setting and is enabled by default on initial install. I've set it up that way because I expect for 90% of users that will just work without having to do any profile shenanigans.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 13, 2025, 12:42:35 AM
'force native stream' is a global setting and is enabled by default on initial install. I've set it up that way because I expect for 90% of users that will just work without having to do any profile shenanigans.
I wish is it wasn't, and I have explained why.
It breaks some functionality for LMS/Squeezebox devices. (and probably for anyone else wanting to use ReplayGain)
So in the current state the newly added LMS preset is pretty much useless.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 12:50:20 AM
I wish is it wasn't, and I have explained why.

With it ticked by default, a large majority of users will not even have to open the settings page for the plugin to work.

If you're asking me to make the 'force native stream' profile specific or not have it ticked by default, I'm not going to do that because of the reason above.

All LMS users have to do is untick a box. I expect people talented enough to setup and install Lyrion will have a lot less problems figuring that out than a majority of general users.

edit: The biggest issue from what I've seen in here is users trying to figure out what the useragent field should be, presets get around that. The rest of the settings are pretty straight forward.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 13, 2025, 12:54:12 AM
All LMS users have to do is untick a box. I expect people talented enough to setup and install Lyrion will have a lot less problems figuring that out than a majority of general users.
That's obviously your decision and prerogative.
But forcing it to use native stream is only causing issues for LMS/Squeezeboxes, and not solving any.
So my stance and ask is then to please remove the LMS preset that I have provided so I can use my preset as I intended.

edit
Note that by forcing this 'force native stream' checkbox, you are deciding that the majority of MusicBee users don't care about ReplayGain.
Are you sure about that?

Honest question: what is so great about 'force native stream'?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 01:52:43 AM
But forcing it to use native stream is only causing issues for LMS/Squeezeboxes, and not solving any.
So my stance and ask is then to please remove the LMS preset that I have provided so I can use my preset as I intended.

So untick the option.... If you don't want to use the profile just delete it or edit it how you want. The preset only gets loaded on initial setup, any changes you make to it will not get overwritten.

Note, for some LMS users, having force native stream ticked will work just fine.

Note that by forcing this 'force native stream' checkbox, you are deciding that the majority of MusicBee users don't care about ReplayGain.
Are you sure about that?

I expect users that have played around with Musicbee enough to setup replaygain would be able to navigate the settings page of the plugin. For users that just want to hit play and have it work, 'force native stream' is the best option for most cases.

Honest question: what is so great about 'force native stream'?

It has a higher chance of working without users having to configure anything. There is always going to be exceptions to this and it's a game of diminishing returns trying to cater for every possible configuration/outcome.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 13, 2025, 02:07:33 AM
Note, for some LMS users, having force native stream ticked will work just fine.
Really? For 'some' LMS users it will work just fine? Which ones?
Have they contributed here? Have I missed something?
Things working 'just fine' for some imaginary users is good enough?

Honestly: I have tons of respect for your work, efforts and attitude.
But I am clueless why you persist in not implementing my preset in the way I have thoroughly tested, presented and have reported on it.
I have clearly explained the very obvious negatives of your 'tweak' to it.

So again, if you don't agree with the preset as I have presented it to you, please remove it all together.
The way it is now completely defeats its purpose and the general concept of what presets are for, and it is not why I have shared it.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 02:28:16 AM
Really? For 'some' LMS users it will work just fine? Which ones?
Have they contributed here? Have I missed something?
Things working 'just fine' for some imaginary users is good enough?

Take a breath. You are effectively complaining over having to untick a checkbox. While I get you want it to just work without any user intervention, the change you're suggesting requires me to take something simple and make it more complicated and a likelihood the plugin will not work out of the box for other users. While I appreciate your contributions, I'm the one responsible for supporting other users when they post in here about things not working. I don't have stats but I'm certain leaving 'force native stream' enabled by default will reduce the amount of support posts I have to deal with in here.

While the preset might not work how you want, it does mean users will not have to manually create the profile which is more work than just unticking a checkbox.

It's already shared in this thread anyway so people can look it up and use it if they want so I don't see an issue including it. If you want me to remove it I'll consider it but I'd suggest sleeping on that decision first.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 03:29:45 AM
Actually I'll keep things simple and remove it. I don't want some argument about stealing other peoples ideas/work. Edit: not stating that's been suggested but some of the terminology being used implies ownership and I don't want to deal with it.

New version - mb_Upnp2025_2.0.2 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

changes
- everything in version 2.0.1 linked on the previous page. The 2.0.1 link has been deleted.
- Removed LMS preset
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Honk on April 13, 2025, 10:45:26 AM
Plugin works with my WiiM Amp, just had to add profile that someone suggested in this thread. Thanks!

One thing that hinders my enjoyment though. Can we get folder tree view? I know where my music is by browsing MusicBee Library by folder/tree structures, since I can't remember artist names, especially when they are japanese names >.< For example UMS does offer folder tree view, so it's way easier for me to browse my stuff.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 11:00:45 AM
One thing that hinders my enjoyment though. Can we get folder tree view? I know where my music is by browsing MusicBee Library by folder/tree structures, since I can't remember artist names, especially when they are japanese names >.< I am not sure if this is WiiM thing, is DLNA thing.

That's probably not going to happen. When you search using the folder/tree structure, how do you find what you are looking for?

The plugin allows you to browse by artist or album which is usually how most music directories are structured. Or do you just go on something like the 3rd folder in a directory?

If I'm understanding this correctly, you are browsing the Musicbee library from your device and playing a track from there. Another alternative is setting your device as the output in Musicbee and using Musicbee to send the track to your device. That way you can use the folder/tree structure in musicbee to find the track you want to play.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Honk on April 13, 2025, 11:08:01 AM
One thing that hinders my enjoyment though. Can we get folder tree view? I know where my music is by browsing MusicBee Library by folder/tree structures, since I can't remember artist names, especially when they are japanese names >.< I am not sure if this is WiiM thing, is DLNA thing.

That's probably not going to happen. When you search using the folder/tree structure, how do you find what you are looking for?

The plugin allows you to browse by artist or album which is usually how most music directories are structured. Or do you just go on something like the 3rd folder in a directory?

If I'm understanding this correctly, you are browsing the Musicbee library from your device and playing a track from there. Another alternative is setting your device as the output in Musicbee and using Musicbee to send the track to your device. That way you can use the folder/tree structure in musicbee to find the track you want to play.

Yes, I am browsing from my phone (the WiiM app), as I want to quickly set what to play when I am doing stuff, instead of constantly returning to my PC to queue/skip another thing.

I manage my stuff using folders, so it looks like this: https://prnt.sc/fV9FJ1f2u6mB

It's easier for me to manage, its sorted as I want and as I am used to. To be frank I do not use tags, artists or albums, as I said, I don't remember them, I have too much and in languages I can't really read.

Mind if I ask why it's not going to happen? I know that UMS for example has this, so AFAIK the DLNA server is the one that dictates what client can see.

EDIT: This is simply unusable: https://prnt.sc/2LxTuAI0UZCR Especially because searching isn't working. Can I somehow help out at least getting the search function working? That would help big time.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 11:20:43 AM
Mind if I ask why it's not going to happen? I know that UMS for example has this, so AFAIK the DLNA server is the one that dictates what client can see.

To be completely honest, time and motivation. Plus there are other alternatives that already do what you want. If you're not using tags/artist/album names for your folder structure, you don't really need Musicbee at all, you could just use windows built in DLNA functionality.

edit: Searching is something I'm willing to look into, I can confirm that is not currently working.
edit2: Actually it seems to be intermittent. BubbleUPnP popped up an error initially but then successfully searched. I'll take a closer look anyway.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Honk on April 13, 2025, 11:23:58 AM
Mind if I ask why it's not going to happen? I know that UMS for example has this, so AFAIK the DLNA server is the one that dictates what client can see.

To be completely honest, time and motivation. Plus there are other alternatives that already do what you want. If you're not using tags/artist/album names for your folder structure, you don't really need Musicbee at all, you could just use windows built in DLNA functionality.

Understandable, I just wanted to have everything under one roof. You know, not having 20 different programs for each individual thing :D Nw
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 11:31:30 AM
Understandable, I just wanted to have everything under one roof. You know, not having 20 different programs for each individual thing :D Nw

I can agree with that sentiment.

Not to imply your way of doing things is wrong but is this a problem that could be solved with just setting up some playlists?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Honk on April 13, 2025, 11:39:30 AM
Understandable, I just wanted to have everything under one roof. You know, not having 20 different programs for each individual thing :D Nw

I can agree with that sentiment.

Not to imply your way of doing things is wrong but is this a problem that could be solved with just setting up some playlists?

No, it would not? How do you want to replace folder tree with playlists. I am not playing X favorite songs over and over again :D
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 13, 2025, 11:46:27 AM
It's easier for me to manage, its sorted as I want and as I am used to. To be frank I do not use tags, artists or albums, as I said, I don't remember them, I have too much and in languages I can't really read.
Have you tried MinimServer as its folder view implementation is very good, the only caveat with the free version is that it doesn't perform any transcoding (won't process ReplayGain).

If you don't remember artist or album tags how is search going to help?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Honk on April 13, 2025, 11:54:56 AM
It's easier for me to manage, its sorted as I want and as I am used to. To be frank I do not use tags, artists or albums, as I said, I don't remember them, I have too much and in languages I can't really read.
Have you tried MinimServer as its folder view implementation is very good, the only caveat with the free version is that it doesn't perform any transcoding (won't process ReplayGain).

If you don't remember artist or album tags how is search going to help?

Not tried yet, I wasn't even aware it exists. About the search - yeah, you have a point, won't help much especially for east albums.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 12:07:02 PM
No, it would not? How do you want to replace folder tree with playlists. I am not playing X favorite songs over and over again :D

Auto-playlists can do some pretty amazing things.

I'm still not really sure how you are selecting your music to play, simbun's question about searching seems like a valid one. The screenshots you provided seem to show that your library is sorted in artist/album structure for the most part. Obviously that's an issue with the japanese characters but if you don't know what they are, how does search help?

As an example of what auto playlists can do. My partner has a top rated auto playlist that only contains songs that are rated 4+ stars. Anytime she rates a song 4 or 5 stars it's automatically added to that playlist. If she changes her mind and lowers the rating below 4 stars it gets removed automatically.

So what you could do is setup an auto playlist that contains whatever songs you want to play for the week/day and configure it so it only includes songs that haven't been played since yesterday. Stick it on shuffle and just listen to that playlist all week/day, as songs have been played they will be removed from the playlist.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 13, 2025, 12:11:11 PM
Selecting that preset still seems to force native stream?1

'force native stream' is a global setting and is enabled by default on initial install. I've set it up that way because I expect for 90% of users that will just work without having to do any profile shenanigans.

To offer up another opinion (to be honest I've only skimmed the posts so I have no idea which camp this falls into), I would think the default configuration should aim for bit-perfect playback and compatibility, as such I would expect the profiles to be taken into account - assuming the profiles are configured around the limitations of the devices, not user preference.

As I said I haven't read the posts in detail so I may well have missed the nuance of what @hiccup is asking for, but I can't see a reason why they wouldn't be used.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 12:43:37 PM
To offer up another opinion (to be honest I've only skimmed the posts so I have no idea which camp this falls into), I would think the default configuration should aim for bit-perfect playback and compatibility, as such I would expect the profiles to be taken into account - assuming the profiles are configured around the limitations of the devices, not user preference.

The profiles are taken into account when force native stream is unchecked. 'force native stream' is not a profile specific setting. it's a global setting implemented to allow the plugin to work with minimal user interaction for most users.

There is also a non zero chance the user has a device that doesn't match any of the profiles/presets. In which case 'force native stream' has a much higher chance of working than the generic profile.

This isn't directed at you specifically but It's not something I thought would need defending. For people that don't know what they are doing it has a much higher chance of working, for people that do know what they are doing, uncheck the setting and move on with your life.

And again, not directed at you but as far as I'm concerned, the conversation over 'force native stream' is done.


Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 13, 2025, 01:41:32 PM
This isn't directed at you specifically but It's not something I thought would need defending.
Please don't take any of my comments as criticism, I'm sure that everyone on this forum appreciates the work you've done to get it this far already. I don't actually use MusicBee, but I appreciate there's a demand for a Windows desktop UPnP player so I'm just trying to make it the best it can be.

There is also a non zero chance the user has a device that doesn't match any of the profiles/presets. In which case 'force native stream' has a much higher chance of working than the generic profile.
I'd forgot that a Generic Device profile existed. I absolutely agree that the default should be native playback, but when MusicBee knows that native playback isn't going to work (has a matching profile) it seems strange to do it anyway, but that's your call.

I've just downloaded the latest plugin and even with 'force native stream' enabled the maximum picture size (I haven't tested any other profile settings) of the matching profile is honored; should it be?

Given that quite a lot of people will want to disable the global 'force native stream' (I need to for the Sonos (sample rate) and WiiM (picture size) units I've tested) do non-matching renderers still receive the native stream, or will the Generic Device profile apply?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 13, 2025, 03:01:19 PM
I'd forgot that a Generic Device profile existed. I absolutely agree that the default should be native playback, but when MusicBee knows that native playback isn't going to work (has a matching profile) it seems strange to do it anyway, but that's your call.

You're probably pushing the criticism line there.... In any case, could I work out if devices can natively play back a certain format ahead of time? Maybe.... but when they use the same useragent for multiple models which have different capabilities and don't always follow the UPnP standard, I'm not prepared to play the trial and error game.

Quote
I've just downloaded the latest plugin and even with 'force native stream' enabled the maximum picture size (I haven't tested any other profile settings) of the matching profile is honored; should it be?
Image size is profile specific and separate from the stream format. The other Voldemort setting you mentioned is not profile specific. If the device useragent doesn't match an existing profile it will use the image size for the generic profile. 160px is the default for the UPnP standard, any device claiming to support the standard should accept that resolution.

Quote
Given that quite a lot of people will want to disable the global 'force native stream'

Careful now, someone might make you defend your assumptions.

If you untick that will shall not be named, the plugin will use whatever profile settings match the device useragent, if there is no match it will use the generic profile settings which has a decent chance of not working, hence the last 2 pages of discussion.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 14, 2025, 10:23:38 AM
If you untick that will shall not be named, the plugin will use whatever profile settings match the device useragent, if there is no match it will use the generic profile settings which has a decent chance of not working, hence the last 2 pages of discussion.

I've read the last few pages and this just doesn't make sense to me, so I must be missing something.

My current understanding is

With 'force native stream'
- the source file is sent to the renderer without any checks at all.

Without 'force native stream'
- check to see if the renderer supports the source format (using the list of mime types provided by the renderer)
- check if source resolution, bit depth and channel count  is supported (against the Generic Device profile if a matching profile doesn't exist)

If any of those checks fail the source is transcoded to PCM, which I believe is supported by all renderers - although I've been unable to confirm that as I can't find the DLNA specification.


Assuming that everything else remains the same (UPnP communication wise) why would a 44.1 kHz PCM file be more likely to fail than a 48kHz Opus/192 kHz FLAC?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 14, 2025, 08:30:14 PM
I've read the last few pages and this just doesn't make sense to me, so I must be missing something.
I think you have a pretty good idea.
I still don't understand it either.

Note that I am all for:
1.  making things as easy as possible for less-savvy users ('it just works' is what elevates MB over other players and their plugins such as fb2k)
   (damn, how I love BoringName's VUmeter plugin more every time I see how they are struggling and complicating it over there at fb2k)
2.  allowing more-savvy users to achieve what they are aiming to do

The way 'force native stream' is currently implemented doesn't serve either in my opinion.
-  for less-savvy users, I don't see how it would work better than having some 'default' setting that simply transports/encodes everything adhering to the most basic and minimal UPnP/DLNA standards. (the last described DLNA standard dates back to 2016, so all get aboard the yellow time machine)
-  for more-savvy users I understand why when they e.g. select a preset, they are confused why it won't work, maybe later finding out that it's because there is some sticky checkbox with a 'global' label that trumps and defeats what the preset they have intentionally selected was designed for and is supposed to do.

So neither the less-savvy nor the more-savvy users will probably understand what is going on or how things work exactly.

The logic behind the current implementation just seems flawed to me, and I think this discussion is proof enough that this deserves a fresh look and some serious rethinking.
(a porch, a dog, a cigar, a sunset)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on April 18, 2025, 05:17:25 PM
Hello,

Version 1.9.3 and 2.0.2

For Marantz users, do not update your devices. The new firmware prevents the plug'in from working properly.

Radios no longer work in continuous streaming. The device goes into standby mode after a certain time, even if a playlist is running. Device no longer displays format and time remaining. The last song in the playlist starts, then the playlist stops.

It's the same with the jellyfin media player and its dlna plug'in.

Translated with DeepL.com (free version)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 19, 2025, 08:19:27 AM

With 'force native stream'
- the source file is sent to the renderer without any checks at all.

Correct.

Quote
Without 'force native stream'
- check to see if the renderer supports the source format (using the list of mime types provided by the renderer)
- check if source resolution, bit depth and channel count  is supported (against the Generic Device profile if a matching profile doesn't exist)

It checks if the mimetype is supported.
It only checks resolution and bit depth for L16/L24/Wav mimetypes. it doesn't check channel count.

Quote
If any of those checks fail the source is transcoded to PCM, which I believe is supported by all renderers - although I've been unable to confirm that as I can't find the DLNA specification.

It's transcoded to whatever is set for that profile and your assumption that all renderers support PCM is incorrect.

Quote
Assuming that everything else remains the same (UPnP communication wise) why would a 44.1 kHz PCM file be more likely to fail than a 48kHz Opus/192 kHz FLAC?

I don't really know why you are making that comparison. It's got nothing to do with PCM vs whatever or what formats are compatible with what devices. It's got to do with settings that will work for the most users out of the box.

My argument is for 'most' users, 'force native stream' will work out of the box with the plugin. They can just install the plugin, set their device as the output and it will work. That means they won't have to open the plugin settings at all and less people needing support. It's a no brainer as far as I'm concerned.

If you can prove my argument wrong. I'll consider changing it.

Pointing to a specific format/device combo does not prove that argument wrong.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 19, 2025, 08:22:36 AM
Radios no longer work in continuous streaming.

Radio streams are partially supported now when continuous stream is unchecked. The streams cannot be encoded by the plugin so it all comes down to whether the device supports the stream format.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 19, 2025, 08:28:55 AM
-  for less-savvy users, I don't see how it would work better than having some 'default' setting that simply transports/encodes everything adhering to the most basic and minimal UPnP/DLNA standards.
(the last described DLNA standard dates back to 2016, so all get aboard the yellow time machine)


In a perfect world where all devices supported the standard correctly that might almost work.

Quote
-  for more-savvy users I understand why when they e.g. select a preset, they are confused why it won't work, maybe later finding out that it's because there is some sticky checkbox with a 'global' label that trumps and defeats what the preset they have intentionally selected was designed for and is supposed to do.

So if you had a choice, would you make it harder for less savvy people or make it harder for more savvy people? Keep in mind the more savvy people will also have a higher chance of it working out of the box and would also be more capable of figuring out why it doesn't.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 19, 2025, 09:02:58 AM
So if you had a choice, would you make it harder for less savvy people or make it harder for more savvy people?
My aim is, and always has been to make things as easy and logical as possible for less-savvy users.
Which is why I have a gripe with how 'force native stream' is currently implemented.

A scenario:

A MusicBee user has Squeezebox devices, and learns that there is a plugin that allows him to use MusicBee to play his music on them.
Great!

So he installs UPnP2025, and sees that there is even a preset for LMS (his Squeezeoxes) available.
Great again!
So he selects that preset, and starts playing his music.

Finding out that not all of his music will play.
Not having any clue whatsoever why that is.
Not so great.

This could be easily avoided if the 'force native stream' entry would follow the value that a preset has for it.

---

About having 'force native stream' the default because it is likely to work best for the majority of users/devices: I just doubt that, but if you are convinced that it is, no problem, I can obviously respect that.

But it shouldn't break the functioning of carefully created and tested presets without any clue or visual indication to the user.

---

edit
Perhaps another approach could be to have two generic presets at the top.
Something like:

-  Generic (basic UPnP/DLNA)
-  Generic (force native stream)

Then a newbie who is not interested in diving into the technicalities could simply try which of these two works best for him.
 
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 19, 2025, 10:33:37 AM
So he installs UPnP2025, and sees that there is even a preset for LMS (his Squeezeoxes) available.

Your forgetting a majority of people wouldn't even need to open the settings with fns ticked. And squeezeboxes are not a great example because LMS does it's own conversion for unsupported formats which is even more reason for the plugin to just use native streams. In any case, it's really only an issue if the device does not support whatever format the user has their library in. I could be wrong but I would think a large majority would be using mp3/AAC/Flac which would be supported natively by most modern devices.

Quote
This could be easily avoided if the 'force native stream' entry would follow the value that a preset has for it.

The whole purpose of fns is to ignore presets.

Quote
About having 'force native stream' the default because it is likely to work best for the majority of users/devices: I just doubt that, but if you are convinced that it is, no problem, I can obviously respect that.

Based on all the testing I've done with multiple renderers, Native stream not only has a higher chance of playing across multiple formats but also has a higher chance of the device displaying the correct progress and seeking working successfully. The way musicbee and the plugin interact with encoded streams limits what metadata can be pre-calculated and sent to the device. This effects seeking functionality and whether the device will display the correct progress values. ie) it's always best to use a native stream if possible.

Quote
But it shouldn't break the functioning of carefully created and tested presets without any clue or visual indication to the user.

It doesn't break anything. Force Native Stream is about as clear as it can be on what it means, it also has a tooltip for further clarification. I expect the only time users will even have an issue is when they try and play a less popular codec and it doesn't work. Then they have to do a little research to figure it out, I'll take that over making everyone look over the settings unnecessarily.

Quote
edit
Perhaps another approach could be to have two generic presets at the top.
Something like:

-  Generic (basic UPnP/DLNA)
-  Generic (force native stream)

Then a newbie who is not interested in diving into the technicalities could simply try which of these two works best for him.
 

I'm not doing that. Again, most of them wont even need to look at the settings page with fns ticked by default.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 19, 2025, 10:56:08 AM
Your forgetting a majority of people wouldn't even need to open the settings with fns ticked.
I don't think I 'forgot', and it's perfectly fine and understandable that you are trying to make the plugin work as good as possible out-of-the-box without any further user action.

Quote from: BoringName
I'm not doing that. Again, most of them wont even need to look at the settings page with fns ticked by default.
So that means that in your opinion, any user that does open the settings panel and selects a preset should have a good understanding of both what FNS does, and how the interface does not reflect if a preset is even respected.

I keep disagreeing on that and believe it is a fundamental flaw.
Both in logic and in UI.
But discussing it further doesn't seem to bring us any closer at all, so it's probably best to leave it at this.

edited for typos and making my standpoint a bit clearer.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 19, 2025, 01:15:30 PM
Based on all the testing I've done with multiple renderers, Native stream not only has a higher chance of playing across multiple formats but also has a higher chance of the device displaying the correct progress and seeking working successfully. The way musicbee and the plugin interact with encoded streams limits what metadata can be pre-calculated and sent to the device. This effects seeking functionality and whether the device will display the correct progress values. ie) it's always best to use a native stream if possible.
There are some very good reasons there.

How about we remove the 'force native stream' option (it's still the default behaviour) and instead of enabling/disabling fns globally to use profiles, we activate each one individually? So an LMS user would just enable/activate the LMS profile and all their other non-LMS renderers would still be sent the native stream.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 19, 2025, 02:28:03 PM
So that means that it in your opinion, any user that does open the settings panel and selects a preset should have a thorough understanding of both what FNS does, and how the interface does not reflect if a preset is even respected.

I think you have misunderstood how profiles work. They don't need to be selected. Any device whose useragent matches a profile will use those settings (if fns is unchecked). Selecting a profile on the settings page just allows you to change settings for that profile, it doesn't make it the default profile for all devices.

In any case, yes, if someone opens the settings page I expect them to read the tooltips. fns is listed as a global setting. I don't think I need to dumb it down further.

Having a profile isn't a magic bullet, useragents can be shared amongst devices, there is no guarantee they will work.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 19, 2025, 02:30:40 PM
How about we remove the 'force native stream' option (it's still the default behaviour) and instead of enabling/disabling fns globally to use profiles, we activate each one individually? So an LMS user would just enable/activate the LMS profile and all their other non-LMS renderers would still be sent the native stream.

I've already explained why I don't want to make it profile specific and nothing discussed in the last 3 pages has convinced me to change my stance on that.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 19, 2025, 02:43:21 PM
I think you have misunderstood how profiles work. They don't need to be selected.
That may be true.
But it doesn't change the fact that 'my' LMS preset would not have worked out-of-the-box anyway, even though it contains the correct user-agent information.
And that it would have worked if only the plugin would respect what profiles say about using FNS or not.

---

So, if things stay as they are, it looks like the conclusion will be:

-  profiles will not work at all if FNS happens to be checked. (in the 'hidden' settings panel)
-  for users that dare to open the settings panel, the UI will not make it obvious that profiles are by default completely disabled. (as a result of FNS being checked)

Ah well, at least this information is now available for users that run into issues and are confused, but are willing to go through this lengthy thread.
And savvy++ users will probably also be able to understand what is going on.

still, not great
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 19, 2025, 04:35:01 PM
So that means that it in your opinion, any user that does open the settings panel and selects a preset should have a thorough understanding of both what FNS does, and how the interface does not reflect if a preset is even respected.

I think you have misunderstood how profiles work. They don't need to be selected. Any device whose useragent matches a profile will use those settings (if fns is unchecked).
I do understand how they currently work, they're either all on (fns is unchecked) or all off (fns is checked). I'm suggesting you add the ability to enable/disable each profile independently e.g.
Code
Generic Device  Disabled
LMS             Enabled
BubbleUPnP      Disabled
Every renderer that doesn't have an activated profile will be sent native streams (all profiles will be disabled by default). It's basically what you've got now without the problems associated with a global switch.

EDIT: I've just realised that I replied to the wrong message!

Ok I give up :-) As I have material that Sonos doesn't support I'll need to create a profile for Sonos then change the Generic Device profile so that none of my other renderers receive transcoded streams.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 19, 2025, 06:00:43 PM
Ok I give up :-) As I have material that Sonos doesn't support I'll need to create a profile for Sonos then change the Generic Device profile so that none of my other renderers receive transcoded streams.
(I think) I feel your pain.
But if I am not mistaken, BoringName has explained that Sonos is equally evil/awful/difficult as Apple where it comes to making things (continue to) work for people that are not imprisoned/confined to the barbed-wired gardens of such companies.
And that he is not willing or interested in investing more of his time in it.

So, I'm not sure if this should be discussed/continued here, or possibly better in some dedicated 'Sonos UPnP' topic.
(you are welcome to create a dedicated Sonos post here (https://getmusicbee.com/forum/index.php?topic=42853.msg234825#msg234825) for sharing your experiences or recommendations as far as I am concerned)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on April 19, 2025, 06:11:34 PM
Hello,

I tried to change plug'in version and got this error when I want to configure it
error during plug'in configuration upnp2025 all versions

MusicBee v3.6.9202.37404D  (Win10.0), 19 avr. 2025 16:26:

System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> System.ArgumentOutOfRangeException: InvalidArgument=La valeur '2' n'est pas valide pour 'index'.
Nom du paramètre : index
   à System.Windows.Forms.ListView.ListViewItemCollection.get_Item(Int32 index)
   à MusicBeePlugin.Plugin.SettingsDialog..ctor()
   à MusicBeePlugin.Plugin.Configure(IntPtr panelHandle)
   --- Fin de la trace de la pile d'exception interne ---
   à System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   à System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   à System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   à #=zl6ttC0IWy5eCK5spaA==.#=zwf7rfs4=(IntPtr #=zMxLmyMTQlCb$)

ok after reinstalation
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 19, 2025, 06:16:07 PM
Ok I give up :-) As I have material that Sonos doesn't support I'll need to create a profile for Sonos then change the Generic Device profile so that none of my other renderers receive transcoded streams.
(I think) I feel your pain.
But if I am not mistaken, BoringName has explained that Sonos is equally evil/awful as Apple where it comes to making things (continue to) work for people that are not imprisoned/confined to their barbed-wired gardens.

My example isn't specific to Sonos, it applies to anyone with a mix of renderers where one needs a profile. If you had a non-LMS renderer and material > 16/48 then you'd need to change the Generic Device profile too.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 19, 2025, 06:27:12 PM
it applies to anyone with a mix of renderers where one needs a profile. If you had a non-LMS renderer and material > 16/48 then you'd need to change the Generic Device profile too.
Sorry, I don't think I understand.
Is it about you having different renderers that don't advertise unique user-agents that you could use to create profiles for?

edit
Something else that I may not have a correct or good understanding of:
When in MusicBee I select my Squeezebox Classic as output device (or you, your Sonos), that does not per se define what profile will be used?
I probably assumed it would somehow, but that's probably incorrect.

Damn, it's not easy to get a comprehensive grasp of everything involved here.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 19, 2025, 11:33:58 PM
it applies to anyone with a mix of renderers where one needs a profile. If you had a non-LMS renderer and material > 16/48 then you'd need to change the Generic Device profile too.
Sorry, I don't think I understand.
Is it about you having different renderers that don't advertise unique user-agents that you could use to create profiles for?
Let's say that you had a WiiM/CA/Marantz renderer in addition to your Squeezebox, all of which are capable of 24/192.
Because you want to use a custom profile for your Squeezebox you disable 'force native stream'; this results in every renderer being matched (on the user-agent string) to a profile (because 'force native stream' is a global setting), and where there isn't a match the Generic Device profile is used.
So, enabling your LMS profile causes all streams (that are in excess of 16/48) to your WiiM/CA/Marantz to be transcoded to 16/48 (the limits of the Generic Device profile), unless you change the Generic Device profile (increase to 24/192) or create a custom profile for your WiiM/CA/Marantz.


When in MusicBee I select my Squeezebox Classic as output device (or you, your Sonos), that does not per se define what profile will be used?
I probably assumed it would somehow, but that's probably incorrect.
It's the user-agent of the renderer that's matched to profiles. The specification (https://openconnectivity.org/upnp-specs/UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf) states the user agent should be comprised of 'OS/version UPnP/(1.1|2.0) product/version' but that's certainly not the case for all renderers, especially software based ones.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 20, 2025, 12:03:05 AM
-  for users that dare to open the settings panel, the UI will not make it obvious that profiles are by default completely disabled. (as a result of FNS being checked)

I might be expecting too much but I am running under the assumption that people have the ability to read.

I do understand how they currently work, they're either all on (fns is unchecked) or all off (fns is checked). I'm suggesting you add the ability to enable/disable each profile independently e.g.

I was replying to Hiccup. If it gets to a point where a user wants different configurations per device they can just modify the profiles so an encode is triggered or not per device.

Ok I give up :-) As I have material that Sonos doesn't support I'll need to create a profile for Sonos then change the Generic Device profile so that none of my other renderers receive transcoded streams.

That's all you have to do. Force native stream isn't going to work for you. If a majority of users had your setup I wouldn't have fns on by default. No settings are going to work for everybody, I'm just trying to get it to work for most people with the least amount of hassle. Unfortunately you are not "most" people. I'm making an assumption most people are not streaming to multiple devices with different capabilities. I'll concede I could be wrong there as I have no evidence at all, but no one has shown me evidence to the contrary so that's what I'm going with.

This plugin has been downloaded hundreds of times. If fns on by default was such a big issue I expect there would be more noise about it.

My example isn't specific to Sonos, it applies to anyone with a mix of renderers where one needs a profile. If you had a non-LMS renderer and material > 16/48 then you'd need to change the Generic Device profile too.

Or you setup a profile for the non-LMS renderer.

If you have multiple devices with different capabilities you should setup a profile for each. If you have multiple devices with different useragents but the same capabilities, you could just remove any profiles that match the useragent so all the devices use the generic profile. Then just edit the generic profile to do what you want.

For most people, leaving fns ticked will mean they don't have to do any of the above,  even with multiple devices. As you pointed out, Sonos don't follow the standard so it's going to have issues.

When in MusicBee I select my Squeezebox Classic as output device (or you, your Sonos), that does not per se define what profile will be used?
I probably assumed it would somehow, but that's probably incorrect.

When you select an ouput device. whatever useragent that device uses will be compared to all the profiles. If it matches a useragent in a profile, that profile will be used (if fns is unchecked).

Quote
Damn, it's not easy to get a comprehensive grasp of everything involved here.

Now maybe you can understand why I want to minimise the need for anyone to open the settings page?

I actually can't believe this much discussion is all over one setting, a checkbox no less which clearly states what it does and can be changed with a click. We've spent more time waffling on about it than the next 1000 users will spend changing it....
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 20, 2025, 12:10:51 AM
Hello,

I tried to change plug'in version and got this error when I want to configure it
error during plug'in configuration upnp2025 all versions

Some versions can't be downgraded without removing the settings file. If a new version adds a new setting, either base setting or profile setting, it changes the layout of the settings file and it will no longer be compatible with older versions.

I might look at setting it up to back up the old version setting file when versions are upgraded just in case the user wants to roll back. Edit: or at least being a bit more graceful when it encounters a problem with the settings file.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on April 20, 2025, 01:16:16 AM
I'm using multiple devices (Eversolo, Cambridge, even tried a Wiim recently) without any issues.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 20, 2025, 09:08:37 AM
I'm using multiple devices (Eversolo, Cambridge, even tried a Wiim recently) without any issues.
It only starts to get interesting/complicated if:
- you have source material that isn't supported by your renderers
- you have hi-resolution source material and want to perform DSP e.g. apply ReplayGain
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 20, 2025, 09:32:14 AM
Ok I give up :-) As I have material that Sonos doesn't support I'll need to create a profile for Sonos then change the Generic Device profile so that none of my other renderers receive transcoded streams.

That's all you have to do. Force native stream isn't going to work for you. If a majority of users had your setup I wouldn't have fns on by default. No settings are going to work for everybody, I'm just trying to get it to work for most people with the least amount of hassle.
I understand that I'm always going to need to create a Sonos profile, it's the additional step to prevent my other renderers being affected that I find unnecessary, especially when the solution is simple and elegant - you simply enable/activate the required profiles. Although without the toggle you can't disable all the DSP over UPnP, if that's desirable. Anyway, as you say let's move on.


Going back to a previous response:

Without 'force native stream'
- check to see if the renderer supports the source format (using the list of mime types provided by the renderer)
- check if source resolution, bit depth and channel count  is supported (against the Generic Device profile if a matching profile doesn't exist)

It checks if the mimetype is supported.
It only checks resolution and bit depth for L16/L24/Wav mimetypes. it doesn't check channel count.

When I hear L16/L24 I think of raw PCM, but FLAC is checked.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on April 20, 2025, 11:18:30 AM
I'm using multiple devices (Eversolo, Cambridge, even tried a Wiim recently) without any issues.
It only starts to get interesting/complicated if:
- you have source material that isn't supported by your renderers
- you have hi-resolution source material and want to perform DSP e.g. apply ReplayGain

Oh, OK, thanks for clarifying. I'm only using FLACs, max 24-192, but sometimes I do use EQ, and no issues so far. I don't use Replay Gain though...
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 20, 2025, 11:41:49 AM
It only starts to get interesting/complicated if:
- you have source material that isn't supported by your renderers
- you have hi-resolution source material and want to perform DSP e.g. apply ReplayGain

Oh, OK, thanks for clarifying. I'm only using FLACs, max 24-192, but sometimes I do use EQ, and no issues so far. I don't use Replay Gain though...
I'm not at home at the moment to test, but I think to apply EQ you'll need to disable 'force native stream' which means your hi-res FLACs will be transcoded to 16/48 PCM (as your renderers will be matched to the Generic Device profile), but take a look in the debug log to verify that.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jorgemg1984 on April 20, 2025, 12:28:32 PM
I'll check too.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 20, 2025, 07:27:44 PM
-  for users that dare to open the settings panel, the UI will not make it obvious that profiles are by default completely disabled. (as a result of FNS being checked)
I might be expecting too much but I am running under the assumption that people have the ability to read.
wow

The hoofs really seem to be into the sand.
(I hope I got that expression right, me not being a native English speaker)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 20, 2025, 11:06:18 PM
I'll check too.
I've just configured some sound effects (Preferences > Player > sound effects), and if you want them applied to the UPnP streams then you do need to disable 'force native stream'.

By default your renderers will match the 'Generic Device' profile so your hi-res streams will be transcoded to 24/48. To prevent this change the 'Generic Device' profile to:
Code
device rendering capabilties:
  output sample rate: 44100 to: 192000
  maximum bit depth: 24
when transcoding the source file data:
  output format: "FLAC" didn't work reliably across all source resolutions with WiiM so I had to choose "PCM - 24 bit" but YMMV
  output sample rate: same as source
NOTE: These are the settings that worked best for the WiiM Pro in my limited testing.

Out of interest, had you already disabled 'force native stream'? And if not, did you think your equaliser settings were active?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 20, 2025, 11:25:22 PM
NOTE: These are the settings that worked best for the WiiM Pro in my limited testing.
If you are somewhat confident you have constructed a profile that should work for other users using the same WiiM device as you, consider sharing/posting it here?:
user-created device profiles for the UPnP2025 plugin (https://getmusicbee.com/forum/index.php?topic=42853.msg234825#msg234825)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: simbun on April 22, 2025, 09:35:36 AM
If you are somewhat confident you have constructed a profile that should work for other users using the same WiiM device as you, consider sharing/posting it here?:
user-created device profiles for the UPnP2025 plugin (https://getmusicbee.com/forum/index.php?topic=42853.msg234825#msg234825)

I have a profile for WiiM and Sonos but encodes to FLAC (replaygain enabled) fail when played to WiiM and generate an error (playback still suceeds) in the Sonos app when played to Sonos. If I verify the encoded file in foobar it reports a problem:

Failed: Corrupted FLAC stream; File appears to be incomplete
Reported length is inaccurate : 0:10.000000 vs 0:09.659501 decoded

@BoringName when fns is disabled and replaygain active are you seeing the same?

EDIT: These are the tests I performed to verify the encoding
Code
Source          Output
Mono   16/44    mime=audio/flac,rate=44100,channels=1  Inaccurate
Stereo 16/44 mime=audio/flac,rate=44100,channels=2  OK
Stereo 24/96 mime=audio/flac,rate=48000,channels=2  Inaccurate
Stereo 24/192 mime=audio/flac,rate=48000,channels=2  Inaccurate

I loaded one of the transcoded streams into MusicBee and it did play to the WiiM so it's not likely the cause of the failure. WiiM fails to play any encoded flac streams but is fine with PCM 24-bit.

Failed playback of an encoded Stereo 16/44 to WiiM.
Code
0; 1 Initialise - 22/04/2025 12:31:11
125; 8 ProcessMessage 192.168.99.111 - device 'uuid:FF98F09C-E144-D1DA-CB98-6867FFAAAAAAA:WiiM Pro-60F6',valid=True
129; 9 Profile - WiiM Pro, useragent=|Linux/4.9.113
129; 10 Profile - WiiM Pro, useragent=|Linux/4.9.113
147; 11 Activate - WiiM Pro-60F6:http-get:*:audio/wav:DLNA.ORG_PN=LPCM,http-get:*:audio/x-wav:DLNA.ORG_PN=LPCM,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3X,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO,http-get:*:audio/mpeg:DLNA.ORG_PN=MP2_MPS,http-get:*:audio/mp3:*,http-get:*:audio/wma:*,http-get:*:audio/mpeg:*,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS_320,http-get:*:audio/m4a:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/aac:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/ac3:DLNA.ORG_PN=AC3,http-get:*:audio/ogg:*,http-get:*:audio/ape:*,http-get:*:audio/x-ape:*,http-get:*:audio/flac:*
193; 12 ProcessMessage 192.168.99.112 - device 'uuid:RINCON_000E58C509AAAAAAA_MR:192.168.99.112 - Sonos Play:1 - RINCON_000E58C509AAAAAAA',valid=True
14364; 13 ForcedEncode - Stream is being encoded to apply Replaygain/DSP settings.
14365; 14 Play - Input - D:\MUSIC_EXAMPLE\MusicBee Test\music\TEST_RESOLUTION_SUPPORT\OUT_S1644.flac Output - (http://192.168.99.12:49382/encode/59B4B1313031E886-2147483643.flac)
14715; 15 StateTimer - Loading,old=Stopped
14717; 16 Profile - WiiM Pro, useragent=Lavf/58.76.100
14717; 17 Profile - WiiM Pro, useragent=Lavf/58.76.100
14729; 18 GetEncodedFile[1] 192.168.99.12 - GET D:\MUSIC_EXAMPLE\MusicBee Test\music\TEST_RESOLUTION_SUPPORT\OUT_S1644.flac to 192.168.99.111; mime=audio/flac,rate=44100,channels=2
15356; 19 StateTimer - Stopped,old=Loading
15359; 20 SyncNewPlayState - Stopped,mb=Playing
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on April 22, 2025, 10:53:53 AM
Hello,

For Marantz, I checked, for the new firmware the SMB standard went from V1 to V3, Tunein blocked the streams for radios that don't have a contract with them.
I don't know if this has any impact on the plug'in.


Translated with DeepL.com (free version)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on April 24, 2025, 09:56:08 PM
Hello,
 
Question for BoringName

Has the Marantz firmware added GStreamer as a device? See below.


Code
 0; 1 Initialise - 24/04/2025 21:13:31
20; 2 GetNetworkAddresses - 192.168.1.11,dns=True,name=Ethernet,speed=1000000000
20; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
20; 4 GetNetworkAddresses - http://192.168.1.11:49382
38; 5 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006',valid=True
41; 6 Profile - Marantz ND8006|AvegaMediaServer|SoftAtHome, useragent=|LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
42; 7 Profile - Marantz ND8006|AvegaMediaServer|SoftAtHome, useragent=|LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
53; 8 Activate - Marantz ND8006:
1340; 9 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
1441; 10 Profile - Marantz ND8006|AvegaMediaServer|SoftAtHome, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
16717; 11 Play - Input - E:\Musique\Autres\Ginevra\Ginevra - Beyond Tomorrow\01 - Ginevra - Moonlight.flac Output - (http://192.168.1.11:49382/files/ADF2A80C5CD0247Fp.flac)
16800; 12 Profile - Generic Device, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
16900; 13 GetFile[1] 192.168.1.11 - GET E:\Musique\Autres\Ginevra\Ginevra - Beyond Tomorrow\01 - Ginevra - Moonlight.flac to 192.168.1.12
16901; 14 Profile - Generic Device, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
16940; 15 StateTimer - Loading,old=Stopped
17238; 16 StateTimer - Playing,old=Loading
18275; 17 Profile - Generic Device, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
18275; 18 GetFile[2] 192.168.1.11 - GET E:\Musique\Autres\Ginevra\Ginevra - Beyond Tomorrow\02 - Ginevra - Lightning Roses.flac to 192.168.1.12
18275; 19 Profile - Generic Device, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
18279; 20 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/E4D9F35AAAAC09E9p.flac:E:\Musique\Autres\Ginevra\Ginevra - Beyond Tomorrow\02 - Ginevra - Lightning Roses.flac
489367; 26 GetFile[2] - exit=0, playtime=471092
756435; 27 GetFile[3] - exit=0, playtime=514886
777021; 28 StateTimer - Stopped,old=Playing
777021; 29 SyncNewPlayState - Stopped,mb=Playing
880360; 30 Profile - Marantz ND8006|AvegaMediaServer|SoftAtHome, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
880360; 31 Profile - Marantz ND8006|AvegaMediaServer|SoftAtHome, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
880362; 32 Browse - 0,BrowseDirectChildren,0,45,sort=
880362; 33 Browse - 0,BrowseDirectChildren,0,50,sort=
881454; 34 Profile - Marantz ND8006|AvegaMediaServer|SoftAtHome, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
881454; 35 Browse - 1,BrowseDirectChildren,0,45,sort=
881455; 36 Profile - Marantz ND8006|AvegaMediaServer|SoftAtHome, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
881455; 37 Browse - 1,BrowseDirectChildren,0,50,sort=
881502; 38 ProcessRequest:Exception - Impossible d'écrire les données sur la connexion de transport : Une connexion établie a été abandonnée par un logiciel de votre ordinateur hôte.
   à System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   à System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
   à System.IO.Stream.CopyTo(Stream destination)
   à MusicBeePlugin.Plugin.HttpResponse.SendSoapSuccess(HttpRequest request)
   à MusicBeePlugin.Plugin.UpnpService.ProceedControl(HttpRequest request)
   à MusicBeePlugin.Plugin.HttpServer.ProcessRequest(Object parameters)
 
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: hiccup on April 25, 2025, 08:27:17 AM
Has the Marantz firmware added GStreamer as a device? See below.
Fwiw, I noticed the same when I tried to get my Marantz receiver to work a while back
Adding it as a user-agent failed anyway. If I recall correctly there would be no sound at all, or a second of sound and then abruptly stopping.
(I think only 'continuous stream' worked)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 26, 2025, 06:29:47 AM
Has the Marantz firmware added GStreamer as a device? See below.

Sorry, I've been away. If I'm reading the log correctly it looks like the Marantz is using the following useragent to query the track initially. Maybe to get stream info. BubbleUPnP does a similar thing with ffprobe.
Code
LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88

Then it uses the following useragent to perform actual playback of the track
Code
GStreamer souphttpsrc 1.22.9 libsoup/3.4.4

So you should use something like "Denon|GStreamer" in the useragent field of your Marantz ND8006 profile.

@BoringName when fns is disabled and replaygain active are you seeing the same?

I'll look into this.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 26, 2025, 11:46:07 AM
Just a heads up for any LMS users. Some of the changes I submitted to LMS to enable gapless playback caused the LMS UPnP plugin to clear the LMS playlist even if it wasn't being used as a Renderer. I've submitted a fix that has been accepted already but probably won't be in downstream updates for a while.

If you need help applying the updates manually let me know.

If you are using LMS solely as a UPnP Renderer via a UPnP Controller you shouldn't have noticed any problems.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on April 28, 2025, 01:57:10 PM
Hello,

Version 3.6 9202 upnp2025 2.0.2 with force native stream

Marantz new firmware, the device plays all the songs on an album except the last one, the song continues to play in MusicBee but the Marantz receives nothing.

It no longer displays the duration of the song, and for the format and title, it's random, sometimes yes, sometimes no.

I've tested Denon|GStreamer as a "user agent" but it doesn't work

It works with the Emby 4.8.11 server and its DLNA plug'in.

Translated with DeepL.com (free version)

Code
 0; 1 Initialise - 28/04/2025 12:37:19
24; 2 GetNetworkAddresses - 192.168.1.11,dns=True,name=Ethernet,speed=1000000000
24; 3 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
25; 4 GetNetworkAddresses - http://192.168.1.11:49382
1351; 5 Profile - Generic Device, useragent=Unspecified, UPnP/1.0, SoftAtHome
294829; 6 ProcessMessage 192.168.1.12 - device 'uuid:a0de4b19-c49c-10de-0080-0006787c2e26:Marantz ND8006',valid=True
294832; 7 Profile - Marantz ND8006|SoftAtHome, useragent=|LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
294833; 8 Profile - Marantz ND8006|SoftAtHome, useragent=|LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
294951; 9 Activate - Marantz ND8006:
298319; 10 Profile - Marantz ND8006|SoftAtHome, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
335661; 11 Play - Input - E:\Musique\Autres\Mister Mat - Désespérément optimiste\01. Désespérément optimiste.flac Output - (http://192.168.1.11:49382/files/BBE037F575C73810p.flac)
335912; 12 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
335943; 13 StateTimer - Loading,old=Undefined
336004; 14 GetFile[1] 192.168.1.11 - GET E:\Musique\Autres\Mister Mat - Désespérément optimiste\01. Désespérément optimiste.flac to 192.168.1.12
336004; 15 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
336983; 16 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
336983; 17 GetFile[2] 192.168.1.11 - GET E:\Musique\Autres\Mister Mat - Désespérément optimiste\02. Jouer dans le vent.flac to 192.168.1.12
336997; 18 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
337294; 19 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/8EFD2E7582562170p.flac:E:\Musique\Autres\Mister Mat - Désespérément optimiste\02. Jouer dans le vent.flac
338032; 20 StateTimer - Playing,old=Loading
354481; 21 GetFile[2] - exit=10054, playtime=17483
354511; 22 GetFile[1] - exit=10054, playtime=18505
360447; 23 Play - Input - E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\01. Au Western History.flac Output - (http://192.168.1.11:49382/files/D69471781E211D36p.flac)
360531; 24 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
360531; 25 GetFile[3] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\01. Au Western History.flac to 192.168.1.12
360531; 26 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
360870; 27 StateTimer - Loading,old=Stopped
361699; 28 StateTimer - Playing,old=Loading
363812; 29 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
363812; 30 GetFile[4] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\02. Les jours de grands espaces.flac to 192.168.1.12
363836; 31 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/3198E6B44F03DFBAp.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\02. Les jours de grands espaces.flac
363837; 32 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
531653; 33 GetFile[3] - exit=0, playtime=171122
553218; 34 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
553218; 35 GetFile[5] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\03. Ma place.flac to 192.168.1.12
553225; 36 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/BC72A2D726888019p.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\03. Ma place.flac
553244; 37 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
698880; 38 GetFile[4] - exit=0, playtime=335042
720569; 39 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
720570; 40 GetFile[6] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\04. Kif kif pareil.flac to 192.168.1.12
720586; 41 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/16DF2AE4950AE72Ap.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\04. Kif kif pareil.flac
720594; 42 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
861009; 43 GetFile[5] - exit=0, playtime=307764
879938; 44 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
879938; 45 GetFile[7] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\05. Du bonheur en retard.flac to 192.168.1.12
879938; 46 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/A2983841F1A9B30Fp.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\05. Du bonheur en retard.flac
879970; 47 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
1030086; 48 GetFile[6] - exit=0, playtime=309491
1053332; 49 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
1053332; 50 GetFile[8] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\06. Des villes et des visages.flac to 192.168.1.12
1053332; 51 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/545BC601475CEC8Fp.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\06. Des villes et des visages.flac
1053347; 52 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
1166569; 53 GetFile[7] - exit=0, playtime=286599
1186581; 54 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
1186581; 55 GetFile[9] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\07. Je m'envolerai.flac to 192.168.1.12
1186599; 56 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
1186602; 57 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/3BAACC805FA68D4Ep.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\07. Je m'envolerai.flac
1383417; 58 GetFile[8] - exit=0, playtime=330069
1403493; 59 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
1403493; 60 GetFile[10] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\08. L'écorce.flac to 192.168.1.12
1403509; 61 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/52573EB1306F0E7Fp.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\08. L'écorce.flac
1403519; 62 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
1603059; 63 GetFile[9] - exit=0, playtime=416460
1623657; 64 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
1623657; 65 GetFile[11] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\09. Oh garde moi.flac to 192.168.1.12
1623665; 66 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/08FDD12935E8D8DDp.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\09. Oh garde moi.flac
1623686; 67 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
1846446; 68 GetFile[10] - exit=0, playtime=442926
1870094; 69 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
1870094; 70 GetFile[12] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\10. Salut les amoureux.flac to 192.168.1.12
1870100; 71 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/5D8988AB249686E5p.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\10. Salut les amoureux.flac
1870127; 72 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
2083403; 73 GetFile[11] - exit=0, playtime=459716
2105658; 74 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
2105658; 75 GetFile[13] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\11. Tu parles d'une éternité.flac to 192.168.1.12
2105664; 76 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/8526F676A69DF138p.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\11. Tu parles d'une éternité.flac
2105685; 77 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
2323629; 78 GetFile[12] - exit=0, playtime=453502
2344210; 79 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
2344210; 80 GetFile[14] 192.168.1.11 - GET E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\12. Le silence est d'or.flac to 192.168.1.12
2344218; 81 SetNextAVTransportURI - Success - http://192.168.1.11:49382/files/9E03250E95AC8580p.flac:E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\12. Le silence est d'or.flac
2344239; 82 Profile - Marantz ND8006|SoftAtHome, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
2543776; 83 GetFile[13] - exit=0, playtime=438091
2566640; 84 GetFile[14] - exit=10054, playtime=222400
2566696; 85 SetNextAVTransportURI - Cleared
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on April 28, 2025, 10:34:57 PM
E:\Musique\Chanson Française\Mister Mat - Du bonheur en retard\12. Le silence est d'or.flac

Is this the last song on the album or is there a track 13?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on April 29, 2025, 10:47:13 AM
Hello,

this is the last
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 01, 2025, 12:40:50 AM

@BoringName when fns is disabled and replaygain active are you seeing the same?

I haven't had time to look into this. It might be worth setting the content length field to none or fixed and see how that goes.

Encoded streams are a bit of a problem. For native streams I can get all correct metadata directly. For encoded streams I have to estimate some of the values because the streams haven't been created yet when the metadata has to be sent. Accurate values can be calculated for PCM but other codecs are just estimates.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: mister_fantasy on May 04, 2025, 12:07:38 AM
Hello,

Thank you for the great plugin.

I am trying to use it with Volumio on my RP 3+ device. What would be the best config for Volumio? Everything seems alright but when I try to pause the song, there is a quite long delay and Volumio Player stop the track completely and zero out the progress bar rather than just pause it.

Best.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 04, 2025, 08:05:12 AM
this is the last

Sorry, just so I have this right. The Marantz plays the album correctly but stops at the end of track 11. Does it attempt to play track 12 at all or does it stop dead after track 11 finishes?

The plugin is setting track 12 as the NextURI successfully so all the Marantz has to do is transition to it after 11 finishes. The plugin doesn't control that aspect. If you told me it starts to play track 12 and then stops, that could imply the Marantz doesn't like the plugin clearing the NextURI value when it gets to the end of the album. That would give me something to work with.

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 04, 2025, 09:28:50 AM
I am trying to use it with Volumio on my RP 3+ device. What would be the best config for Volumio? Everything seems alright but when I try to pause the song, there is a quite long delay and Volumio Player stop the track completely and zero out the progress bar rather than just pause it.

PM me a copy of the log file or paste it here. Just remove any IP address information you don't want shared.

I initially thought it could be a firewall issue preventing the pause command going through but if that was the case the play commands wouldn't work either....

And while typing this my NAS just reported one of the disks has given up on life.... after yesterdays election results I was having a great weekend until this happened! I might be busy for a while.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on May 04, 2025, 12:00:36 PM
Hello,

Quote
The Marantz plays the album correctly but stops at the end of track 11. Does it attempt to play track 12 at all or does it stop dead after track 11 finishes?


Track 12 starts for a few seconds then stops on the device but continues in MusicBee.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: mister_fantasy on May 04, 2025, 03:01:14 PM

PM me a copy of the log file or paste it here. Just remove any IP address information you don't want shared.

I initially thought it could be a firewall issue preventing the pause command going through but if that was the case the play commands wouldn't work either....

And while typing this my NAS just reported one of the disks has given up on life.... after yesterdays election results I was having a great weekend until this happened! I might be busy for a while.

Sorry to hear that!

I hope that would help to solve the issue.

Code
0; 1 Initialise - 04/05/2025 15:13:50
79; 2 GetNetworkAddresses - #MullvadVPN_IP,dns=True,name=Mullvad,speed=100000000000
80; 3 GetNetworkAddresses - #Tailscale_IP,dns=False,name=Tailscale,speed=100000000000
80; 4 GetNetworkAddresses - #WiFi_IP,dns=True,name=WiFi,speed=866700000
80; 5 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
80; 6 GetNetworkAddresses - http://#WiFi_IP:49382
127; 7 ProcessMessage 192.168.0.10 - device 'uuid:5b46aea3-c50d-e7dd-0303-4a80458d7ea5:KF 1500 - Foobar Renderer',valid=True
242; 8 ProcessMessage 192.168.0.145 - device 'uuid:548a2cb5-2925-37ea-1818-b827eb6e1009:Volumio-UPnP/AV',valid=True
0; 1 Initialise - 04/05/2025 15:30:51
68; 2 GetNetworkAddresses - #MullvadVPN_IP,dns=True,name=Mullvad,speed=100000000000
68; 3 GetNetworkAddresses - #Tailscale_IP,dns=False,name=Tailscale,speed=100000000000
68; 4 GetNetworkAddresses - #WiFi_IP,dns=True,name=WiFi,speed=866700000
68; 5 GetNetworkAddresses - 127.0.0.1,dns=False,name=Loopback Pseudo-Interface 1,speed=1073741824
68; 6 GetNetworkAddresses - http://#WiFi_IP:49382
108; 7 ProcessMessage 192.168.0.10 - device 'uuid:5b46aea3-c50d-e7dd-0303-4a80458d7ea5:KF 1500 - Foobar Renderer',valid=True
201; 8 ProcessMessage 192.168.0.145 - device 'uuid:548a2cb5-2925-37ea-1818-b827eb6e1009:Volumio-UPnP/AV',valid=True
882738; 9 Profile - Generic Device, useragent=|
882739; 10 Profile - Generic Device, useragent=|
882842; 11 Activate - Volumio-UPnP/AV:http-get:*:application/flac:*,http-get:*:application/x-flac:*,http-get:*:application/ogg:*,http-get:*:audio/flac:*,http-get:*:audio/x-flac:*,http-get:*:audio/aac:*,http-get:*:audio/x-aiff:*,http-get:*:audio/aif:*,http-get:*:audio/aiff:*,http-get:*:audio/dff:*,http-get:*:audio/x-dff:*,http-get:*:audio/dsd:*,http-get:*:audio/x-dsd:*,http-get:*:audio/dsf:*,http-get:*:audio/x-dsf:*,http-get:*:audio/m4a:*,http-get:*:audio/x-m4a:*,http-get:*:audio/matroska:*,http-get:*:audio/x-matroska:*,http-get:*:audio/mp1:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mpeg:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/ogg:*,http-get:*:audio/vorbis:*,http-get:*:audio/x-ape:*,http-get:*:audio/ape:*,http-get:*:audio/x-monkeys-audio:*,http-get:*:audio/wav:*,http-get:*:audio/x-wav:*,http-get:*:audio/wave:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-ogg:*,http-get:*:audio/x-scpls:*,http-get:*:audio/x-vorbis+ogg:*,http-get:*:audio/x-vorbis:*,http-get:*:audio/x-wavpack:*,http-get:*:video/mp4:*
891081; 12 Play - Input - \\192.168.0.10\nas\Media\Music\Chico Buarque\1971 - Construção\04. Construção.flac Output - (http://#WiFi_IP:49382/files/0E07762278EF1120p.flac)
892026; 13 Profile - Generic Device, useragent=Music Player Daemon 0.23.15
892045; 14 GetFile[1] #WiFi_IP - GET \\192.168.0.10\nas\Media\Music\Chico Buarque\1971 - Construção\04. Construção.flac to 192.168.0.145
892051; 15 Profile - Generic Device, useragent=Music Player Daemon 0.23.15
896999; 16 GetFile[1] - exit=0, playtime=4946
1194221; 17 PostSoapRequest - 500,send=POST /uuid-548a2cb5-2925-37ea-1818-b827eb6e1009/ctl-urn-schemas-upnp-org-service-AVTransport-1 HTTP/1.1
Host: 192.168.0.145:49152
User-Agent: MusicBee UPnP Plugin
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Pause"
Content-Length: 290

<?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:Pause xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Pause></s:Body></s:Envelope>
1194222; 18 SoapRequest:Pause:urn:schemas-upnp-org:service:AVTransport:1:InstanceID=0 - <?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>501</errorCode>
<errorDescription>Action Failed</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

1194222; 19 Pause - status=500
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 05, 2025, 12:21:50 AM
Sorry to hear that!

It rebuilt pretty quickly overnight and is doing data scrubbing now. The log showed the disc was pulled out and put back in again but it wasn't..... The drive showed no errors in testing. I just re-seated it and started a rebuild. I've ordered a replacement NAS and drives anyway just in case it's about to die. It's getting on a bit (I had to do the Synology resistor fix on it 5 years ago, Atom C2000 bug). I had planned on getting a new one later in the year, it just brought my plans forward a few months.

Volumio is returning an error code stating it doesn't support the Pause command. Does Volumio have a log you can provide?

I found this thread volumio-3-and-bubbleupnp (https://community.volumio.com/t/volumio-3-and-bubbleupnp/51863) which shows Volumio has a few UPnP issues but that's a few years old so you would hope it's been fixed by now.

At this stage I don't think it's something I can fix.

edit: Volumio might just have an issue with flac files. Tick force encoding and set the output format to PCM - 16 bit and see if you can pause the track. That will at least rule out one possible cause.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 05, 2025, 01:29:03 AM
Track 12 starts for a few seconds then stops on the device but continues in MusicBee.

This would indicate the Marantz doesn't like the plugin setting a blank NextURI when it gets to the end of the now playing list. I expect the user removing the NextURI track from the now playing list will also cause the same issue.

So this is how it's currently supposed to work.
Queue tracks A, B, and C.

The plugin sets the CurrentURI to track A and tells the device to play it. It then sets the NextURI to track B.
When the device finishes playing track A, it copies the NextURI value to the CurrentURI and starts playing it. So for a small period of time the NextURI and CurrentURI on the device are set to the same value - track B

The plugin detects when a transition has occurred and sets the NextURI to Track C.
When the device finishes playing track B, it copies the value across again as above so both values are now Track C.

The plugin detects this and due to there being no track D to queue, it sets the NextURI to a blank value.

As the NextURI is now blank, the device stops playing once it's finished playing track C. But I expect most devices would be aware they have transitioned to the NextURI and would stop playing if a new NextURI has not been set while the track was playing and just stop on their own. ie) they wouldn't get stuck in a loop just continuously playing track C.

So I probably don't need to clear the NextURI value for most devices (I need to run some tests to confirm this).

But any changes I make in this regard are going to effect Lyrion Music Server due to it maintaining it's own playlist. I don't really want to add anymore options but I might have to add a "don't clear NextURI" for Marantz users or something opposite for LMS users.

I'll see what I can come up with.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: mister_fantasy on May 05, 2025, 09:59:32 PM
Sorry to hear that!

It rebuilt pretty quickly overnight and is doing data scrubbing now. The log showed the disc was pulled out and put back in again but it wasn't..... The drive showed no errors in testing. I just re-seated it and started a rebuild. I've ordered a replacement NAS and drives anyway just in case it's about to die. It's getting on a bit (I had to do the Synology resistor fix on it 5 years ago, Atom C2000 bug). I had planned on getting a new one later in the year, it just brought my plans forward a few months.

Volumio is returning an error code stating it doesn't support the Pause command. Does Volumio have a log you can provide?

I found this thread volumio-3-and-bubbleupnp (https://community.volumio.com/t/volumio-3-and-bubbleupnp/51863) which shows Volumio has a few UPnP issues but that's a few years old so you would hope it's been fixed by now.

At this stage I don't think it's something I can fix.

edit: Volumio might just have an issue with flac files. Tick force encoding and set the output format to PCM - 16 bit and see if you can pause the track. That will at least rule out one possible cause.

Happy to hear that there is no big mess.

Thank you for your reply. I played with settings both for the plugin and Volumio. I've changed DSD Playback mode to "DSD over PCM" from Volumio playback settings,  unfortunately it did not effect anything. It would be great if you can check out the Volumio logs!


Code
#DSD Direct
May 05 22:43 : output: Failed to open mixer for 'alsa': failed to attach to SoftMaster: No such file or directory
May 05 22:43 : exception: CURL failed: transfer closed with 51130468 bytes remaining to read
ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL SoftMaster
May 05 22:43 : output: Failed to open mixer for 'alsa': failed to attach to SoftMaster: No such file or directory
May 05 22:43 : player: played "http://192.168.0.197:49382/encode/CB540B26CA65F48E-2147483406.wav"
ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL SoftMaster
May 05 22:43 : output: Failed to open mixer for 'alsa': failed to attach to SoftMaster: No such file or directory

Code
#DSD over PCM (DoP)
May 05 22:51 : exception: CURL failed: transfer closed with 45047504 bytes remaining to read
ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL SoftMaster
May 05 22:51 : output: Failed to open mixer for 'alsa': failed to attach to SoftMaster: No such file or directory
May 05 22:51 : player: played "http://192.168.0.197:49382/encode/B6A014DB7E6DEE82-2147483340.wav"
May 05 22:51 : exception: CURL failed: transfer closed with 97278784 bytes remaining to read
May 05 22:51 : player: played "http://192.168.0.197:49382/encode/0162AC7A1AFA26430.wav"
ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL SoftMaster
May 05 22:51 : output: Failed to open mixer for 'alsa': failed to attach to SoftMaster: No such file or directory
May 05 22:51 : exception: CURL failed: transfer closed with 44130000 bytes remaining to read
May 05 22:51 : player: played "http://192.168.0.197:49382/encode/B6A014DB7E6DEE82-2147483328.wav"
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 05, 2025, 10:50:08 PM
Thank you for your reply. I played with settings both for the plugin and Volumio. I've changed DSD Playback mode to "DSD over PCM" from Volumio playback settings,  unfortunately it did not effect anything. It would be great if you can check out the Volumio logs!

That seems like a step backwards if it's not playing at all. I have no experience with volumio but I'm not sure DSD over PCM would be the correct option.

Can you go back to the original settings and provide the volumio log after you attempt to pause playback?

Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: mister_fantasy on May 06, 2025, 12:07:52 AM

That seems like a step backwards if it's not playing at all. I have no experience with volumio but I'm not sure DSD over PCM would be the correct option.

Can you go back to the original settings and provide the volumio log after you attempt to pause playback?



It is playing, nothing changed. Same issue. I reverted to original settings. Log file says the same;

Code
May 06 01:00 : player: played "http://192.168.0.197:49382/files/B6A014DB7E6DEE82p.flac"
ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL SoftMaster
May 06 01:00 : output: Failed to open mixer for 'alsa': failed to attach to SoftMaster: No such file or directory
ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL SoftMaster
May 06 01:00 : output: Failed to open mixer for 'alsa': failed to attach to SoftMaster: No such file or directory

I am using Volumio with my Scarlet I/O and Yamaha HS5 Active studio monitors to listen to my local songs and sometimes radio. I reckon it's Volumio issue too and -like any Volumio based issue- it is really frustrating/impossible for me to deal with. So I'll give a chance to Mopidy.

Thank you for your help!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 06, 2025, 01:03:53 AM
It is playing, nothing changed. Same issue. I reverted to original settings. Log file says the same;

Ok. This seems relevant - volume-control-via-mpc-not-working-with-softmixer (https://community.volumio.com/t/volume-control-via-mpc-not-working-with-softmixer/7679)

I think you need to change the value for the mixer_device in mpd.conf from SoftMaster to something like hw:0

I don't know what the values mean but it seems hw:0, hw:5 etc... are for different connection types like USB, HDMI etc.... You might get a better result asking on the volumio forums.


Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: jean.valjean on May 07, 2025, 07:21:31 PM
Hello BoringName,

I put back the factory firmware and the plug'in version 1.9.3 works for disc playlists in “force native stream” only with “Generic Device” without any other profile. Radio streams don't work in “Output as a continuous stream”.

Code
 78790; 55 Play - Input - stream Output - (http://192.168.1.11:49382/encode/continuousstream-2147483584.wav)
78817; 56 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
78817; 57 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
78817; 58 GetEncodedFile[4] 192.168.1.11 - GET  to 192.168.1.12; mime=audio/wav,rate=44100,channels=2
79528; 59 GetEncodedFile[4] - exit=0, playtime=710
79945; 60 StateTimer - Playing,old=Stopped
80178; 61 SetNextAVTransportURI - Cleared
83604; 62 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
83604; 63 Profile - Generic Device, useragent=AvegaMediaServer/2.0 Linux/2.6
83605; 64 GetEncodedFile - Stream zero=/encode/continuousstream-2147483584.wav
83605; 65 httpresponse - Code 404
83831; 67 StateTimer - Loading,old=Playing
84237; 68 StateTimer - Stopped,old=Loading
84237; 69 SyncNewPlayState - Stopped,mb=Playing
  

I'll wait for a new firmware and give some news.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: Stefs on May 09, 2025, 05:54:00 AM
Worked perfectly with a Wiim Pro Plus.
Thanks!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 12, 2025, 06:04:31 AM
I put back the factory firmware and the plug'in version 1.9.3 works for disc playlists in “force native stream” only with “Generic Device” without any other profile. Radio streams don't work in “Output as a continuous stream”.

Radio streams should work now with continuous stream unchecked but only if the device supports the stream format. The plugin just forwards the radio stream URL to the device.

You might need to uncheck force native stream if you are trying to play a radio stream as continuous.
Title: Just another Marantz user
Post by: InvisibleKnight on May 14, 2025, 05:01:17 PM
Hello everyone, thanks BoringName for the excellent work. I'm having issues with a Marantz MR1510.
I can see the unit in the "Output to" menu. Initially when I tried to play anything it would just not play (not even start in Musicbee), then I read previous users experiences here in the thread and I changed some settings, tried different user agents and I managed to make it mp3 tracks start, the Marantz clicks as if it's starting but there's no sound and after few seconds the track stops in the player.

I'm coming from iTunes so I have many .m4a files (Apple Lossless) that don't start even with the setting changes. I'm attaching a log where I tried to play an m4a file (no dice) and an mp3 that starts but outputs no sound and then stops.
Force native streaming is on. Other settings seem to have no effect (beside the IP setting).
I hope someone can guide me through this! Thank you

Code
1965103; 204 Play - Input - X:\Y.mp3 Output - (http://192.168.0.1:49382/files/97016D73F21C4044p.mp3)
1965442; 205 StateTimer - Loading,old=Stopped
1977668; 206 SyncNewPlayState - Stopped,mb=Playing
1979843; 207 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/97016D73F21C4044p.mp3)
1980186; 208 StateTimer - Loading,old=Stopped
1982155; 209 Seek - goto=66480
1982206; 210 Seek - pos=66480
1982386; 211 SetNextAVTransportURI - Success - http://192.168.0.1:49382/files/9D6C975169D89CC6p.mp3:X:\Music\Y.mp3
1995353; 212 StateTimer - Stopped,old=Loading
1995354; 213 SyncNewPlayState - Stopped,mb=Playing
2375585; 214 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/9D6C975169D89CC6p.mp3)
2375937; 215 StateTimer - Loading,old=Stopped
2390736; 216 StateTimer - Stopped,old=Loading
2390736; 217 SyncNewPlayState - Stopped,mb=Playing
2391197; 218 httpresponse - Code 400
2391197; 220 ProcessRequest:HttpException:400 - Bad header
2391197; 219 Profile - Generic Device, useragent=FDSSDP
2391494; 221 Profile - Generic Device, useragent=DAFUPnP
2391515; 222 Profile - Generic Device, useragent=DAFUPnP
2391536; 223 Profile - Generic Device, useragent=Microsoft-Windows/10.0 UPnP/1.0
2391563; 224 Profile - Generic Device, useragent=Microsoft-Windows/10.0 UPnP/1.0
2392103; 225 Profile - Generic Device, useragent=FDSSDP
2394272; 226 Profile - Generic Device, useragent=DAFUPnP
2394307; 227 Profile - Generic Device, useragent=Microsoft-Windows/10.0 UPnP/1.0
2394496; 228 Profile - Generic Device, useragent=DAFUPnP
2394532; 229 Profile - Generic Device, useragent=Microsoft-Windows/10.0 UPnP/1.0
2395310; 230 Profile - Generic Device, useragent=FDSSDP
2398061; 231 Profile - Generic Device, useragent=FDSSDP
2399750; 232 Profile - Generic Device, useragent=FDSSDP
2399814; 233 Profile - Generic Device, useragent=DAFUPnP
2399849; 234 Profile - Generic Device, useragent=Microsoft-Windows/10.0 UPnP/1.0
2399989; 235 Profile - Generic Device, useragent=DAFUPnP
2400027; 237 Profile - Generic Device, useragent=Microsoft-Windows/10.0 UPnP/1.0
2499739; 238 Mimetype Error - Mimetype support cannot be verified with Renderer
2499739; 239 DIDL Error - startIndex cannot be larger than length of string.
Parameter name: startIndex
2499740; 240 Play - Input - X:\Music\X.m4a Output - ()
2500866; 241 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/9D6C975169D89CC6p.mp3)
2501219; 242 StateTimer - Loading,old=Stopped
2516045; 243 StateTimer - Stopped,old=Loading
2516046; 244 SyncNewPlayState - Stopped,mb=Playing
2779199; 245 Activate - Marantz NR1510:
2783019; 246 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/9D6C975169D89CC6p.mp3)
2783832; 247 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/9D6C975169D89CC6p.mp3)
2783954; 248 Play - Thread was being aborted.
2784965; 249 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/9D6C975169D89CC6p.mp3)
2785295; 250 Play - Thread was being aborted.
2786966; 251 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/97016D73F21C4044p.mp3)
2792700; 252 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/9D6C975169D89CC6p.mp3)
2793532; 253 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/9D6C975169D89CC6p.mp3)
2793816; 254 Play - Thread was being aborted.
2794634; 255 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/97016D73F21C4044p.mp3)
2795487; 257 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/97016D73F21C4044p.mp3)
2795967; 259 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/97016D73F21C4044p.mp3)
2797746; 261 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/97016D73F21C4044p.mp3)
2799134; 263 Play - Input - X:\Music\Y.mp3 Output - (http://192.168.0.1:49382/files/9D6C975169D89CC6p.mp3)
2799572; 265 StateTimer - Loading,old=Stopped
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 15, 2025, 07:20:38 AM
2499739; 239 DIDL Error - startIndex cannot be larger than length of string.
Parameter name: startIndex

This error is a bit strange as m4a are supported by the plugin. But that can wait.

I think your main issue is possibly a firewall problem. There should be GetFile commands listed in the log when the Marantz device attempts to play the stream but there are none. So I think it must be getting blocked.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: InvisibleKnight on May 15, 2025, 12:30:02 PM
This error is a bit strange as m4a are supported by the plugin. But that can wait.

I think your main issue is possibly a firewall problem. There should be GetFile commands listed in the log when the Marantz device attempts to play the stream but there are none. So I think it must be getting blocked.
Thanks for support, you were right. I fixed mp3 by allowing Musicbee in firewall. However M4a files still don't work with current settings.

Code
65793423; 538 GetEncodedFile[24] - exit=10054, playtime=162395
65793463; 539 SyncNewPlayState - Stopped,mb=Paused
65797180; 540 Profile - Marantz, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
65797585; 541 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
65797590; 542 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
65799354; 543 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
65799355; 544 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
65799629; 545 Play - Input - X:\My Music\X.mp3 Output - (http://192.168.0.1:49382/files/9D6C975169D89CC6p.mp3)
65799744; 546 Profile - Generic Device, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
65799744; 547 GetFile[25] 192.168.0.1 - GET X:\My Music\X.mp3 to 192.168.0.114
65799744; 548 Profile - Generic Device, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
65800320; 549 Profile - Generic Device, useragent=libcurl-agent/1.0
65800320; 550 Profile - Generic Device, useragent=libcurl-agent/1.0
65800320; 551 Profile - Generic Device, useragent=libcurl-agent/1.0
65800322; 552 StateTimer - Playing,old=Stopped
65801998; 553 Mimetype Error - Mimetype support cannot be verified with Renderer
65801998; 554 QueueNext - startIndex cannot be larger than length of string.
Parameter name: startIndex
65808259; 555 GetFile[25] - exit=10054, playtime=8515
65808301; 556 Mimetype Error - Mimetype support cannot be verified with Renderer
65808302; 557 DIDL Error - startIndex cannot be larger than length of string.
Parameter name: startIndex
65808302; 558 Play - Input - D:\My Music\Y.m4a Output - ()
65808572; 559 StateTimer - Stopped,old=Paused
65808574; 560 SyncNewPlayState - Stopped,mb=Playing
65814290; 561 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
65849534; 562 Mimetype Error - Mimetype support cannot be verified with Renderer
65849534; 563 DIDL Error - startIndex cannot be larger than length of string.
Parameter name: startIndex
65849534; 564 Play - Input - X:\My Music\Y.m4a Output - ()
65850022; 565 Profile - Marantz, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
65850426; 566 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
65850432; 567 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
65852225; 568 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
65852232; 569 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
65859666; 570 Profile - Marantz, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
65860070; 571 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
65860075; 572 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi

However if i select output as continuous stream it will work.

Code
65861801; 573 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
65861803; 574 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
65867108; 575 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
65920956; 576 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
65975404; 577 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
66027985; 578 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
66082123; 579 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
66097186; 580 Profile - Marantz, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
66097593; 581 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
66097597; 582 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
66099328; 583 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
66099329; 584 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
66101350; 585 Profile - Marantz, useragent=LINUX UPnP/1.0 Denon-Heos/89d5d44801a9e1f13ce455537f775120edf47a88
66101755; 586 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
66101759; 587 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
66103488; 588 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
66103495; 589 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
66105875; 590 Play - Input - stream Output - (http://192.168.0.1:49382/encode/continuousstream-2147483483.wav)
66105989; 591 Profile - Generic Device, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
66105989; 592 Profile - Generic Device, useragent=GStreamer souphttpsrc 1.22.9 libsoup/3.4.4
66105989; 593 GetEncodedFile[26] 192.168.0.1 - GET  to 192.168.0.114; mime=audio/wav,rate=44100,channels=2
66106454; 594 StateTimer - Playing,old=Stopped

I'd rather be able to configure it for native playback if possible. These are the details of most of the .M4a files:
Code
Channels 2  (stereo)
Sample Rate: 44.1 kHz;
Sample Size: 16 bit
Bit Rate: 1,411 kbps
Encoder: Apple Lossless (ALAC)
Encoder Settings: Audio Quality Perfect (Lossless)
Contains Album Art, ID Tag [Apple iTunes], Channel Mapping
Type: MPEG-4 Audio File [.m4a]
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: MotleyG on May 15, 2025, 12:52:37 PM
Your info window shows your m4a files are ALAC lossless format. There are many devices that support and play aac (lossy) m4a but few that support the lossless format. This is very likely the case with the Marantz. I would check the specs at the back of the owner manual to confirm if it states specifically that ALAC is supported.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: InvisibleKnight on May 15, 2025, 05:07:23 PM
Your info window shows your m4a files are ALAC lossless format. There are many devices that support and play aac (lossy) m4a but few that support the lossless format. This is very likely the case with the Marantz. I would check the specs at the back of the owner manual to confirm if it states specifically that ALAC is supported.
I don't think this is the case. lossless ALAC, FLAC e WAV up to 24 bit/192 kHz are natively supported. Page 207 on the manual  (https://www.marantz.com/on/demandware.static/-/Library-Sites-marantz_europe_shared/default/dw663c0524/archive-downloads/nr1510_na_en.pdf)has all the supported formats.

If I uncheck both force transcoding AND force native streams it will work, I assume by encoding according to the profile settings (in my case FLAC).
Playback work, seek function does not: the indicator goes to the timestamp I click in the player (and the indicator will continue from there) but the playback on the Marantz keeps going as if nothing changed. If I try to seek it also breaks next/previous song.

I'm wondering why native playback doesn't work considering the unit should be compatible with the codec in question?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: MotleyG on May 15, 2025, 06:15:05 PM
I don't think this is the case. lossless ALAC, FLAC e WAV up to 24 bit/192 kHz are natively supported. Page 207 on the manual  (https://www.marantz.com/on/demandware.static/-/Library-Sites-marantz_europe_shared/default/dw663c0524/archive-downloads/nr1510_na_en.pdf)has all the supported formats.

If I uncheck both force transcoding AND force native streams it will work, I assume by encoding according to the profile settings (in my case FLAC).
Playback work, seek function does not: the indicator goes to the timestamp I click in the player (and the indicator will continue from there) but the playback on the Marantz keeps going as if nothing changed. If I try to seek it also breaks next/previous song.

I'm wondering why native playback doesn't work considering the unit should be compatible with the codec in question?
You are correct, it appears this model does in fact support ALAC lossless m4a files. Good to know. I did see this warning note above the feature chart. Any chance your album art is larger than 500x500?
"If the image size (pixels) of an album artwork exceeds 500 × 500 (WMA/MP3/WAV/FLAC/Apple Lossless/DSD) or 349 × 349 (MPEG-4 AAC), then
music may not be played back properly"
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: InvisibleKnight on May 15, 2025, 06:22:15 PM
You are correct, it appears this model does in fact support ALAC lossless m4a files. Good to know. I did see this warning note above the feature chart. Any chance your album art is larger than 500x500?
"If the image size (pixels) of an album artwork exceeds 500 × 500 (WMA/MP3/WAV/FLAC/Apple Lossless/DSD) or 349 × 349 (MPEG-4 AAC), then
music may not be played back properly"
Good catch, I think it might refer to the internal media player rather than the UPnP encoder, however the artworks are mostly 300x300px!

Apparently even with the aforementioned settings (force transcoding AND force native streams unchecked) it doesn't play M4A files in full as I initially thought. It abruptly stops playback after a minute or so.

Code
87554086; 1556 GetEncodedFile[64] 192.168.0.1 - GET X:\My Music\X.m4a to 192.168.0.114; mime=audio/flac,rate=44100,channels=2
87554097; 1557 GetEncodedFile[64] - exit=10054, playtime=11
87554966; 1558 GetEncodedFile[63] - exit=10054, playtime=165092
87555023; 1559 StateTimer - Stopped,old=Playing
87555023; 1560 SyncNewPlayState - Stopped,mb=Playing
87562379; 1561 Profile - Generic Device, useragent=UPnP/1.0 DLNADOC/1.50 Kodi
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 16, 2025, 04:19:02 AM
Thanks for support, you were right. I fixed mp3 by allowing Musicbee in firewall. However M4a files still don't work with current settings.

Alright, so now it comes back to the previous DIDL error. The plugin is having an issue creating the metadata for your M4A files, I haven't checked the code yet but I have a fair idea what the issue is. Leave it with me.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 16, 2025, 06:14:05 AM
New version - mb_Upnp2025_2.0.3 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Added Aac/Alac references for devices that support those codecs but don't advertise they do.

There is nothing else new in this version so unless you are having issues with m4a files it's not worth updating.

InvisibleKnight can you give this new version a try with some m4a files. Make sure 'force native stream' is ticked.

edit: Also seeking will not work with encoded flac streams. It's not something I can fix without a complete overhaul of how the plugin works and even then I'm not sure it would work. So it's probably not something I'll be looking to fix anytime soon.
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: InvisibleKnight on May 16, 2025, 03:51:46 PM
New version - mb_Upnp2025_2.0.3 (https://getmusicbee.com/addons/plugins/534/upnp-2025/)

Changes
- Added Aac/Alac references for devices that support those codecs but don't advertise they do.

There is nothing else new in this version so unless you are having issues with m4a files it's not worth updating.

InvisibleKnight can you give this new version a try with some m4a files. Make sure 'force native stream' is ticked.

edit: Also seeking will not work with encoded flac streams. It's not something I can fix without a complete overhaul of how the plugin works and even then I'm not sure it would work. So it's probably not something I'll be looking to fix anytime soon.
You fixed it. Thank you so much. Incredible work you're doing here!
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: kimera on May 21, 2025, 05:03:40 PM
Great job, BoringName.
I updated bubbleupnp server and decided to update miusicbee and your plugin to version 2.0.3

I report the error generated:

MusicBee v3.6.9202.37404P  (Win10.0), 21 mag 2025 17:50:

System.Reflection.TargetInvocationException: Eccezione generata dalla destinazione di una chiamata. ---> System.ArgumentOutOfRangeException: InvalidArgument=Valore di '0' non valido per 'index'.
Nome parametro: index
   in System.Windows.Forms.ListView.SelectedIndexCollection.get_Item(Int32 index)
   in MusicBeePlugin.Plugin.SettingsDialog.SaveSettings()
   in MusicBeePlugin.Plugin.SettingsDialog.ContinuousStream_CheckedChanged(Object sender, EventArgs e)
   in System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
   in System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
   in System.Windows.Forms.CheckBox.set_Checked(Boolean value)
   in MusicBeePlugin.Plugin.SettingsDialog..ctor()
   in MusicBeePlugin.Plugin.Configure(IntPtr panelHandle)
   --- Fine della traccia dello stack dell'eccezione interna ---
   in System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   in System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   in System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   in #=zl6ttC0IWy5eCK5spaA==.#=zwf7rfs4=(IntPtr #=zMxLmyMTQlCb$)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 22, 2025, 08:16:26 AM
I report the error generated:

I'm in the middle of adding github into my workflow so it might be a little while before I get to this one.

I can't get that error to popup. Can you describe the steps you made before that error popped up. Had you deleted any profiles?
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: MC_Nirvana on May 23, 2025, 07:22:42 AM
Hello, I would like to give feedback on two issues
1, When I use DLNA to link my Xiaomi Xiaoai Speaker Pro on MusicBee on PC and play music, its Xiaomi Home card interface doesn't show the album name and music name.
2, When I pause the speaker with Xiaomi Home control with probability of switching to the next song, and when I click the play button on the Xiaomi Home card again after a normal pause, the status of the progress bar on the PC-based MusicBee will not be updated (it's just like no music is playing)

Here are the log files
https://paste.fastmirror.net/?b8bcf8342c61e5ad#2T5eZxAXdMgUW1XKysXW8tTxTRFk4gtNBVMLE2oUttmN

Here are the screenshots

(This is the MusicBee interface after I clicked the play button on the Xiaomi Home's speaker card to start playing. The audio is outputting normally but MusicBee's progress bar and playback status is not updating)
(https://img.picui.cn/free/2025/05/23/6830132d52ced.png)

(This is the card of the speaker (synced with Xiaomi Home) on my Redmi phone (Xiaomi HyperOS 2.0) and as you can see it doesn't show the song name and album name)
(https://img.picui.cn/free/2025/05/23/6830132d44c18.jpg)
Title: Re: UPnP 2025 - Continuation of the original UPnP/DLNA plugin
Post by: BoringName on May 23, 2025, 08:56:51 AM
Here are the log files
https://paste.fastmirror.net/?b8bcf8342c61e5ad#2T5eZxAXdMgUW1XKysXW8tTxTRFk4gtNBVMLE2oUttmN

It appears your device does not support gapless playback. Try checking "Disable NextURI support". You may need to restart musicbee before it takes effect.

edit: Also I'm not sure it will work with what you are trying to do. There are 2 ways you can use the plugin.
1. Set your speaker as the output and control what's playing via Musicbee
2. Use a controller to browse the Musicbee library via DLNA and use the controller to play to the speaker.

It seems like you want option 2 but are trying to do it via option 1 which isn't going to work.