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

BoringName

  • Sr. Member
  • ****
  • Posts: 916
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.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
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
Last Edit: April 19, 2025, 06:38:27 PM by hiccup

simbun

  • Jr. Member
  • **
  • Posts: 39
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.
Last Edit: April 19, 2025, 05:38:05 PM by simbun

hiccup

  • Hero Member
  • *****
  • Posts: 9107
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 for sharing your experiences or recommendations as far as I am concerned)
Last Edit: April 19, 2025, 06:08:57 PM by hiccup

jean.valjean

  • Jr. Member
  • **
  • Posts: 29
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
Last Edit: April 19, 2025, 07:32:46 PM by jean.valjean

simbun

  • Jr. Member
  • **
  • Posts: 39
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.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
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.
Last Edit: April 19, 2025, 06:51:46 PM by hiccup

simbun

  • Jr. Member
  • **
  • Posts: 39
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 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.
Last Edit: April 19, 2025, 11:37:28 PM by simbun

BoringName

  • Sr. Member
  • ****
  • Posts: 916
-  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....

BoringName

  • Sr. Member
  • ****
  • Posts: 916
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.
Last Edit: April 20, 2025, 12:15:27 AM by BoringName

jorgemg1984

  • Jr. Member
  • **
  • Posts: 31
I'm using multiple devices (Eversolo, Cambridge, even tried a Wiim recently) without any issues.

simbun

  • Jr. Member
  • **
  • Posts: 39
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

simbun

  • Jr. Member
  • **
  • Posts: 39
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.
Last Edit: April 20, 2025, 10:59:22 AM by simbun

jorgemg1984

  • Jr. Member
  • **
  • Posts: 31
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...

simbun

  • Jr. Member
  • **
  • Posts: 39
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.