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

BoringName

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


BoringName

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

jean.valjean

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

mister_fantasy

  • Newbie
  • *
  • Posts: 4

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

BoringName

  • Sr. Member
  • ****
  • Posts: 916
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 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.
Last Edit: May 05, 2025, 12:28:41 AM by BoringName

BoringName

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

mister_fantasy

  • Newbie
  • *
  • Posts: 4
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 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"

BoringName

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


mister_fantasy

  • Newbie
  • *
  • Posts: 4

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!

BoringName

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

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.



jean.valjean

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


BoringName

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

InvisibleKnight

  • Newbie
  • *
  • Posts: 5
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
Last Edit: May 14, 2025, 05:18:20 PM by InvisibleKnight

BoringName

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