None
closed
nobody
None
2019-11-15
2019-10-30
parkmino
No

Hi!

UPnP seems unstable with foobar2000 plugin - UPnP/DLNA Renderer, Server, Control Point.
It skips and stops randomly.
My colleague says it might be related to the following issue.
He says that TrackDuration should not be 0.

Result from GetPositionInfo



1
0:00:00 <--- It should not be "0"
<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="0/1/1I" parentID="0/1" restricted="1">
<dc:title>n EN</dc:title>
<dc:creator>?</dc:creator>
<upnp:artist>Gerrit Zitterbart
</upnp:artist>
<upnp:album>?</upnp:album>
<upnp:albumArtURI>http://192.168.0.5:52181/PlsAlbumArt/2049ce566e154ef4b039f83261533324/Albumn.png</upnp:albumArtURI>
<upnp:class>object.item.audioItem.musicTrack</upnp:class>
<res duration="0:00:45" size="7938044" bitrate="176400" bitsPerSample="16" sampleFrequency="44100" nrAudioChannels="2" protocolInfo="http-get::audio/wav:">http://192.168.0.5:52181/PlayList/2049ce566e154ef4b039f83261533324.wav?Trans=NONE&amp;StartTime=0&amp;DurationTime=45</res>
</item>
</DIDL-Lite>
http://192.168.0.5:52181/PlayList/2049ce566e154ef4b039f83261533324.wav?Trans=NONE&amp;StartTime=0&amp;DurationTime=45
0:00:13
0:00:13
0
0

Discussion

1 2 > >> (Page 1 of 2)
  • medoc
    medoc
    2019-11-04

    I'm going to try to reproduce. What media server are you using ? FooBar?

    Also: is the track playing or paused when this result is returned ? Or stopped?

     
    Last edit: medoc 2019-11-04
  • parkmino
    parkmino
    2019-11-04

    It includes media server as well.
    You can download in the following link and test in Windows.
    https://www.foobar2000.org/components/view/foo_upnp

    When adding the playlist with more than three song, the fist two songs are added as usual.
    However the third one is not added after the first song ends.
    Therefore only the first two songs are playable with this plugin.

    Separate songs stops randomly.

    Thanks in advance!

     
    Last edit: parkmino 2019-11-04
  • medoc
    medoc
    2019-11-04

    About stopping after two tracks: you can fix this by adding 'avtautoplay = 1' to /etc/upmpdcli.conf. Let me be clear that this is to compensate for a foobar bug. The command sequence that the plugin is sending does not make sense.

    About the zero duration: I can't reproduce this with mp3 tracks. I see attributes on your URls which are not present in my case, and would let me think that you have some kind of transcoding set up ? Please detail the exact configuration.

     
  • medoc
    medoc
    2019-11-04

    Oops, and now, track transitions are working normally for me, with gapless enabled. I don't know what happened previously, I wonder if I might have had another CP running.

    So, no need for autoplay, and until/if the play issues comes back, this leaves us with the zero duration issue, for which I need more detail.

     
  • parkmino
    parkmino
    2019-11-05

    WAV files matter while mp3 are fine with gapless control.
    Without gapless, there will be no playing time between the continuous two tracks.

    When playing mp3, it skips to next song in the middle of playing.
    Please find the attached file for your test.

     
    Attachments
  • medoc
    medoc
    2019-11-12

    Sorry about the delay, I had answered a few days ago but it seems that the
    site dropped my answer. So here I go again

    It seems that foobar is sending a SetNextAVTransportURI command after the
    renderer has stopped. This can do nothing. So this appears to be a foobar
    bug.

    Notice in the log how GetTransportInfo returns STOPPED before the SetNext
    command.

    Maybe you can send the log to the Foobar developers.

    :4:/y/home/dockes/projets/mpdupnp/libupnpp/libupnpp/device/device.cxx:433::UPNP_CONTROL_ACTION_REQUEST: GetPositionInfo. Params: <?xml version="1.0"?>
    <u:GetPositionInfo xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
    <InstanceID>0</InstanceID>
    </u:GetPositionInfo>
    
    :4:/y/home/dockes/projets/mpdupnp/upmpdcli/src/avtransport.cxx:559::UpMpdAVTransport::getPositionInfo. State: PLAYING (2)
    :4:/y/home/dockes/projets/mpdupnp/libupnpp/libupnpp/device/device.cxx:433::UPNP_CONTROL_ACTION_REQUEST: GetTransportInfo. Params: <?xml version="1.0"?>
    <u:GetTransportInfo xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
    <InstanceID>0</InstanceID>
    </u:GetTransportInfo>
    
    :4:/y/home/dockes/projets/mpdupnp/upmpdcli/src/avtransport.cxx:612::UpMpdAVTransport::getTransportInfo. State: STOPPED
    :4:/y/home/dockes/projets/mpdupnp/libupnpp/libupnpp/device/device.cxx:433::UPNP_CONTROL_ACTION_REQUEST: SetNextAVTransportURI. Params: <?xml version="1.0"?>
    <u:SetNextAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
    <InstanceID>0</InstanceID>
    <NextURI>http://192.168.4.108:56923/content/7d789946057c2436191ed0425c252dbb.wav?profile_id=0&amp;convert=wav</NextURI>
    <NextURIMetaData>&lt;DIDL-Lite xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:upnp=&quot;urn:schemas-upnp-org:metadata-1-0/upnp/&quot; xmlns:dlna=&quot;urn:schemas-dlna-org:metadata-1-0/&quot;&gt;&lt;item id=&quot;1&quot; parentID=&quot;0&quot; restricted=&quot;1&quot;&gt;&lt;dc:title&gt;Poundcake44&lt;/dc:title&gt;&lt;dc:creator&gt;Van Halen&lt;/dc:creator&gt;&lt;dc:date&gt;1993-01-01&lt;/dc:date&gt;&lt;upnp:artist&gt;Van Halen&lt;/upnp:artist&gt;&lt;upnp:artist role=&quot;AlbumArtist&quot;&gt;Van Halen, Van Halen&lt;/upnp:artist&gt;&lt;upnp:album&gt;Right Here, Right Now (Disc 1)&lt;/upnp:album&gt;&lt;upnp:genre&gt;Rock&lt;/upnp:genre&gt;&lt;upnp:albumArtURI&gt;http://192.168.4.108:56923/albumart/7d789946057c2436191ed0425c252dbb&lt;/upnp:albumArtURI&gt;&lt;upnp:originalTrackNumber&gt;1&lt;/upnp:originalTrackNumber&gt;&lt;res duration=&quot;0:05:28.000&quot; size=&quot;57859244&quot; bitrate=&quot;176400&quot; bitsPerSample=&quot;16&quot; sampleFrequency=&quot;44100&quot; nrAudioChannels=&quot;2&quot; protocolInfo=&quot;http-get:*:audio/wav:*&quot;&gt;http://192.168.4.108:56923/content/7d789946057c2436191ed0425c252dbb.wav?profile_id=0&amp;amp;convert=wav&lt;/res&gt;&lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;</NextURIMetaData>
    </u:SetNextAVTransportURI>
    
    :4:/y/home/dockes/projets/mpdupnp/upmpdcli/src/avtransport.cxx:426::Set(next)AVTransportURI: next 1 uri http://192.168.4.108:56923/content/7d789946057c2436191ed0425c252dbb.wav?profile_id=0&convert=wav metadata[<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="1" parentID="0" restricted="1"><dc:title>Poundcake44</dc:title><dc:creator>Van Halen</dc:creator><dc:date>1993-01-01</dc:date><upnp:artist>Van Halen</upnp:artist><upnp:artist role="AlbumArtist">Van Halen, Van Halen</upnp:artist><upnp:album>Right Here, Right Now (Disc 1)</upnp:album><upnp:genre>Rock</upnp:genre><upnp:albumArtURI>http://192.168.4.108:56923/albumart/7d789946057c2436191ed0425c252dbb</upnp:albumArtURI><upnp:originalTrackNumber>1</upnp:originalTrackNumber><res duration="0:05:28.000" size="57859244" bitrate="176400" bitsPerSample="16" sampleFrequency="44100" nrAudioChannels="2" protocolInfo="http-get:*:audio/wav:*">http://192.168.4.108:56923/content/7d789946057c2436191ed0425c252dbb.wav?profile_id=0&amp;convert=wav</res><upnp:class>object.item.audioItem.musicTrack</upnp:class></item></DIDL-Lite>]
    :3:/y/home/dockes/projets/mpdupnp/upmpdcli/src/upmpd.cxx:275::checkContentFormat: format check disabled
    :4:/y/home/dockes/projets/mpdupnp/upmpdcli/src/mpdcli.cxx:639::MPDCli::repeat:0
    :4:/y/home/dockes/projets/mpdupnp/upmpdcli/src/mpdcli.cxx:653::MPDCli::random:0
    :4:/y/home/dockes/projets/mpdupnp/upmpdcli/src/mpdcli.cxx:660::MPDCli::single:0
    :4:/y/home/dockes/projets/mpdupnp/upmpdcli/src/mpdcli.cxx:646::MPDCli::consume:0
    :4:/y/home/dockes/projets/mpdupnp/upmpdcli/src/mpdcli.cxx:785::MPDCli::deletePosRange [1, 2[
    :4:/y/home/dockes/projets/mpdupnp/upmpdcli/src/mpdcli.cxx:713::MPDCli::insert at :1 uri http://192.168.4.108:56923/content/7d789946057c2436191ed0425c252dbb.wav?profile_id=0&convert=wav
    :4:/y/home/dockes/projets/mpdupnp/libupnpp/libupnpp/device/device.cxx:433::UPNP_CONTROL_ACTION_REQUEST: GetTransportInfo. Params: <?xml version="1.0"?>
    <u:GetTransportInfo xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
    <InstanceID>0</InstanceID>
    </u:GetTransportInfo>
    
    :4:/y/home/dockes/projets/mpdupnp/upmpdcli/src/avtransport.cxx:612::UpMpdAVTransport::getTransportInfo. State: STOPPED
    :4:/y/home/dockes/projets/mpdupnp/libupnpp/libupnpp/device/device.cxx:433::UPNP_CONTROL_ACTION_REQUEST: GetTransportInfo. Params: <?xml version="1.0"?>
    <u:GetTransportInfo xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
    <InstanceID>0</InstanceID>
    </u:GetTransportInfo>
    
     
  • parkmino
    parkmino
    2019-11-13

    1) Please refer to the following message from my college.

    Foobar2000 sends SetNextAVTransportURI command about 10 secs before the last song ends considering the Duration time of it.
    Therefore this issue will be resolved when the Duration time is correctly set.

    2) Could you please check the above mp3 file which skips to next song in foobar playlist?

     
  • medoc
    medoc
    2019-11-14

    I have no problem playing the mp3 track that you attached. What exact mpd version are you running, on what OS and on what hardware ?

    Also I checked, and the zero trackduration is only returned by GetPositionInfo when it switches to the STOPPED state, so everything appears fine on the upmpdcli side.

    The normal way is to call SetNextAVTransportURI right after every track change, so there is no need for a precise timing relative to the track end.

    As far as I can see this is a foobar bug, and I will not work more on this part until I have input from the foobar developer, you should report the bug.

     
    Last edit: medoc 2019-11-14
    Attachments
  • parkmino
    parkmino
    2019-11-15

    1) I'm using an raspberry pi 3B with the latest raspbian buster.
    MPD version is my own built 0.20.23 since I don't like 0.21.x and 0.22.x.
    For me to reproduce it, place the mp3 file at 2nd in the playlist.
    The 1st place has no problem.

    2) If so, there seems no solution at the moment.
    The foobar plugin has not been maintained for years.

    FYI, Android BubbleUPnP shows none of these issues.

     
1 2 > >> (Page 1 of 2)

Cancel   Add attachment