After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670156 - tags: id3v2 POPM support
tags: id3v2 POPM support
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-15 18:12 UTC by Jojo Man
Modified: 2018-11-03 11:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jojo Man 2012-02-15 18:12:27 UTC
I have spent a great deal of time rating my mp3 files and writing those ratings
using the program "Media Money" to the id3 tag (under POPM field). It would be
really nice if i was able to import those ratings. Currently I only know of open source player XBMC which supports reading the POPM field. I had filed a bug on rhythmbox earlier but they recommended i file a bug for gstreamer instead so here it is.


Some information regarding how XBMC supports/handles POPM:
http://wiki.xbmc.org/?title=Preparing_your_Music#Ratings_in_ID3_tags

More Info Regarding Mp3 Rating Support in id3:
http://www.id3.org/id3v2.3.0#head-2452ec9cf8b42c5c117b518b69e129ff67970852

rhythmbox bug# 666476
Comment 1 Tim-Philipp Müller 2012-02-18 13:41:36 UTC
Moving this to -base for now.

I think the main problem is how to extract/present the information in those tags properly to the app, because there are multiple fields, we might need to add a dedicated structure or so, which is something we haven't done so far.

One would also need to investigate how this is represented in other tagging schemes, so there can be one generic tag for them all (if that's possible).
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2012-03-04 21:04:07 UTC
Jojo, just to be clear, this feature is probably not so hard to implement, but needs research. Thus if you could help on that, that'd be great.
Comment 3 Jojo Man 2012-03-04 21:27:11 UTC
Above, i have provided the link to how XBMC handles the values and represents this field to the user. It is the same as how mediamonkey handles it (according to wiki). I believe gstreamer should also present this field to applications in the same manner (as XBMC) so there is rating consistency across gstreamer based apps and among mediamonkey/xbmc/WMP etc users. To further clarify either solely or in addition to the value of the POPM field gstreamer should extrapolate the rating value based on the values below and present that to applications.

Here is some information from the wiki link above:  (hope it helps)

POPM value -> Star rating

0                -> undefined -> ZERO/NO STARS
1*              -> 1 STAR        (This is a special case for Windows Media Player)
2-8            -> ZERO STARS
9-49*        -> 1 STAR
50-113      -> 2 STARS
114-167    -> 3 STARS
168-218    -> 4 STARS
219-255    -> 5 STARS

READING:
Information regarding reading the tag is provided by the id3.org website above. Clicking the following link should take you directly to section 4.18 where the POPM field is discussed.
-> http://www.id3.org/id3v2.3.0#head-2452ec9cf8b42c5c117b518b69e129ff67970852
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2012-03-05 08:25:58 UTC
mp4 files don't seem to have it
http://atomicparsley.sourceforge.net/mpeg-4files.html

there seems to be no official one for vorbis either, but somethings are used in the wild
http://code.google.com/p/quodlibet/wiki/Specs_VorbisComments
Comment 5 Jojo Man 2012-03-05 17:28:12 UTC
here is a 2007 discussion about ratings in mp4 files. If this is still accurate it means there is no equivalent tag in mp4(m4a) files

** NO M4A Rating Tags?? -> http://forum.xbmc.org/showthread.php?t=28526

Also a comparison of similar tags among the different formats are here:
TAGS Comparison -> 
http://age.hobba.nl/audio/tag_frame_reference.html
    according to this site there is no "rating tag" equivalent tags in any of the other formats listed

so i guess this means no equivalent m4a/ogg support of this ratings data, it appears it's not in any other popular formats (except maybe WMP(WMA) format, not sure)
Comment 6 Jojo Man 2012-03-05 17:32:29 UTC
correction: matroska container does seem to some form of a ratings tag.
see: http://age.hobba.nl/audio/tag_frame_reference.html

should matroska ratings support it be implemented since it's not a pure audio container ?
Comment 7 Jojo Man 2012-03-05 17:36:33 UTC
matroska support for personal ratings:
   see: http://matroska.org/technical/specs/tagging/index.html
     look for rating tag (under personal section)
Comment 8 Carl 2014-11-23 02:51:03 UTC
The research work that went on that report is very interesting.

Is there any plan to integrate this at some point?
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2015-01-19 10:05:56 UTC
Carl, this needs patches for several elements. We're happy to review them, if you (or anyone else) want to give this a try.

First patch would be to introduce a new tag in
http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gsttaglist.h
http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gsttaglist.c

and proposing how this could be implemented in various formats (at least two) - ideally as patches for those elements.
Comment 10 Benoit Brummer 2015-01-25 16:42:57 UTC
(In reply to comment #9)
> First patch would be to introduce a new tag in
> http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gsttaglist.h
> http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gsttaglist.c

Isn't this what the following lines are already doing?

>/**
> * GST_TAG_USER_RATING:
> *
> * Rating attributed by a person (likely the application user).
> * The higher the value, the more the user likes this media
> * (unsigned int from 0 to 100)
> */
>#define GST_TAG_USER_RATING                       "user-rating"

I would like to try and work on this feature, could you point me in the right direction?
Comment 11 Stefan Sauer (gstreamer, gtkdoc dev) 2015-01-26 09:54:08 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > First patch would be to introduce a new tag in
> > http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gsttaglist.h
> > http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gsttaglist.c
> 
> Isn't this what the following lines are already doing?

Indeed this s good.
> 
> >/**
> > * GST_TAG_USER_RATING:
> > *
> > * Rating attributed by a person (likely the application user).
> > * The higher the value, the more the user likes this media
> > * (unsigned int from 0 to 100)
> > */
> >#define GST_TAG_USER_RATING                       "user-rating"
> 
> I would like to try and work on this feature, could you point me in the right
> direction?

A quick grep though the sources shows that right now only XMP implements this:
./gst-plugins-base/gst-libs/gst/tag/gstxmptag.c:968

You would need to update the source for id3demux to handle the POPM rating and map it to a GST_TAG_USER_RATING. Next step would be to also patch id3v2mux/id3mux to also write the tag.

When you have it working (or like to get a revewiew) please attach git format patches here.
Comment 12 GStreamer system administrator 2018-11-03 11:21:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/64.