INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Album art for video and audio items - which ones to pick?  (Read 1502 times)

doulos

  • World Citizen
  • ***
  • Posts: 148
Album art for video and audio items - which ones to pick?
« on: April 13, 2013, 04:29:43 am »

Hello,

I am trying to optimize the display of albumart images for video and audio items in my android app by picking low resolution images for lists and the highest available resolution for the details display. My algorithm first looks at the albumArtURI property, and if that is not found, goes through the attached resource items to find image resources.

I found with MC that audio items will carry 2 image items in the albumArtURI property, with the lower resolution at position 0 and the higher resolution image at position 1. However, with video items, this is exactly the other way round. There are also resource items referencing the same images, but without carrying any information about resolution and such.

I would really like to save myself the effort of having to download and decode the images to determine the size and resolution. I think this information is already available on the server, and DLNA provides the means of transferring it as well. As a second choice, I could also live with the albumArtURI property, if I could make safe assumptions about the positioning.

Can somebody tell me whether the above is a bug on MC's side, or what would be the best way to deal with this situation?

thanks,
chris
Logged
MediaSteersman - Your Media at Your Fingertips

bubbleguuum

  • Junior Woodchuck
  • **
  • Posts: 76
Re: Album art for video and audio items - which ones to pick?
« Reply #1 on: April 13, 2013, 07:20:24 am »

You can use the dlna:profileID attribute of albumArtURI element to get an estimate of the size of the album art:

Quote
<upnp:albumArtURI dlna:profileID="JPEG_TN">http://192.168.0.13:52100/CArt/1348.jpg</upnp:albumArtURI>
<upnp:albumArtURI dlna:profileID="JPEG_SM">http://192.168.0.13:52100/CArs/1348.jpg</upnp:albumArtURI>

JPEG_TN = thumbnail. size <= 160x160
JPEG_SM = small image. size <= 640x480.

See here for the list of JPEG_* and PNG_*  sizes:
http://gupnp-av.sourcearchive.com/documentation/0.4.1/gupnp-dlna_8c-source.html
Logged

doulos

  • World Citizen
  • ***
  • Posts: 148
Re: Album art for video and audio items - which ones to pick?
« Reply #2 on: April 13, 2013, 08:21:19 am »

ah, that sounds like useful information ;). Thanks.
Logged
MediaSteersman - Your Media at Your Fingertips
Pages: [1]   Go Up