Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: awesomunia on February 23, 2021, 11:13:26 PM

Title: RockBox album art support
Post by: awesomunia on February 23, 2021, 11:13:26 PM
The current RockBox does not seem to allow uppercase cases with extensions.
e.g. cover.BMP
Furthermore, since the supported extensions are only jpg and bmp, please support png as well.
Some Japanese mp3 stores have png format album art, so there should be demand.
The cover art I have set is
cover.PNG.
I would like to support png and upper cases such as PNG.
Is there a problem that the png format cannot be supported?
Title: Re: RockBox album art support
Post by: saratoga on February 24, 2021, 08:34:58 AM
PNG is hard to support since it needs a lot of memory and CPU to decode.

I'm surprised about capitalization. If that is true that should be very simple to correct.
Title: Re: RockBox album art support
Post by: awesomunia on February 24, 2021, 10:58:46 AM
From the forums, I found that the image viewer supports png.
Doesn't it support artwork png even if it is a user option?

Only the PNG format of music art purchased from the store needs to support uppercase letters.
I don't know if this is in demand for bmp and jpg.
However, if you edit the tag of the purchased music data directly, the error will be displayed only locally in the purchase history of the store.
I think it's appropriate to let RockBox handle it.
Title: Re: RockBox album art support
Post by: johnb on February 24, 2021, 01:09:51 PM
saratoga, the Linux targets are case sensitive, e.g. Folder.jpg doesn't work, folder.jpg does.
Title: Re: RockBox album art support
Post by: saratoga on February 24, 2021, 10:44:20 PM
If its specific to those devices I don't have any way to test, but I think you could edit try_exts() to check the uppercase versions of the file extensions too:

https://git.rockbox.org/cgit/rockbox.git/tree/apps/recorder/albumart.c

Title: Re: RockBox album art support
Post by: awesomunia on February 24, 2021, 11:50:52 PM
Does this question reach the evaluation of task validity directly between developers in the discussions in this forum?  Or should I register with tracker?
Title: Re: RockBox album art support
Post by: bluebrother on February 25, 2021, 07:09:52 AM
From the forums, I found that the image viewer supports png.
Doesn't it support artwork png even if it is a user option?

The image viewer is a plugin, which has more resources available (since plugins don't necessarily support playback at the same time.) So what saratoga said still stands.

Quote
Only the PNG format of music art purchased from the store needs to support uppercase letters.

How is Rockbox supposed to know if music art was purchased from some store?

If its specific to those devices I don't have any way to test, but I think you could edit try_exts() to check the uppercase versions of the file extensions too:

Maybe it would be better to make Rockbox treat the filesystem as case insensitive? (No idea how much that depends on the underlying Linux system) I wouldn't be surprised if that could cause issues with playlists too, since not all OSes consider filesystems to be case sensitive.
Title: Re: RockBox album art support
Post by: awesomunia on February 25, 2021, 12:13:42 PM
Why does RockBox only support jpg, jpeg and bmp formats?
In particular, jpeg and jpg have the same format, but I would like to know the reason why they support writing conventions but do not support other formats at all.
Title: Re: RockBox album art support
Post by: saratoga on February 25, 2021, 12:36:23 PM
PNG is impractical.  What other formats are you looking for?
Title: Re: RockBox album art support
Post by: bluebrother on February 25, 2021, 04:47:47 PM
Why does RockBox only support jpg, jpeg and bmp formats?

Rockbox is running on systems with very limited resources. Some things are simply not feasible. Just to put things into perspective, the Ipods (before the 6G) run at 80MHz. Compare that to your multi-GHz desktop PC.

And last, someone has to do the work. Aside from technical details nobody did it so far. Feel free to step up ...
Title: Re: RockBox album art support
Post by: Frankenpod on February 25, 2021, 05:11:05 PM
Why does RockBox only support jpg, jpeg and bmp formats?
In particular, jpeg and jpg have the same format, but I would like to know the reason why they support writing conventions but do not support other formats at all.

I used some utility to bulk-extract all the embedded art from my music collection, then another utility to mass convert any pngs to jpg, and then the first to re-embed the jpgs.  Fixed the problem once-and-for-all for me.  I think for me it was only iTunes that put .pngs in things, and I no longer use iTunes.

Changing case of extensions could probably be done en-mass with a script as well.
Title: Re: RockBox album art support
Post by: awesomunia on February 25, 2021, 06:39:42 PM
iPod supports cover art in png format from photo.
RockBox is a great project to extend past players, but it has the negative effect of degenerating relatively new generations of devices in return for supporting all generations.
Will RockBox continue to not support png?
Title: Re: RockBox album art support
Post by: awesomunia on February 25, 2021, 06:40:35 PM
Also, jpg is a lightweight format, but why does it support bmp?
Title: Re: RockBox album art support
Post by: saratoga on February 25, 2021, 08:26:58 PM
RockBox is a great project to extend past players, but it has the negative effect of degenerating relatively new generations of devices in return for supporting all generations.
Will RockBox continue to not support png?

It is not about the supporting old hardware, but rather that your hardware is too old to practically support complex formats like PNG for album art.  Buy an iPhone if you want that, they have GBs of memory for that reason.

Also, jpg is a lightweight format, but why does it support bmp?

BMP is even more simple than JPG. 
Title: Re: RockBox album art support
Post by: bluebrother on February 26, 2021, 01:44:36 AM
iPod supports cover art in png format from photo.

How do you back this claim? Apple requires you to use Itunes to sync music to your player, and Itunes is known to do things like creating a database file with all tags which is then used by the Ipod to read the tags instead of getting them from the files. Haven't checked this but I'm pretty confident it puts cover files there as well. And since it does some preprocessing anyway, it can also convert the cover files to a different format without you even noticing. It can even go as far as rescaling them to the size the Ipod can display best, offloading all this to the PC. Rockbox does that all on the player and doesn't require you to use some special software to put files on the player.

Again, just compare the processing power of the Ipod with your multi-GHz PC.
Title: Re: RockBox album art support
Post by: awesomunia on February 28, 2021, 12:00:24 AM
Thank you for the interesting commentary.

I really like the LCD of the iPod mini being able to display album art.
Even if it can be displayed on the latest iPhone, I don't think it feels great.

Sure, single-core machines are slower than today's multi-core PCs, but you can finally get the results.

I asked for a vote on the RedditRockBox bulletin board.
I'm purely interested in how much users want png support.

https://www.reddit.com/r/rockbox/comments/ltrob3/do_you_want_to_display_album_art_in_png_format
Title: Re: RockBox album art support
Post by: Frankenpod on February 28, 2021, 01:26:04 AM
Thank you for the interesting commentary.

I really like the LCD of the iPod mini being able to display album art.
Even if it can be displayed on the latest iPhone, I don't think it feels great.

Sure, single-core machines are slower than today's multi-core PCs, but you can finally get the results.

I asked for a vote on the RedditRockBox bulletin board.
I'm purely interested in how much users want png support.

https://www.reddit.com/r/rockbox/comments/ltrob3/do_you_want_to_display_album_art_in_png_format

I don't know that it matters how much users want it, the issue, as I understand it (I think I asked about it myself a long time ago) is that it's not really possible, because, as explained in this thread, it requires more computational power (and RAM?) than standalone DAPs have.  If it can't be done, it doesn't matter how much people want it.  I still don't really understand why you can't just convert all your embedded art to jpg and be done with it.

Title: Re: RockBox album art support
Post by: awesomunia on February 28, 2021, 02:06:26 AM
Have you seen "impossible" on all supported devices?  The latest version of RockBox also supports the 6th generation ipod, and the device is evolving.  Then I'm just wondering how much the user wants, I don't claim it's important.
Title: Re: RockBox album art support
Post by: awesomunia on February 28, 2021, 02:10:22 AM
Also, it's easy to convert to jpg, but that means modifying the original you purchased.  Rockbox isn't the only time itunes users listen to music.  I think we should increase rockbox support if compatibility is important.  Also, I haven't received a clear response to asking many questions.  Does RockBox permanently not support png?
Title: Re: RockBox album art support
Post by: bluebrother on February 28, 2021, 02:46:22 AM
I really like the LCD of the iPod mini being able to display album art.

I have an Ipod Mini. Being able to display album art on it is kinda cool, but pretty useless due to the limited palette (2 bit plus dithering on a rather small resolution gives you rectangle with something remotely resembling the album art at most but not more.)

I asked for a vote on the RedditRockBox bulletin board.
I'm purely interested in how much users want png support.

It doesn't matter.

Rockbox is not a product people are getting paid to work on. People work on it in their spare time, and the times we had like 20 active developers are long gone. So unless you're the developer trying to figure what to work on next it won't make a difference. There are tons of feature request we had over the years that nobody implemented simply because nobody was interested enough. It took years until we even got album art support in the first place.

Also, it's easy to convert to jpg, but that means modifying the original you purchased.

No it does not. You can easily save the files separately. No need to modify anything. You can even store the files in a separate location (see the manual on where / how Rockbox looks for album art.)
Title: Re: RockBox album art support
Post by: awesomunia on February 28, 2021, 04:07:20 AM
Thank you, Blue Brother

I think the answer was convincing.

When I was in elementary school, the iPod touch was already on sale.
The iPod, which can only play music, wasn't a prominent product at the time, but I was interested in videos about the recent YouTuber iPod.

And recently I bought an iPod mini.
And I got to know RockBox.
It's not very practical, but I'm very happy to see it on the LCD even if the cover art of my favorite artist isn't clear.
This is similar to the excitement of watching a recent show on black and white TV.

Attempts to save the art to a directory once using the suggested method.

However, I haven't given up on getting interested users like me to implement this feature.

Wait patiently.
If you like, check out the survey I created to kill time.
Title: Re: RockBox album art support
Post by: chris_s on February 28, 2021, 06:23:23 PM
Even if all of your artwork is in the proper format already, in my experience their resolution is often much too high for Rockbox (at least on older devices) to speedily display. Recent Bandcamp purchases of mine came with JPGs that were a few MBs large I think.

For Rockbox on b&w iPods, I usually remove all embedded art from the files after adding a folder.jpg of the original album artwork (for other software to use when I have the iPod connected to my computer) and then create a second file resized to a maximum height of 128 pixels from it, whose name I set to the title of the album. That works out perfectly considering the order Rockbox uses when looking for a picture (albumtitle.jpg is prioritized over folder.jpg), as mentioned by bluebrother (https://download.rockbox.org/daily/manual/rockbox-ipod4g/rockbox-buildap3.html#x19-392000C).
Title: Re: RockBox album art support
Post by: Bilgus on March 01, 2021, 10:52:18 AM
Re PNG images and even the capitalized file names I suppose
The lua plugin is ideal for these requests

The script side of this can be done on device with the lua plugin

I've already included code in the examples to decode and encode jpeg images
it would be less work and more extensible than changing Rockbox to suit these
requests

Title: Re: RockBox album art support
Post by: awesomunia on March 02, 2021, 07:31:55 AM
Bilgus
I definitely want to see it.
I would like to see if I can convert that script for png!
Title: Re: RockBox album art support
Post by: Bilgus on March 03, 2021, 02:04:12 PM
oh sorry I meant encode bmp images not that jpeg is any less possible

the script that uses it is under .rockbox/rocks/demos/lua_scripts/rlimg.lua

and the source file for the bmp encoder is .rockbox/rocks/viewers/lua/image_save.lua
Title: Re: RockBox album art support
Post by: awesomunia on March 09, 2021, 09:38:14 AM
Thank you, Bilgus.
I will try to create an extension with reference to the source!