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

hiccup

  • Hero Member
  • *****
  • Posts: 9107
Does the LMS interface switch to the second track? I'm guessing not.
Indeed it doesn't.


I lied....
that's great
(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
Last Edit: March 23, 2025, 06:51:15 PM by hiccup

BoringName

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

BoringName

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

BoringName

  • Sr. Member
  • ****
  • Posts: 916
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.
Last Edit: March 27, 2025, 03:09:54 AM by BoringName

hiccup

  • Hero Member
  • *****
  • Posts: 9107
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!

BoringName

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

hiccup

  • Hero Member
  • *****
  • Posts: 9107
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?

BoringName

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

hiccup

  • Hero Member
  • *****
  • Posts: 9107
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.
Last Edit: March 29, 2025, 09:28:00 AM by hiccup

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10265
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.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

BoringName

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

BoringName

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


hiccup

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

hiccup

  • Hero Member
  • *****
  • Posts: 9107
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 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.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
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.


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.
Last Edit: April 04, 2025, 05:34:26 PM by hiccup