I have a Bravia 5500 and 2010 series Sony Bluray player (BDP-S370). I code VBscript in my work, including some stuff that modifies XML so I was quite curious to learn more about PS3MS. So, I've read the Java primer over at Java.com and I've rolled my sleeves up and dived in...

I noticed that Windows Media Player is able to display thumbnails on the BDP-S370 for photos. PS3MS does not show thumbnails for anything on this renderer. I compared wireshark traces of this to PS3MS and I see that Windows Media offers up several sizes of image: JPEG_LRG JPEG_MED JPEG_SM JPEG_TN (example here). It advertises the resolution of each and presumably the server scales the image by reading the parameters POSTed to the URL (identical in each case). Since WMP seems to have excellent compatibility, emulating its behaviour as far as possible would seem like a good idea. I gather that some renders may choose to use the JPEG_MED or JPEG_SM images as thumbnails for instance.

I spent some time looking at the source and I discovered the hack for the condition isBravia()=true in net/pms/dnla/DNLAResource.java. I can see in the source comments that Shagrath was aiming to remove these hacks so I created a new boolean value in the renderer conf called ForceJPGThumbnails (modifying net/pms/configuration/RendererConfiguration.java and net/pms/dlna/DLNAResource.java). Setting this to true gets thumbnails to work for Web image feeds, though they don't fill the available icon size like WMP's thumbnails do.

I carried on, hoping to find some thumbnail size code. Then I discovered that in net/pms/dlna/FeedItem.java the RSS feed's own image thumbnail is used, hence there is no specified size.

Finally I noticed a comment in the code that image thumbnail support is disabled for physical photo files (not yet coded - see line 423 of net/pms/dlna/RealFile.java).

So my question is, before I potentially spend a substantial amount of time trying to implement an image scaler and learning Java (this method seems a likely fit) is there some very good reason nobody implemented this yet? By my logic image thumbnails are much more important than, say, video thumbnails. The filename of a video file is often very descriptive and the thumbnail has almost no chance of being representative, whereas for a photo it's much more useful.

Last edited by patters on Wed Sep 08, 2010 9:16 am, edited 1 time in total.

@Override protected String getThumbnailURL() {- if (getType() == Format.IMAGE) // no thumbnail support for now for real based disk images- return null;+// if (getType() == Format.IMAGE) // no thumbnail support for now for real based disk images+// return null; StringBuffer sb = new StringBuffer(); sb.append(PMS.get().getServer().getURL()); sb.append("/");

Thanks tomeko. I've applied that by hand but it doesn't work at the moment. In Windows I think the command line fed to convert.exe is probably wrong because no thumbnail is produced. If I look at debug.log and manually create the thumbnail by running the command line taken from there (quoting long filenames) it does produce it. But then if I browse the folder on either my Sony Bluray or Sony Bravia renderers nothing is displayed, despite the corresponding JPG thumbnail being present in the temp imagemagick_thumbs folder.

I should be able to fix it from here though, because I captured some nice example XML of how Windows Media Player offers up the resources. I think Sony devices might be more fussy about the exact res of the thumbs too.

Had a look this morning and I don't really understand - even though I have mplayer thumbs enabled I don't see any being created either on the PC in %TEMP%\javaps3media\mplayer_thumbs during successful thumbnail display on a Bravia renderer. Are they deleted the moment they are requested?

Last edited by patters on Sat Sep 11, 2010 1:09 pm, edited 1 time in total.

Yes, I saw that path. I was comparing the mplayer_thumbs behaviour since I know those work for the Bravia TV renderer. But I never see those being created, even if I browse a folder up on the TV, and at the same time refresh the temporary mplayer_thumbs or imagemagick_thumbs folders. So are you saying I should comment out those lines for my tests?

I've done some more troubleshooting, commenting those two lines you highlighted. It's definitely creating the thumbnail files in imagemagick_thumbs correctly, and I have verified that the SOAP XML is correct - for example:

I can see that the imagemagick thumbnail code is basically the same as the mplayer thumb code, but mplayer thumbs work for me. I also tried changing the size of the thumbnail to "160x120!" which forces it to disregard aspect ratio (since Windows Media Player sizes them at 160x120) but this still does not work for me. Any ideas why not? On both a Bravia TV and a Sony Bluray player I see the icon showing that the thumbnail is being read for a second, then I get the generic blank thumbnail.

@Override protected String getThumbnailURL() {- if (getType() == Format.IMAGE) // no thumbnail support for now for real based disk images- return null;+// if (getType() == Format.IMAGE) // no thumbnail support for now for real based disk images+// return null; StringBuffer sb = new StringBuffer(); sb.append(PMS.get().getServer().getURL()); sb.append("/");

I'm afraid it still doesn't work for me. Which Bravia do you have tomeko? And is this patch against r409 or r410? It seemed when I applied it by hand that the line numbers were out for one of the files (with r410).