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&StartTime=0&DurationTime=45</res>
</item>
</DIDL-Lite>
http://192.168.0.5:52181/PlayList/2049ce566e154ef4b039f83261533324.wav?Trans=NONE&StartTime=0&DurationTime=45
0:00:13
0:00:13
0
0
Discussion
-
parkmino
2019-10-30Rusult is broken and please find the attached file.
Attachments
-
medoc
2019-11-04I'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
2019-11-04It includes media server as well.
You can download in the following link and test in Windows.
https://www.foobar2000.org/components/view/foo_upnpWhen 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
2019-11-04About 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
2019-11-04Oops, 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
2019-11-05WAV 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
2019-11-12Sorry about the delay, I had answered a few days ago but it seems that the
site dropped my answer. So here I go againIt 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&convert=wav</NextURI> <NextURIMetaData><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></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&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
2019-11-131) 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
2019-11-14I 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-14Attachments
-
parkmino
2019-11-151) 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.