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

InvisibleKnight

  • Newbie
  • *
  • Posts: 5
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]

MotleyG

  • Full Member
  • ***
  • Posts: 212
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.

InvisibleKnight

  • Newbie
  • *
  • Posts: 5
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 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?
Last Edit: May 15, 2025, 05:30:54 PM by InvisibleKnight

MotleyG

  • Full Member
  • ***
  • Posts: 212
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 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"

InvisibleKnight

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

BoringName

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

BoringName

  • Sr. Member
  • ****
  • Posts: 916
New version - mb_Upnp2025_2.0.3

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.
Last Edit: May 16, 2025, 06:36:19 AM by BoringName

InvisibleKnight

  • Newbie
  • *
  • Posts: 5
New version - mb_Upnp2025_2.0.3

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!

kimera

  • Newbie
  • *
  • Posts: 1
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$)

BoringName

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

MC_Nirvana

  • Newbie
  • *
  • Posts: 1
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)


(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)

BoringName

  • Sr. Member
  • ****
  • Posts: 916
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.
Last Edit: May 23, 2025, 09:15:08 AM by BoringName