Skip to content

Album art cannot be displayed when playing from upnp source #2470

@mmuffins

Description

@mmuffins

Bug report

Hi,
I'm trying to play songs from a local dlna server. The playback works perfectly, but I noticed that mpd is unable to fetch album art:

❯ printf 'currentsong\nclose\n' | nc localhost 6600
OK MPD 0.24.0
file: 192.168.0.11 (COOKIE)/Playlists/bg/Perfect Day
Artist: The Jolly Boys
Title: Perfect Day
Album: Great Expectation
Track: 2
Date: 2010
Genre: Mento
Composer: The Jolly Boys
Time: 223
duration: 223.000
Pos: 0
Id: 23
OK

❯ printf 'readpicture "192.168.0.11 (COOKIE)/Playlists/bg/Perfect Day" 0\nclose\n' | nc localhost 6600
OK MPD 0.24.0
ACK [5@0] {readpicture} Unrecognized URI

When checking the definition of the file, I can see that it exposes the upnp:albumArtURI property of the file:

❯ curl -s \
  -H 'Content-Type: text/xml; charset="utf-8"' \
  -H 'SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"' \
  --data-binary @- \
  'http://192.168.0.11:14111/ContentDirectory/bb03b17a-3fa5-4402-820e-b9cb6021c0cc/control.xml' <<'EOF'
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
  xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
  s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <s:Body>
    <u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
      <ObjectID>0\Playlists\bg\ItemID=29646.mp3</ObjectID>
      <BrowseFlag>BrowseMetadata</BrowseFlag>
      <Filter>*</Filter>
      <StartingIndex>0</StartingIndex>
      <RequestedCount>1</RequestedCount>
      <SortCriteria></SortCriteria>
    </u:Browse>
  </s:Body>
</s:Envelope>
EOF


<?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:BrowseResponse
            xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
            <Result>&lt;DIDL-Lite
                xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"
                xmlns:dc="http://purl.org/dc/elements/1.1/"
                xmlns:sec="http://www.sec.co.kr/dlna/"
                xmlns:ventis="http://mediamonkey.com/schemas/ventis_metadata/"
                xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"
                xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/"&gt;&lt;item id="0\Playlists\93665e6e-5cca-47b7-b904-c15be943a704\ItemID=29646.mp3" parentID="0\Playlists\93665e6e-5cca-47b7-b904-c15be943a704" restricted="1"&gt;&lt;dc:title&gt;Perfect Day&lt;/dc:title&gt;&lt;dc:creator&gt;The Jolly Boys&lt;/dc:creator&gt;&lt;dc:date&gt;2010-01-01&lt;/dc:date&gt;&lt;upnp:artist role="Performer"&gt;The Jolly Boys&lt;/upnp:artist&gt;&lt;upnp:artist role="AlbumArtist"&gt;The Jolly Boys&lt;/upnp:artist&gt;&lt;upnp:author&gt;The Jolly Boys&lt;/upnp:author&gt;&lt;upnp:album&gt;Great Expectation&lt;/upnp:album&gt;&lt;upnp:genre&gt;Mento&lt;/upnp:genre&gt;&lt;upnp:albumArtURI dlna:profileID="JPEG_TN"&gt;http://192.168.0.11:14111/29646.jpg&lt;/upnp:albumArtURI&gt;&lt;upnp:originalTrackNumber&gt;2&lt;/upnp:originalTrackNumber&gt;&lt;upnp:PlayCounter&gt;8&lt;/upnp:PlayCounter&gt;&lt;upnp:rating&gt;60&lt;/upnp:rating&gt;&lt;upnp:MM_VolumeLeveling&gt;-5.94999980926514&lt;/upnp:MM_VolumeLeveling&gt;&lt;upnp:MM_TrackGain&gt;-5.94999980926514&lt;/upnp:MM_TrackGain&gt;&lt;upnp:MM_AlbumGain&gt;-7.05000019073486&lt;/upnp:MM_AlbumGain&gt;&lt;upnp:MM_TrackType&gt;0&lt;/upnp:MM_TrackType&gt;&lt;res duration="0:03:43.000" size="8923136" bitrate="320000" sampleFrequency="44100" nrAudioChannels="2" protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01500000000000000000000000000000"&gt;http://192.168.0.11:14111/%5CPlaylists%5C93665e6e-5cca-47b7-b904-c15be943a704%5CItemID=29646.mp3&lt;/res&gt;&lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;
            </Result>
            <NumberReturned>1</NumberReturned>
            <TotalMatches>1</TotalMatches>
            <UpdateID>0</UpdateID>
        </u:BrowseResponse>
    </s:Body>
</s:Envelope>%

To do a general sanity check I tried playing the same track in vlc, which was able to display the album art.

Expected Behavior

mpd should display album art of tracks playing via dlna.

Actual Behavior

mpd throws error exception: Unrecognized URI

Version

❯ mpd --version
Music Player Daemon 0.24.9 (0.24.9)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2025 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp

Storage plugins:
 local smbclient udisks nfs curl

Neighbor plugins:
 smbclient upnp udisks

Decoder plugins:
 [mpg123] mp3
 [mad] mp3 mp2
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [dsdiff] dff
 [dsf] dsf
 [faad] aac
 [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
 [fluidsynth] mid
 [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz
 [ffmpeg] 264 265 266 302 3g2 3gp 4xm 669 722 aa aa3 aac aax ac3 ac4 ace acm act adf adp ads adx aea afc aif aiff aix al alias_pix alp amf amr amrnb amrwb ams anm ans apc ape apl apm apng aptx aptxhd apv aqt argo_asf argo_brp argo_cvg art asc asf asf_o ass ast au avc avi avif avr avs avs2 avs3 bcstm bethsoftvid bfi bfstm bin bink binka bit bitpacked bmp_pipe bmv boa bonk brender_pix brstm c2 c93 caf cdata cdg cdxl cgi cif cine codec2raw concat cri_pipe dash dat data daud dav dbm dds_pipe dfa dff dfpwm dif digi dirac diz dmf dnxhd dpx_pipe dsf dsicin dsm dss dst dtk dtm dts dtshd dv dvbsub dvbtxt dxa ea eac3 ec3 evc exr_pipe f32be f32le f4v f64be f64le fap far ffmetadata film_cpk fits flac flic flm flv frm fsb fwse g722 g723_1 g726 g726le g728 g729 gdm gdv gem_pipe genh gif gif_pipe gsm gxf h261 h263 h264 h265 h266 h26l hca hcom hdr_pipe heic heif hevc hls hnm iamf ice ico idcin idf idx iff ifv ilbc image2 image2pipe imf imx ipmovie ipu ircam ism isma ismv iss it iv8 ivf ivr j2b j2k j2k_pipe jacosub jpeg_pipe jpegls_pipe jpegxl_pipe jv jxl kux kvag laf lc3 lmlm4 loas lrc lvf lxf m15 m2a m4a m4b m4v mac mca mcc mdl med mgsts microdvd mj2 mjpeg mjpg mk3d mka mks mkv mlp mlv mm mmcmp mmf mms mo3 mod mods moflex mov mp2 mp3 mp4 mpa mpc mpc8 mpeg mpegts mpegtsraw mpegvideo mpl2 mpo mptm msbc msf msnwctcp msp mt2 mtaf mtm mtv musx mv mvi mxf mxg nfo nist nsp nst nsv nut nuv obu ogg okt oma omg opus osq paf pam_pipe pbm_pipe pcx_pipe pdv pfm_pipe pgm_pipe pgmyuv_pipe pgx_pipe phm_pipe photocd_pipe pictor_pipe pjs plm pmp png_pipe pp_bnk ppm ppm_pipe psd_pipe psm psp psxstr pt36 ptm pva pvf qcif qcp qdraw_pipe qoa qoi_pipe r3d rco rcv rcwt rgb rka rl2 rm roq rpl rsd rso rt rtp rtsp s16be s24be s24le s32be s32le s337m s3m sami sap sb sbc sbg scc scd sdns sdp sdr2 sds sdx ser sf sfx sfx2 sga sgi_pipe shn sln smi smk smush sol son sox spdif sph srt ss2 st26 stk stl stm stp str sub sunrast_pipe sup svag svg_pipe svs sw swf tak tco tedcaptions thd thp tiertexseq tiff_pipe tmv tta txd txt ty ty+ u16be u24be u24le u32be u32le ub ul ult umx usm uw v v210 vag vb vbn_pipe vc1 vidc viv vividas vmd voc vpk vqe vqf vql vt vtt vvc w64 wa wav way wc3movie webm webm_dash_manifest webp_pipe webvtt wma wow wsaud wsd wsvqa wtv wv wve xa xbin xbm_pipe xl xm xmd xmv xpk xpm_pipe xvag xwd_pipe xwma y4m yop yuv yuv10 rtp:// rtsp:// rtsps://
 [audiofile] wav au aiff aif
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe alsa ao pipewire pulse jack httpd snapcast recorder

Encoder plugins:
 null vorbis opus lame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip

Input plugins:
 file io_uring archive alsa qobuz curl ffmpeg smbclient nfs mms cdio_paranoia

Playlist plugins:
 extm3u m3u pls xspf asx rss flac cue embcue

Protocols:
 file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// qobuz:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp://

Other features:
 avahi dbus udisks epoll icu inotify systemd tcp un

Configuration

music_directory     "/home/mmuffins/mpdmusic"
playlist_directory  "/home/mmuffins/.config/mpd/playlists"
state_file          "/home/mmuffins/.config/mpd/state"
sticker_file        "/home/mmuffins/.config/mpd/sticker.sql"

bind_to_address     "0.0.0.0"
metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
auto_update     "yes"

zeroconf_enabled "yes"
zeroconf_name "mpd @ %h"

audio_output {
  type "pipewire"
  name "Pipewire Sound Server"
}

input {
    plugin "curl"
}

database {
  plugin "upnp"
}

neighbors {
  plugin "upnp"
}
log_level "notice"

Log

Apr 28 20:01:17 cookie mpd[43186]: client: [127.0.0.1:47698] process command list
Apr 28 20:01:17 cookie mpd[43186]: client: process command "sticker list song \"192.168.0.11 (COOKIE)/Playlists/bg/Perfect Day\""
Apr 28 20:01:17 cookie mpd[43186]: client: command returned 0
Apr 28 20:01:17 cookie mpd[43186]: client: [127.0.0.1:47698] process command list returned 0
Apr 28 20:01:17 cookie mpd[43186]: client: [127.0.0.1:47698] process command "idle"
Apr 28 20:01:17 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 1
Apr 28 20:01:17 cookie mpd[43186]: client: [127.0.0.1:35390] process command "currentsong"
Apr 28 20:01:17 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:17 cookie mpd[43186]: client: [127.0.0.1:35390] process command "status"
Apr 28 20:01:17 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:17 cookie mpd[43186]: client: [127.0.0.1:35390] process command "idle"
Apr 28 20:01:17 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 1
Apr 28 20:01:32 cookie mpd[43186]: client: [127.0.0.1:35390] process command "currentsong"
Apr 28 20:01:32 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:32 cookie mpd[43186]: client: [127.0.0.1:35390] process command "status"
Apr 28 20:01:32 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:32 cookie mpd[43186]: client: [127.0.0.1:35390] process command "idle"
Apr 28 20:01:32 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 1
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] process command list
Apr 28 20:01:33 cookie mpd[43186]: client: process command "add \"192.168.0.11 (COOKIE)/Playlists/bg/Perfect Day\""
Apr 28 20:01:33 cookie mpd[43186]: client: command returned 0
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] process command list returned 0
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:35390] process command "currentsong"
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:35390] process command "status"
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:35390] process command "idle"
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 1
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] process command "idle"
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 1
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] process command "idle"
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 1
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] process command "playlistinfo"
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 0
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] process command "status"
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 0
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] process command "idle"
Apr 28 20:01:33 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 1
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] process command "playid 23"
Apr 28 20:01:35 cookie mpd[43186]: playlist: play 0:"192.168.0.11 (COOKIE)/Playlists/bg/Perfect Day"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 0
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] process command "idle"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 1
Apr 28 20:01:35 cookie mpd[43186]: decoder_thread: probing plugin mpg123
Apr 28 20:01:35 cookie mpd[43186]: [src/libmpg123/parse.c:do_readahead():1105] error: cannot seek!
Apr 28 20:01:35 cookie mpd[43186]: mpg123: mpg123_getformat() failed: A generic mpg123 error.
Apr 28 20:01:35 cookie mpd[43186]: decoder_thread: probing plugin mad
Apr 28 20:01:35 cookie mpd[43186]: mad: detected LAME version 3.98 ("LAME3.98r")
Apr 28 20:01:35 cookie mpd[43186]: mad: LAME peak found: 0
Apr 28 20:01:35 cookie mpd[43186]: mad: encoder delay is 576, encoder padding is 2076
Apr 28 20:01:35 cookie mpd[43186]: decoder: audio_format=44100:24:2, seekable=true
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] process command "currentsong"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] process command "idle"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 1
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] process command "status"
Apr 28 20:01:35 cookie mpd[43186]: output: opened "Pipewire Sound Server" (pipewire) audio_format=44100:24:2
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] process command "idle"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 1
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] process command "currentsong"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] process command "status"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] process command "idle"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 1
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] process command "currentsong"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] process command "status"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 0
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] process command "idle"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:35390] command returned 1
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] process command "status"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 0
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] process command "idle"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 1
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] process command "idle"
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 1
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] process command "readpicture \"192.168.0.11 (COOKIE)/Playlists/bg/Perfect Day\" 0"
Apr 28 20:01:35 cookie mpd[43186]: exception: Unrecognized URI
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] command returned 3
Apr 28 20:01:35 cookie mpd[43186]: client: [127.0.0.1:47698] process command "readpicture \"192.168.0.11 (COOKIE)/Playlists/bg/Perfect Day\" 0"
Apr 28 20:01:35 cookie mpd[43186]: exception: Unrecognized URI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions