I am extremely interested in seeing the patch merged. I use minidlna with BubbleUPnP. The covert art is tiny and looks terrible when BubbleUPnP scales it. I know it's against DLNA standards, but could there be an option to set the resize, or choose a different size? minidlna is a fantastic program.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've adjusted the patch to apply cleanly against 1.1.0, but the covers are still resized even with 'resize_covers=no'. The daemon also ends up running in the foreground when 'resize_covers' is present in minidlna.conf.
I can't figure out what is causing this. Any chance of a working patch against 1.1.0? I find this feature very useful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It works! Thank you very much. The only difference between your patch and mine is that you set 'NO_COVER_RESIZE_MASK' to '0x0020' and I set it to '0x0012'.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it possible to incorporate this into the pre-compiled release version? I use minidlna on my DD-WRT, but don't have a linux computer to compile on, nor the no-how. I'm sure others would enjoy/benefit from the option of no cover resizing. Great product - thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No problem. I was going to look at yours to make sure that we did the same thing, but you already removed it. I trust you'll let me know if there's any issue with how I did it. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It wasn't the same. I just fixed it so it would compile, but you also took into account the modifications to image_save_to_jpeg_file. So your patch is correct. ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem with not resizing the cover art is that 90% of the cases you actually want the JPEG_TN version of your thumbnail as you are browsing your media. Only when you open it do you want a bigger version. BubbleUPNP properly does this: while you are browsing it requests JPEG_TN, when you start playing the media it requests JPEG_SM (if available)*.
Anyways, I've implemented a better albumart resize over at https://github.com/Darkvater/minidlna/tree/multiple_sized_thumbnails
By default the albumart is copied to the cache directory and a thumbnail image saved. We do advertise JPEG_TN, JPEG_SM, JPEG_MED and when this is requested we just resize the original thumb on demand, saving the result for future use.
[*] XBMC (PLatinum UPNP) is of course totally bonckers and always requests JPEG_TN and expects full HD images which the XBMC client serves sigh. Why is DLNA such a mess?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Josh I've talked to Justin before somewhere in June I believe on some other unrelated changes (additional metadata) but although he was quite supportive, have not heard back from him. I think he is very busy. Oh well, maybe at some time in the future. It's on github for anyone who wants to play with it :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I commented out the following code in albumart.c a while ago, now I just noticed the cached album art is twice the size of the folder art? For example:
video.mp4
video.jpg
video.jpg is 320x180
video.jpg ends up being 640x360 in the minidlna cache directory?
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
Patch file
Last edit: Anonymous 2013-11-21
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
I get an error page (served with the wrong MIME type) when I try to download the patch. Is anyone able to access it?
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
I use BubbleUPnP renderer on an Android smartphone and the album art was too small without this patch.
Please merge this patch. Thanks.
I am extremely interested in seeing the patch merged. I use minidlna with BubbleUPnP. The covert art is tiny and looks terrible when BubbleUPnP scales it. I know it's against DLNA standards, but could there be an option to set the resize, or choose a different size? minidlna is a fantastic program.
I've adjusted the patch to apply cleanly against 1.1.0, but the covers are still resized even with 'resize_covers=no'. The daemon also ends up running in the foreground when 'resize_covers' is present in minidlna.conf.
I can't figure out what is causing this. Any chance of a working patch against 1.1.0? I find this feature very useful.
Here is an updated patch that I am using. I don't see either of the issues that you describe.
@Ian
It works! Thank you very much. The only difference between your patch and mine is that you set 'NO_COVER_RESIZE_MASK' to '0x0020' and I set it to '0x0012'.
Is it possible to incorporate this into the pre-compiled release version? I use minidlna on my DD-WRT, but don't have a linux computer to compile on, nor the no-how. I'm sure others would enjoy/benefit from the option of no cover resizing. Great product - thanks.
As far as I am aware, Justin has never commented on this patch/feature, so I have no idea what it would take to get it committed.
I've updated the patch for 1.1.2. I only adjusted the context for the added option, and matched the new way image_save_to_jpeg_file is called.
Updated patch against 1.1.2 to fix compile after commit 9eec5b8cac.
Edit: Patch removed.
Last edit: BT 2014-04-09
Oops. I just noticed that an updated patch against 1.1.2 has already posted been posted by Josh Stone.
Last edit: BT 2014-04-09
No problem. I was going to look at yours to make sure that we did the same thing, but you already removed it. I trust you'll let me know if there's any issue with how I did it. :)
It wasn't the same. I just fixed it so it would compile, but you also took into account the modifications to image_save_to_jpeg_file. So your patch is correct. ;)
Updated for 1.1.3
The problem with not resizing the cover art is that 90% of the cases you actually want the JPEG_TN version of your thumbnail as you are browsing your media. Only when you open it do you want a bigger version. BubbleUPNP properly does this: while you are browsing it requests JPEG_TN, when you start playing the media it requests JPEG_SM (if available)*.
Anyways, I've implemented a better albumart resize over at https://github.com/Darkvater/minidlna/tree/multiple_sized_thumbnails
By default the albumart is copied to the cache directory and a thumbnail image saved. We do advertise JPEG_TN, JPEG_SM, JPEG_MED and when this is requested we just resize the original thumb on demand, saving the result for future use.
[*] XBMC (PLatinum UPNP) is of course totally bonckers and always requests JPEG_TN and expects full HD images which the XBMC client serves sigh. Why is DLNA such a mess?
FWIW, my 1.1.3 patch applies fine to 1.1.4 -- just one hunk gets offset automatically.
@Darkvater, any discussion with Justin whether your approach might be merged?
@Josh I've talked to Justin before somewhere in June I believe on some other unrelated changes (additional metadata) but although he was quite supportive, have not heard back from him. I think he is very busy. Oh well, maybe at some time in the future. It's on github for anyone who wants to play with it :)
I commented out the following code in albumart.c a while ago, now I just noticed the cached album art is twice the size of the folder art? For example:
video.mp4
video.jpg
video.jpg is 320x180
video.jpg ends up being 640x360 in the minidlna cache directory?
if( imsrc->width > imsrc->height )
{
dstw = 160;
dsth = (imsrc->height<<8) / ((imsrc->width<<8)/160);
}
else
{
dstw = (imsrc->width<<8) / ((imsrc->height<<8)/160);
dsth = 160;
}
Found the fix to keep image size. Changed bolded number from 1 to 8 in albumart.c
Last edit: HPP8140 2015-02-02