Writing RATING tag

I’m trying to get beets to write RATING tag to files, as that tag (Vorbis) happens to be the one Neutron music player supports when displaying ratings in it.

I tested the tag and Neutron, and it displays it fine if I write the tag like so:

metaflac --set-tag=RATING="80" 01-01\ Alien\ Angel.flac

metaflac --list 01-01\ Alien\ Angel.flac

 comment[38]: RATING=80
METADATA block #3
  type: 1 (PADDING)
  is last: true
  length: 29230

All my files are in flac.

However, when I try to write the tag with beets, Neutron does not display the ratings. So far I’ve done:

$ beet modify revisions anyone human RATING=60
Modifying 1 items.
3 - Revisions - Anyone Human
  RATING: 60
Really modify, move and write tags? (Yes/no/select) y

At this point, the results are only there in the beets database/library as expected:

beet info --library revisions anyone human | grep RATING

So I try to write the database changes into the file’s tag by doing:

$ beet write

But inspecting the file (metaflac --list), and testing in Neutron, the tag is not written.

How can I write RATING tag using beets?

My config is: https://pyyhttu.kapsi.fi/debian/beets/config.yaml

The underlying library that writes tags to files is GitHub - beetbox/mediafile: elegant audio file tagging. Most probably the reason is, it doesn’t support a tag named RATING. Usually supporting a new tag in mediafile is easily added via a PR to that repo as long there is good reason to do so. A good reason would be that a tag named RATING is used be several pieces of software and not only by Neutron music player. Maybe do some research what other software uses for a RATING tag?

Maybe do some research what other software uses for a RATING tag?

Thank you. I did some more digging, and seems to be that every player out there has their own way of reading and writing ratings, because ratings as such does not have a standard, more like a pseudo standard as evident from Adrian’s comment here: Rating metadata tags · Issue #2530 · beetbox/beets · GitHub

From another comment here: Is there a column for "rating" - #13 by ohrenkino - Support - Mp3tag Community it seems that: “The field should be %popularimeter% - RATING is a user-defined field that probably no player reads.”

So I may be approaching this all wrong. Which begs the question, that what should be the “standard” tag the players should strive for, and consequently Neutron should then support for ratings?

Answering my own question here. Tested by tagging my songs with different specifications (ID3, APE and Vorbis comments) for ratings and Neutron player seems to be supporting only the Vorbis RATING.

But boy, if this is confusing: While it seems to be that RATING is not in the specification of Ogg Vorbis, according to Wikipedia article:

Most applications also support common de facto standards, such as DISCNUMBER, RATING, and tags for ReplayGain information. Ratings are usually mapped as 1-5 stars with 20,40,60,80,100 as the actual string values.

So, if that is now standard enough, and @adrian is willing to implement that to mediafile.git, I’d be grateful.

Maybe do some research what other software uses for a RATING tag?

If this will make a difference in building a business case, I can start doing that and list ios & android apps in here that utilize this de facto standard.

Yep, this seems like an appropriate addition to MediaFile! The main thing this would require is collecting some research on how different tools implement this tag so we can maximize compatibility with them.