Save star rating to file / read star rating from file
-
Ratings seem to be a weak point in metadata specification but most software has settled on 5 stars either full or half increments allowed.
Using Mixxx frequently as well as Strawberry. Mixxx can read ratings from file tags and it also can save ratings to files.
However in Starberry I see neither option for a single track. And if I write a rating to a track in Mixxx it seems, even after re-scanning songs in Strawberry, the rating is not found or updated.
-
I stand corrected Mixxx is still lacking writing capabilities. Still unsure what the status for writing / reading ratings for Starberry is however.
-
@jonas thanks so much for working on this. It is a much desired feature of mine I have been waiting for for a long time. So seeing action on this gets me excited.
With https://github.com/strawberrymusicplayer/strawberry/issues/259 closed and https://github.com/strawberrymusicplayer/strawberry/commit/3ab86543adb8b6defb47349ec4680a309e111b79 merged I was wondering what the current state is.
Enabled both settings in Preferences > Collection > Song Playcounts and ratings. Clicked the save now button and checked some files tags.
- Does Strawberry automatically save new ratings to files now automatically or is this only possible via the save now button in preferences?
- when opening a file I saved a rating to in Metadatics (metadata editor for macOS) I see diffferent values, e.g. for a file with 5 star rating I see value
,192,11
while for another file with also a five star rating the rating value is,255,2
. Is that expected?
-
- It will save ratings to tags when the option is enabled in the collection settings. It won't save the current ratings to tags, so you might want to sync the current with the button if you want all current ratings also saved in tags.
- Not sure, it's probably rounded to 5 stars?
-
@jonas Not sure I understand answer re: 2. I would either expect value 1-10 where value 3 would represent 1,5 stars and value 5 2,5 stars etc or 1-5 where 1,5 would represend 1,5 stars and 2,5 would represent 2,5 stars. But apparently this is not how this works.
Sadly I have no second software to verify the current values are read correctly.
-
@threearmedcow
The rating in Strawberry is from 0.0 to 1.0. A half star is 0.1. So 5 stars would be 1.0.There are no standardized tags for rating. How the rating are saved to tags depends on the audio file format and the software.
One software can behave one way, and another can behave very differently when it comes to ratings. Another software might use an entirely different tag, and save ratings differently.
So comparing software to see if the rating of stars is read correctly don't always expect to see the same result.However, when I see you mention some numbers with "192" and "255" I'm only guessing that it could be the POPM tag popularimeter frame for ID3v2 which are not really ratings, but commonly used to store ratings. These are saved by Strawberry too but converted from the rating, 192 should be converted to 0.8 (4 stars), 255 should be 5 stars.
I think it's mostly the same as described by wikipedia. See: https://en.wikipedia.org/wiki/ID3#ID3v2_star_rating_tag_issue
Another software might convert these differently though. So might treat both 192 and 255 as 5 stars. But it's hard for me to answer for another software I have no knowledge of. And you don't even mention what audio file format it is. If you saved the rating with strawberry for both files, I'm not really sure how they could be saved with different values.
Other formats that use Vorbis comments uses very different tags, does not have standardized ratings tag either, and no POPM tag.For MP3 ID3v2 Strawberry saves a "FMPS_Rating" with the 0.0-1.0 rating too.
I found that Strawberry was writing the FMPS_Rating for MP3 but not reading it back, so it was always converting the POPM tag. Should be fixed now, so if the FMPS_Rating frame exists, it will use that instead of the POPM for rating, which will be more accurate for use in Strawberry. But the database rating will take priority, so if a rating exists in the database for the song, it won't re-read it from the tags.