Thumbnails over UPnP: possible or not?
#1
Question 
Hi,

First of all, I'm new to XBMC, but I'm mightily impressed with it: it works out of the box with the DLNA server on my Synology NAS, and with my dreambox, so finally 1 tool for all my viewing needs!

One thing I don't seem to be able to get working (and I'm confused about whether it's actually supposed to work), is getting thumbnails for video files from my UPnP server to show in XBMC.
Placing the files locally and using folder.jpg or *.tbn works perfectly, but not over UPnP.
My Synology NAS has the option to set files with specific names as music/video cover (like cover.jpg or folder.jpg). I tried that but it doesn't work.

I've googled till I was blue in the face on this issue, but I didn't seem to find a definitive answer for it:
  • Is it technically possible? (I guess so, since my NAS has an option like that)
  • Is it supposed to work in the current XBMC version, if so: how? Is my NAS at fault maybe?
  • If not, how can it be made to work: a scraper, a plugin, a script...

I'm a bit of a programmer too, so I'm willing to try something out, if someone can point me in the right direction.

Any help, suggestions or opinions appreciated!

I'm using Win7 x64, BTW
Reply
#2
First off, uPnP shares media not files, so even if you have the folder.png in the folder doesn't mean it shares it.

For example the uPnP server shares the movie X with metadata that it has thumbnail Y, i.e. we have no control over checking if folder.png resides in the folder of X as we don't know the location. So its essentially up to your uPnP server to set thumbnail metadata.

I'm not sure if we do support that in normal uPnP as I don't really use it that much but if we do I'm guessing your uPnP server does not set the correct metadata, it may set the thumbnail but calling it something else so without the hardware its hard to tell.

Cheers,
Tobias
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#3
Thanks for the quick reply!

What metadata should be set to be correct? I'll wireshark the communication and see what I can find out: I'm new to UPnP traffic, so any tips on wiresharking UPnP traffic?
Reply
#4
Out of curiosity why use UPnP over SMB, Synology NAS are usually very fast when it comes to SMB so it should be enough.

XBMC can scrape UPnP sources for coverart as long as the file name is exposed by the UPnP server in the media path. However Synology do not do this and assign a number instead to the media file like 2079.mkv, Synology's own built in DLNA cover art system works with the Playstation 3 which was the target platform for that feature, other UPnP/DLNA clients may work but I've never heard of any.
Reply
#5
I've had quite some bad experiences with playing video from SMB shares (stuttering, slowness) before, and the content I'm trying to view is in Full HD. So far, using UPnP was very fast.
I just tried with SMB to my NAS, and indeed, it is faster than I anticipated, but still slow enough to irritate me, especially now that I know it can go faster ;-)
And, as expected, thumbnails work over SMB, so I might stick to that for the moment.

Still, out of 'scientific interest' I'm still wondering if there is no elegant way to make it work. Of course, if Synology is indeed just using 'random' numbers, than it might not be feasible to do it automatically. I was thinking along the lines of exposing the thumbnails separately as pictures, and then somehow assigning that folder as a 'thumbnail path' or something, but that won't work if the filenames aren't exposed...
Reply
#6
Ok I think I explained myself a bit bad. uPnP server for exampe says to a client, hey I have a video object with these properties:
title = Starwars
rating = 5
file = 29393.mkv
thumbnail = 123213.png

So as you see the file has little to do with the rest, its just an ID and we could do the lookup on the title instead.

So if you can list all the properties the Synology sets I'm sure we could take a look at implementing them, afaik none on have a synology NAS and can't really try this.

If you want to check what it sets I'd recommend confluence server (need to write code to get the data out) and you can probably do it via wireshark but I bet the protocol is quite complex.

Cheers,
Tobias
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#7
What do you mean SMB is slow even a 100Mbps network is fast enough for full 1080p ?
Reply
#8
I think thumbnail support is more down to support in the UPnP server, as opposed to in XBMC.

I remember I used both MiniDLNA and Mediatomb and I recall XBMC displaying thumbnails for both (though with Mediatomb you have to build thumbnail support from source via ffmpegthumnailer depending on the version installed).

So, check what your Synology can provide first. Try browsing the server in some other clients: PS3, Xbox360 and I think Windows Media Centre can browse UPnP shares as well, as well as VLC media player (don't quote me on that) and see if they show thumbnails.

And in relation to why use UPnP at all instead of SMB, this is my issue. I want a unified place to store playcounts, not limited to the XBMC library, but that can be accessed by a variety of clients. Using SMB essentially compartmentlises that info to the XBMC library (I know you can share the library via MySQL, but that is sill a failry new feature and is restricted to XBMC). The same applies to UPnP actually, in that I have found no UPnP server that tracks playcount. The only server that does is mt-daap, a DAAP server, but support for that in XBMC is currently borked (when importing to the library, though I have a thread about that and am trying to help get it fixed).

I am frankly amazed that by now, with MP3 being around +10 years, there is still no standard music server format, that unifies playcount / history / album art in once place....a potential niche for XBMC I feel, whic makes me sad they are pushing to be a front end device and not a compelte frontend backend system. I am kinda surprised playcount it isn't stored within the ID3 tags, but it seems for some reason that still doesn't happen.

[/end_opinion_piece]
Reply
#9
I wasn't on a 100Mbps wired connection when I tried SMB before, but on a wireless G, which was then connected over a max 85Mbps homeplug connection to my router to which the Synology was connected.
And even over 100MBps, I still feel that starting a video goes smoother over UPnP than over SMB, but maybe that's coincidence, as I didn't do a real conclusive side-by-side test.

I think I'm starting to get the picture what the Synology NAS is doing.
It allows you to add a 'folder.jpg' to a folder to use as a thumbnail, but it doesn't mean the same as for XBMC. For the NAS, it means a thumbnails for all the files in the folder, and not for the folder itself, so this only makes sense for MP3 collections to have the same album art for each song in the album.

I have this folder structure:
Code:
+ video
| + test
  | + After Party
    | - folder.jpg
    | - after_party_hd.mov
Browsing to the 'test' directory gives me this answer:
Code:
<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:sec="http://www.sec.co.kr/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">
- <container id="33/770" parentID="33/769" restricted="1">
  <dc:title>After Party</dc:title>
  <upnp:class>object.container.storageFolder</upnp:class>
  </container>
  </DIDL-Lite>
so no mention of a thumbnail here

browsing to the 'After Party' dir, I get
Code:
<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:sec="http://www.sec.co.kr/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">
- <item id="33/@944" parentID="33/770" restricted="1">
  <dc:title>after_party_hd</dc:title>
  <upnp:class>object.item.videoItem</upnp:class>
  <dc:date>2011-04-16T05:30:38</dc:date>
  <res protocolInfo="http-get:*:video/quicktime:DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000000" resolution="1920x1080" size="371384522" bitrate="594278" duration="00:10:24.000" nrAudioChannels="2" sampleFrequency="48000">http://192.168.2.4:50002/v/NDLNA/944.mov</res>
  <res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_FLAGS=00f00000000000000000000000000000">http://192.168.2.4:50002/transcoder/jpegtnscaler.cgi/vfolderart/944.jpg</res>
  </item>
  </DIDL-Lite>
In which case you have the 2 'res' tags mentioning the .mov and the .jpg both with the name 944, but XBMC still displays the default icon.

So apparently, the synology won't let me have my way anyway (which is assign a thumbnail to 1 video or to a folder itself), so I'll post something on their forum for changes on their side. With the current state of affairs, XBMC can't fix it anyway, it seems...

Thanks for listening in any case!
Reply

Logout Mark Read Team Forum Stats Members Help
Thumbnails over UPnP: possible or not?0