Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Possible to add alternate cover format support? (Read 2985 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Possible to add alternate cover format support?

Right now, fb2k only seems to have support for good old jpeg, png, and gif covers. I'm looking into converting some of mine to AVIF, even though it's fairly new, but obviously foobar doesn't support that. Strange thing -- as soon as I put the file in the folder, foobar no longer shows the cover, only a blank placeholder, even though no *.avif is present in the cover list at all. That might be a bug.

But my real request is, is it possible to add new image format support through a plugin, like audio formats? I'd like to try making one (and I'd probably add HEIF if I ever make it public), I'm just not sure where to look for that API.

Re: Possible to add alternate cover format support?

Reply #1
It would be very nice to have the rating stars in the library next to the listed tracks, the same as on the right of playlist.  I think this way you could individually send tracks to the playlist based on rating.  I know you can probably do this in the properties dialog.  As I see it, right now you can't easily see the track rating until send and drag the album to the playlist. I can't say that I am an expert as the use of Foobar.

Re: Possible to add alternate cover format support?

Reply #2
It would be very nice to have the rating stars in the library next to the listed tracks, the same as on the right of playlist.  I think this way you could individually send tracks to the playlist based on rating.  I know you can probably do this in the properties dialog.  As I see it, right now you can't easily see the track rating until send and drag the album to the playlist. I can't say that I am an expert as the use of Foobar.

Why are you posting this on this topic?
TOS #5 violation? You don't just change topics to your liking.

Re: Possible to add alternate cover format support?

Reply #3
Any news on .avif support?

Re: Possible to add alternate cover format support?

Reply #4
I'm still curious about this and I'm willing to do the heavy lifting to tie it into libheif or libavif, there's just nothing I can find in the SDK pointing a way forward. WebP was quietly added to the core a few months ago, I don't know if that had ever even been requested? It's an OK alternative for now, even if it has even more limitations than jpeg.

Re: Possible to add alternate cover format support?

Reply #5
Columns UI supports HEIF/avif. I tested both just now. You'll need the extensions from the windows 10 store - not sure if it's possible on earlier version of windows. foobar2000 not supporting them isn't an issue because the SDK provides a chunk of data (album_art_data_ptr) and it's up to developers to decode the contents in to something usable. The CUI developer does this by using WIC (windows imaging component). Of course this means it's only available in the built in CUI playlist view/album art panel. The source code is on github if you fancy looking.

FWIW, having support built in to foobar2000 doesn't really add much unless you are desperate to use the default UI album art viewer. It doesn't magically enable support for other components. If they're not updated, they will be oblivious to any "core" support. For example SimPlaylist and Facets are massively popular DUI components but they were last updated 10 years ago. They'll never have support for exotic formats no matter what anyone else does. You would need the source code to update them and that isn't happening.



Re: Possible to add alternate cover format support?

Reply #6
Those comments are very helpful, I assumed it was a core service that each format might be handled or at worst overridden, not baked into each UI which then offers its own extension points or not. Now not surprising that nothing like it is found in the SDK.

I have the WIC hevc and just retested with heif, and it does seem to work, though I'm still having trouble with avif. Oh well, it's something, I'll see what I can do.

Re: Possible to add alternate cover format support?

Reply #7
You'll need AV1 video extension for avif.


Re: Possible to add alternate cover format support?

Reply #8
Coming back around to this, Foobar2000 only supports 8-bit formats, which is a major bug now that 10-bit is the standard for newer codecs, not the 8-bit of older codecs.

It took a while to narrow down why I couldn't see many AVIF files. Well, AVIF is usually 10-bit. I was able to transcode them into 8-bit, which massively increased the size, but that shouldn't be necessary. WIC can do 10-bit. If Foobar2000 uses WIC, there's no reason beyond a bit of coding to make 10-bit display, even if it's converted to 8-bit RGB. (Which is much higher fidelity than 8-bit YUV, the main reason to use 10-bit in a non-HDR environment.)

Re: Possible to add alternate cover format support?

Reply #9
As far as Columns UI goes, it's already set up to convert images to 32bpp, but I'm afraid WIC is giving it an inexplicable 'Not implemented' error when it tries to read the pixel data after the conversion.

A debugger is also showing this error:

Exception thrown at 0x7787B812 (KernelBase.dll) in foobar2000.exe: WinRT originate error - 0x80004001 : 'No scaler found for format'.

(Which is odd, as there's no scaling involved.)

I haven't been able to find a workaround, I'm afraid.

Also note that I found the WIC codec buggy when it comes to AVIF files using 4:2:2 or 4:4:4 chroma subsampling. (If the Windows Photo app can't display the image, then the problem is the codec.)
.

Re: Possible to add alternate cover format support?

Reply #10
Exception thrown at 0x7787B812 (KernelBase.dll) in foobar2000.exe: WinRT originate error - 0x80004001 : 'No scaler found for format'.

(Which is odd, as there's no scaling involved.)

I don't know about WIC specifically, but in DirectX everything is through a scaler and/or custom shader, whether it's color format conversions or bit depth conversion.

Also note that I found the WIC codec buggy when it comes to AVIF files using 4:2:2 or 4:4:4 chroma subsampling. (If the Windows Photo app can't display the image, then the problem is the codec.)
Oddly enough, I have no problem with 4:4:4 as long as it's 8-bit.

This whole reliance on what the OS giveth is why it'd be nice to incorporate something more cross-platform, since even various Windows versions can feel like a cross-platform nightmare!

Re: Possible to add alternate cover format support?

Reply #11
There is another option I can investigate actually. Let me see if it's any better...

BTW it does seem to be the HEIF extension doing the decoding here.

Edit: Correction, seems like both the HEIF and AV1 extensions are involved.
.

Re: Possible to add alternate cover format support?

Reply #12
10-bit 4:2:0 images work fine in Columns UI on every Windows 11 machine and VM I tried. The same versions of the HEIF and AV1 extensions are reported as are for my Windows 10 machine. Make of that what you will.

I also tried using the Windows Runtime API from a test 64-bit app on Windows 10 and got the exact same errors as from WIC, sadly.
.

Re: Possible to add alternate cover format support?

Reply #13
Oh no, now people will have to actually upgrade their OS to get new functionality. What a shocker.

Re: Possible to add alternate cover format support?

Reply #14
would have thought people using ffmpeg or smth to decode these image formats :/ whole dependancies just for picture/video formats.

Re: Possible to add alternate cover format support?

Reply #15
The bundled FFmpeg only handles audio formats. Handling lots of image formats increases its size considerably.

Re: Possible to add alternate cover format support?

Reply #16
Mostly because it statically bundles a ton of various image libraries. (And ImageMagick is an entire more painful kettle of fish.) I totally understand, whether it's Media Foundation or ffmpeg, it's so much simpler and less buggy to write for one API that's probably already in the OS instead of dozens of individual libraries'.

Re: Possible to add alternate cover format support?

Reply #17
I could allow for an external magick.exe to be provided and use that with standard input and output to decode the images. (Although, it just writes the input image to a temporary file, it seems.)

As for Windows 10, there is a feature update scheduled for H2 (though it remains to be seen what exactly it will include...)
.

Re: Possible to add alternate cover format support?

Reply #18
The 10-bit 4:2:0 AVIF image I was testing with miraculously starting working on my Windows 10 machine. I'm not sure what exactly triggered it, but I installed the KB5010415 preview update and it started working after a reboot. The AV1 extension also shows as having being updated today (the version is now 1.1.50332.0).
.