parkmino writes

I’m using upmpdcli 1.2.9 under ubuntu 16.04 x64. It stop playing saying the following and please test any one from your side.

mpd without upmpdcli plays this file without problem and AFAIK no problem with previous version.

parkmino writes

I tried the normal wave file, 44.1KHz 16bit, and it does not play either.

medoc92 writes

I don’t think that the "unknown class" message has a consequence for upmpdcli.

I’d be interested by the debug log trace when you try to add the file to the playlist, specifically the message which looks like the following:

:4:src/ohplaylist.cxx:638::OHPlaylist::insert: afterid 0 Uri http://192.168.4.4:9790/minimserver/*/mp3/classique/bach_js/brandenburg_concertos/brandenburg_concertos_italiano/cd1/14-Concerto_No._3_in_G_major,_BWV_1048__I._Allegro.mp3 Metadata <?xml version="1.0" encoding="utf-8"? ><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$folders$f1517$f1518$f1546$f1553$f1554$*i4698$18644" parentID="0$folders$f1517$f1518$f1546$f1553$f1554$*i4698" restricted="1" ><dc:title >Concerto No. 3 in G major, BWV 1048: I. Allegro</dc:title ><upnp:genre >(32)</upnp:genre ><dc:date >2005-01-01</dc:date ><upnp:album >Concerto No. 3</upnp:album ><upnp:artist role="Composer" >Johann Sebastian Bach bran</upnp:artist ><upnp:artist >Concerto Italiano; Johann Sebastian Bach; Rinaldo Alessandrini</upnp:artist ><dc:creator >Concerto Italiano; Johann Sebastian Bach; Rinaldo Alessandrini</dc:creator ><upnp:originalTrackNumber >14</upnp:originalTrackNumber ><upnp:albumArtURI dlna:profileID="JPEG_MED" >http://192.168.4.4:9790/minimserver/*/mp3/classique/bach_js/brandenburg_concertos/brandenburg_concertos_italiano/cd1/14-Concerto_No._3_in_G_major,_BWV_1048__I._Allegro.mp3/$!picture-381-42054.jpg</upnp:albumArtURI ><res duration="0:05:36.927" size="10571967" bitrate="31248" sampleFrequency="44100" nrAudioChannels="2" protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000000" >http://192.168.4.4:9790/minimserver/*/mp3/classique/bach_js/brandenburg_concertos/brandenburg_concertos_italiano/cd1/14-Concerto_No._3_in_G_major,_BWV_1048__I._Allegro.mp3</res ><upnp:class >object.item.audioItem.musicTrack</upnp:class ></item ></DIDL-Lite >

Also, you could try to set "checkcontentformat" to 0 in the configuration file to see if it changes anything.

Last, if the 44100/16bit file does not play, I’d be interested by a copy.

parkmino writes

Please refer to the following and I converted a mp3 to wav using Sound Converter to test CD quality wav. Set "checkcontentformat" to 0 does not make any difference. The file is listed on upplay however it does not play at all.

:4:src/ohplaylist.cxx:638::OHPlaylist::insert: afterid 0 Uri http://192.168.0.12:34022/MediaExport/i/MzBmZWY2OWVkYTM1MDUzMGI5MTI4N2Y3YzM3ODFmMGE%3D/res/primary_http.WAV Metadata <?xml version="1.0" encoding="utf-8"? ><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="30fef69eda350530b91287f7c3781f0a" parentID="3a27914ed28b05e225d4025953f51afd" restricted="0" dlna:dlnaManaged="00000010" ><dc:title >4 The Lyric Pieces for Piri,Marimba &amp; Piano-forte Bari_Loneliness_Juxtaposition.WAV</dc:title ><upnp:class >object.item.audioItem.musicTrack</upnp:class ><dc:date >2012-04-12T01:17:48Z</dc:date ><upnp:objectUpdateID >899</upnp:objectUpdateID ><res size="46373054" duration="0:01:20.000" bitrate="0" nrAudioChannels="2" sampleFrequency="96000" protocolInfo="http-get:*:audio/x-wav:DLNA.ORG_OP=01" >http://192.168.0.12:34022/MediaExport/i/MzBmZWY2OWVkYTM1MDUzMGI5MTI4N2Y3YzM3ODFmMGE%3D/res/primary_http.WAV</res ><upnp:originalTrackNumber >0</upnp:originalTrackNumber ></item ></DIDL-Lite >

medoc92 writes

Can you put a copy of the file somewhere ?

parkmino writes

medoc92 writes

I checked that the file is 24 bits / 96 Khz, and playing on my upmpdcli instance.

Could you please copy a few dozen lines from the log, after the "OHPlaylist::insert" line that you copied above ?

Also please copy the end from /var/log/mpd/mpd.log

parkmino writes

Please refer to the followings. 1. upmpd log

`:4:src/ohplaylist.cxx:615::OHPlaylist::insert :4:src/ohplaylist.cxx:638::OHPlaylist::insert: afterid 0 Uri http://192.168.0.12:46707/MediaExport/i/MzBmZWY2OWVkYTM1MDUzMGI5MTI4N2Y3YzM3ODFmMGE%3D/res/primary_http.WAV Metadata <?xml version="1.0" encoding="utf-8"? ><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="30fef69eda350530b91287f7c3781f0a" parentID="3a27914ed28b05e225d4025953f51afd" restricted="0" dlna:dlnaManaged="00000010" >dc:title4 The Lyric Pieces for Piri,Marimba & Piano-forte Bari_Loneliness_Juxtaposition.WAV/dc:titleupnp:classobject.item.audioItem.musicTrack/upnp:classdc:date2012-04-12T01:17:48Z/dc:dateupnp:objectUpdateID899/upnp:objectUpdateID<res size="46373054" duration="0:01:20.000" bitrate="0" nrAudioChannels="2" sampleFrequency="96000" protocolInfo="http-get:*:audio/x-wav:DLNA.ORG_OP=01" >http://192.168.0.12:46707/MediaExport/i/MzBmZWY2OWVkYTM1MDUzMGI5MTI4N2Y3YzM3ODFmMGE%3D/res/primary_http.WAV</res >upnp:originalTrackNumber0/upnp:originalTrackNumber</item ></DIDL-Lite > :2:src/upmpd.cxx:138::checkContentFormat: format check disabled :4:src/mpdcli.cxx:696::MPDCli::insertAfterId: id 0 uri http://192.168.0.12:46707/MediaExport/i/MzBmZWY2OWVkYTM1MDUzMGI5MTI4N2Y3YzM3ODFmMGE%3D/res/primary_http.WAV :4:src/mpdcli.cxx:678::MPDCli::insert at :0 uri http://192.168.0.12:46707/MediaExport/i/MzBmZWY2OWVkYTM1MDUzMGI5MTI4N2Y3YzM3ODFmMGE%3D/res/primary_http.WAV :4:src/ohplaylist.cxx:644::OHPlaylist::insert: new id: 2 :4:src/mpdcli.cxx:808::MPDCli::getQueueData :4:src/mpdcli.cxx:793::MPDCli::getQueueSongs: 1 songs :4:src/ohplaylist.cxx:146::OHPlaylist::translateIdArray: current ids: 2 :4:src/ohplaylist.cxx:234::OHPlaylist::makeIdArray: saving metacache :4:src/ohmetacache.cxx:127::dmcacheSave: got save task: 1 entries to /home/parkmino//.cache/upmpdcli//metacache :4:libupnpp/device/device.cxx:318::UPNP_CONTROL_ACTION_REQUEST: IdArray. Params: <?xml version="1.0"? > <u:IdArray xmlns:u="urn:av-openhome-org:service:Playlist:1" >/u:IdArray

:4:src/ohplaylist.cxx:726::OHPlaylist::idArray :4:src/ohplaylist.cxx:744::OHPlaylist::idArray (internal) :4:src/ohplaylist.cxx:747::OHPlaylist::idArray: qvers 14 :4:libupnpp/device/device.cxx:318::UPNP_CONTROL_ACTION_REQUEST: ReadList. Params: <?xml version="1.0"? > <u:ReadList xmlns:u="urn:av-openhome-org:service:Playlist:1" > <IdList >2 </IdList > /u:ReadList

<u:Play xmlns:u="urn:av-openhome-org:service:Playlist:1" >/u:Play

:4:src/ohplaylist.cxx:289::OHPlaylist::play :4:src/mpdcli.cxx:611::MPDCli::consume:0 :4:src/mpdcli.cxx:628::MPDCli::single:0 :4:src/mpdcli.cxx:538::MPDCli::play(pos=-1) :4:libupnpp/device/device.cxx:318::UPNP_CONTROL_ACTION_REQUEST: Id. Params: <?xml version="1.0"? > <u:Id xmlns:u="urn:av-openhome-org:service:Playlist:1" >/u:Id

:4:src/ohplaylist.cxx:473::OHPlaylist::id :4:libupnpp/device/device.cxx:318::UPNP_CONTROL_ACTION_REQUEST: SourceXml. Params: <?xml version="1.0"? > <u:SourceXml xmlns:u="urn:av-openhome-org:service:Product:1" >/u:SourceXml

:4:src/ohproduct.cxx:219::OHProduct::sourceXML :4:libupnpp/device/device.cxx:318::UPNP_CONTROL_ACTION_REQUEST: SourceIndex. Params: <?xml version="1.0"? > <u:SourceIndex xmlns:u="urn:av-openhome-org:service:Product:1" >/u:SourceIndex

<u:Id xmlns:u="urn:av-openhome-org:service:Playlist:1" >/u:Id

:4:src/ohplaylist.cxx:473::OHPlaylist::id :4:libupnpp/device/device.cxx:318::UPNP_CONTROL_ACTION_REQUEST: Id. Params: <?xml version="1.0"? > <u:Id xmlns:u="urn:av-openhome-org:service:Playlist:1" >/u:Id

:4:src/ohplaylist.cxx:473::OHPlaylist::id :4:libupnpp/device/device.cxx:318::UPNP_CONTROL_ACTION_REQUEST: Play. Params: <?xml version="1.0"? > <u:Play xmlns:u="urn:av-openhome-org:service:Playlist:1" >/u:Play

:4:src/ohplaylist.cxx:289::OHPlaylist::play :4:src/mpdcli.cxx:611::MPDCli::consume:0 :4:src/mpdcli.cxx:628::MPDCli::single:0 :4:src/mpdcli.cxx:538::MPDCli::play(pos=-1) :4:libupnpp/device/device.cxx:318::UPNP_CONTROL_ACTION_REQUEST: Id. Params: <?xml version="1.0"? > <u:Id xmlns:u="urn:av-openhome-org:service:Playlist:1" >/u:Id

:4:src/ohplaylist.cxx:473::OHPlaylist::id :4:libupnpp/device/device.cxx:318::UPNP_CONTROL_ACTION_REQUEST: SourceXml. Params: <?xml version="1.0"? > <u:SourceXml xmlns:u="urn:av-openhome-org:service:Product:1" >/u:SourceXml

:4:src/ohproduct.cxx:219::OHProduct::sourceXML :4:libupnpp/device/device.cxx:318::UPNP_CONTROL_ACTION_REQUEST: SourceIndex. Params: <?xml version="1.0"? > <u:SourceIndex xmlns:u="urn:av-openhome-org:service:Product:1" >/u:SourceIndex

<u:Id xmlns:u="urn:av-openhome-org:service:Playlist:1" >/u:Id

:4:src/ohplaylist.cxx:473::OHPlaylist::id` 1. mpd.log

Oct 18 18:00 : client: [1] opened from 127.0.0.1:34100 Oct 18 18:00 : audiofile: not seekable Oct 18 18:00 : player: played "http://192.168.0.12:46707/MediaExport/i/MzBmZWY2OWVkYTM1MDUzMGI5MTI4N2Y3YzM3ODFmMGE%3D/res/primary_http.WAV"

medoc92 writes

Ok, the problem is not with upmpdcli but between mpd and your media server:

Oct 18 18:00 : client: [1] opened from 127.0.0.1:34100 Oct 18 18:00 : audiofile: not seekable

I think that this maybe a known mpd/libaudiofile issue. Please try to install a patched mpd from:

parkmino writes

Yes, my mpd with ffmpeg plays the wav flawlessly and that’s why. This issue is not related to Upmpdcli and close it soonest.

However, could you please let me know the patch in more detail? I’d like to compile mpd myself.

Thanks in advance

medoc92 writes

I think that the issue, if this is confirmed, has to do with a combination of WAV playing with HTTP access (the same WAV file will play correctly as a local file, but refuse to play when fetched through HTTP, which is what happens when going through UPnP). The problem occurs in libaudiofile, so disabling it lets another lib (libsndfile or libffmpeg) handle WAV files and makes things work.

The patched mpd source is available for example here (it’s the same for all supported distributions): https://launchpad.net/~jean-francois-dockes/+archive/ubuntu/mpd/+files/mpd_0.19.19jfd1.orig.tar.gz

I think that the only difference with the official mpd is that the source is patched to integrate a change from mpd 0.20 to enable L16 support. L16 is special because raw LPCM has no header info, so that sample rate and width have to come from the HTTP headers, which MPD previously did not process properly.

You can find the enable/disable build options inside the "rules" file inside the debian directory tar file: https://launchpad.net/jean-francois-dockes/+archive/ubuntu/mpd/+files/mpd_0.19.19jfd1-1ppa9~yakkety1.debian.tar.xz

The main change in the build is --disable-audiofile

parkmino writes

Thanks for your kind explanation.

When I compiled mpd with audiofile and ffmpeg, no problem with local and http wav playback. AFAIK libsnd file format is limited to 16bit@44.1KHz and I don’t like this. Unfortunately I still do not hear music but only noise from your patched mpd. I should stick to audiofile and ffmpeg decoder for a while.

Cheers

medoc92 writes

A long as it works for you, keep it as it is :)

But this is weird anyway, because the 0.19.19jfd1 package is working for me with your own wav file, on amd64 ubuntu xenial:

decoder_thread: probing plugin sndfile
decoder: audio_format=96000:32:2, seekable=true
No protocol specified
xcb_connection_has_error() returned true
alsa_output: opened default:CARD=PCH type=PLUG
alsa_output: format=S32_LE (Signed 32 bit Little Endian)
alsa_output: buffer: size=4096..16384 time=42666..170667
alsa_output: period: size=2047..2049 time=21333..21334
alsa_output: default period_time = buffer_time/4 = 170666/4 = 42666
alsa_output: buffer_size=16384 period_size=2048
output: opened plugin=alsa name="My ALSA Device" audio_format=96000:32:2

parkmino writes

Unfortunately all that I hear is only noise.

Anyway, thanks a lot for your support as always!