Kodi Community Forum
Rating in Wavpack - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Music Support (https://forum.kodi.tv/forumdisplay.php?fid=263)
+--- Thread: Rating in Wavpack (/showthread.php?tid=372112)



Rating in Wavpack - HeresJohnny - 2023-02-19

Specifically for my wavpacked .dsf files, rating tags don't seem to get picked up by Kodi.

I am always juggling between how rating is displayed in my main music player foobar2000 and in Kodi. Fb2k uses a 5 point rating overall and Kodi uses a 100 point rating for FLAC. For my FLAC files I have worked around this and copy the five point rating to a new tag "trackrating" and have set "rating" to their respective values of 20,40,60,80 and 100.

For my .wv files I have used the same tag system but somehow Kodi doesn't pick up ratings at all from this format. Is this a limitation of ffmpeg or do I need to fix my tags somehow?


RE: Rating in Wavpack - black_eagle - 2023-02-19

(2023-02-19, 09:18)HeresJohnny Wrote: Is this a limitation of ffmpeg

Absolutely.  See here for the tags FFmpeg supports. Sadly, rating is not one of them. Sad


RE: Rating in Wavpack - complexlogic - 2023-02-19

The relevant code section is here, and Kodi doesn't attempt to parse ratings tags for APE, only ID3 and Vorbis comment. This would be relatively easy to add though. How does Foobar2000 write APE ratings tags?


RE: Rating in Wavpack - black_eagle - 2023-02-19

(2023-02-19, 18:18)complexlogic Wrote: Kodi doesn't attempt to parse ratings tags for APE

Because rating is not in the APEv2 spec. https://wiki.hydrogenaud.io/index.php?title=APE_key


RE: Rating in Wavpack - HeresJohnny - 2023-02-19

Yep, the problem is that both apev2 tags and id3 tags would be valid tags for wavpack containers. To make matters more complicated, the packed files within the wavpack contain in case are .dsf files which were are definitely id3v2 tagged. I rewrote the tags later, so I guess in my case there are 2 "layers" of tags.

If Kodi could be make to read "POPM" id3v2 tags (1-5 rating, halfstars if - is used) in WAVPACK maybe I can get foobar2000 to rewrite that tag.


RE: Rating in Wavpack - black_eagle - 2023-02-20

The issue here is going to be that Kodi uses taglib for tag reading.  According to the source here, taglib only reads either ApeV2 or ID3v1 tags from wavpack files. Neither of those unfortunately have a rating tag.


RE: Rating in Wavpack - HeresJohnny - 2023-07-03

True. There's a very good overview here: https://wiki.hydrogenaud.io/index.php?title=Tag_Mapping

So what's needed is an add-on that would import the value of the string "rating" into the Kodi database - after it's been agreed upon what the rating scale would be. Oh boy...


RE: Rating in Wavpack - HeresJohnny - 2024-05-19

I'd like to revisit this to see if there isn't anything that could be done...

The DSD format within the WAVpacked files is .dsf which use ID3v2.3. The .wv files themselves are tagged with APEv2 tags.

Looking at taglib, it seems to be able to read from .wv 1) ID3v1 2) APEv2 and 3) stream tags:
Code:

* This is an implementation of WavPack metadata.
*
* This supports ID3v1 and APE (v1 and v2) style comments as well as reading stream
* properties from the file.

enum TagTypes {
//! Empty set. Matches no tag types.
NoTags = 0x0000,
//! Matches ID3v1 tags.
ID3v1 = 0x0001,
//! Matches APE tags.
APE = 0x0002,
//! Matches all tag types.
AllTags = 0xffff
};

Neither the ID3v1 nor the APEv2 specs have a standard field for RATING. That said, taglib might still be able to extract non-standard tags from an opened stream if I understand the code correctly.

A more helpful tool seems to be ffprobe which should also come with Kodi's ffmpeg implementation. Maybe this could replace taglib in the future?

In any case, since the RATING tag in .wv files is a non-standard field it's up to the devs to just read it into the database as is. The only thing necessary is a decision which rating scheme to use. I would be down with anything, be it 5,10 or 100 as long as Kodi will finally access that info.

Thanks again for your consideration!