# Writing RATING tag

**URL:** <https://discourse.beets.io/t/writing-rating-tag/2366>\
**Category:** Help\
**Created:** [July 7, 2023, 10:14am UTC](https://discourse.beets.io/t/writing-rating-tag/2366 "2023-07-07T10:14:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pyyhttu](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@pyyhttu](https://discourse.beets.io/u/pyyhttu)\
**Post date:** [July 7, 2023, 10:14am UTC](https://discourse.beets.io/t/writing-rating-tag/2366/1 "2023-07-07T10:14:05Z")

</div>

I’m trying to get beets to write `RATING` tag to files, as [that tag](https://neutroncode.com/forum/viewtopic.php?f=4&t=99&p=5567&hilit=rating+tag&sid=2a87f85b7e26ed02f14250ea7ac77c5d#p5567) (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`

```auto
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:

```auto
$ 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:

```auto
beet info --library revisions anyone human | grep RATING
RATING: 60

```

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](https://pyyhttu.kapsi.fi/debian/beets/config.yaml)

---

<div class="post-metadata">

**Author:** ![jojo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/jojo/32/709_2.png) [@jojo](https://discourse.beets.io/u/jojo)\
**Post date:** [July 11, 2023, 5:50am UTC](https://discourse.beets.io/t/writing-rating-tag/2366/2 "2023-07-11T05:50:12Z")

</div>

The underlying library that writes tags to files is [GitHub - beetbox/mediafile: elegant audio file tagging](https://github.com/beetbox/mediafile.git). 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?

---

<div class="post-metadata">

**Author:** ![pyyhttu](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@pyyhttu](https://discourse.beets.io/u/pyyhttu)\
**Post date:** [July 11, 2023, 1:05pm UTC](https://discourse.beets.io/t/writing-rating-tag/2366/3 "2023-07-11T13:05:27Z")

</div>

> 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](https://github.com/beetbox/beets/issues/2530#issuecomment-298406700)

From another comment here: [Is there a column for "rating" - #13 by ohrenkino - Support - Mp3tag Community](https://community.mp3tag.de/t/is-there-a-column-for-rating/48140/13) 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?

---

<div class="post-metadata">

**Author:** ![pyyhttu](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@pyyhttu](https://discourse.beets.io/u/pyyhttu)\
**Post date:** [July 12, 2023, 12:04pm UTC](https://discourse.beets.io/t/writing-rating-tag/2366/4 "2023-07-12T12:04:24Z")

</div>

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](https://www.xiph.org/vorbis/doc/v-comment.html) of Ogg Vorbis, according to [Wikipedia article](https://en.wikipedia.org/wiki/Vorbis_comment):

> 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](https://github.com/beetbox/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.

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [July 12, 2023, 6:14pm UTC](https://discourse.beets.io/t/writing-rating-tag/2366/5 "2023-07-12T18:14:45Z")

</div>

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.
