[Rhythmbox-devel] Total Tracks?


just started using RhythmBox: it looks wonderful!
yeah, some of the edges are rough, but it's already really
nice (I can finally make sense of my music collection!
all those empty nights spent correctly tagging multi-artist
CDs pays off!), and I have become YARBFB
(Yet Another RhythmBox Fan Boy).

What follows is rather long; the first section summarizes
the problem, then one can skip to the end for the
recommendation -- the rest is discussion and justification.

a question/concern regarding "Total Tracks":
(Using RhythmBox 0.5.3):

Part I: displaying # of tracks ----------------------------
Here is how track number handling works, as far as I can tell:
(assume the track is 04 of 13)
1: If neither "Track #" nor "Total # of Tracks"
  can be determined, then it displays
  Track number: 00 of: 00
  ...which is suboptimal -- it should stay blank.

2: If "Track #" and "Total # of Tracks"
  can both be determined, then it displays them correctly ;-)
  Track number: 04 of: 13

3: If "Track #" can be determined but "Total # of Tracks" cannot,
  it displays:
  Track number: 04 of: 04
  ...which is incorrect, and misleading -- it should read:
  Track number: 04 of: <blank>

4: If "Track #" cannot be determined but "Total # of Tracks" can,
  it displays:
  Track number: 00 of 13
  ...which is incorrect -- it should read:
  Track number: <blank> of: 13

Note however that if the "Track #" or "Total # of Tracks"
is -negative-, then the space is left blank, rather than
displaying '00'.
This is really weird, and I think unintentional.

I propose that if information cannot be determined, it be
left blank, rather than being displayed as '00', or
misleadingly as "04 of 04".

Part II: TRACKTOTAL tag? ----------------------------

As far as I can tell, RhythmBox parses the Ogg Vorbis
TRACKNUMBER field as if it were an ID3v2 TRCK field,
where TRACKNUMBER and "total # of tracks" is stored as:
(for track 4 of 13).

This is incorrect, and contrary to the philosophy of Ogg
Vorbis tags, as stated in the standard:

There TRACKNUMBER is only the track number; no mention is
made of the total number of tracks.
Further, Vorbis tagging errs on the side of having more tags
and less parsing. For instance, the correct way to store
multiple artists is:
ARTIST=Dizzy Gillespie
ARTIST=Sonny Rollins
-not-: ARTIST=Dizzy Gillespie, Sonny Rollins

By that same logic, TRACKNUMBER and "total # of tracks"
should be stored as separate tags.

I propose using "TRACKTOTAL" for this purpose, and describe
why below. Note that TRACKTOTAL is already used by a few
programs, namely "Ogg Drop" and "Vorbis Rage".

I assume that the current treatment is based on ID3v2, which
is fine for MP3s but unsuited for Ogg Vorbis.


Why do I care about this? Well, I want RB to be
The Greatest Music Management Program Ever (TM),
of course, but more specifically:

This summer I used an iMac, and had some trouble with the
Ogg Vorbis support (mainly that Apple doesn't have Ogg
support in iTunes; *grumble*).
In particular, the ripping/encoding program I used,
Ogg Drop, stored "Total Number of Tracks" in the
TRACKTOTAL tag, while the tagging program I used (when Ogg
Drop messed up -- *sigh*), Vorbis Rage, stored "Total Number
of Tracks" in TOTALTRACKS.
In particular, they didn't speak with each other.

This is understandable: there is no standard tagname for
"Total Number of Tracks" on Ogg Vorbis files, either in
the official comment recommendations:

or the unofficial extended recommendations:

I talked with the developers, and the Vorbis Rage developer
graciously agreed to change to using TRACKTOTAL.

I'm guessing that this came up on Mac programs (and hasn't
been noticed or worried about much on other platforms)
because iTunes uses it.

By comparison:
ID3v2 uses the TRCK field, where it stores for instance
04/13 (track 4 of total 13)
This of course requires ugly parsing magic.
                                                                        iTunes.xml (the iTunes database) uses the "Track Count"
field (for "total number of tracks")

I have tried to develop some consensus about this and see if
some official recommendations can be made:
- I contacted the vorbis@xiph.org mailing list, in the hopes
  of sparking discussion. You can follow the thread at:
  starting with my email at:

Unfortunately, it degenerated into a tagging flame-fest,
mostly due to one poster (Segher) who believes that tagging
is an abomination, and should be eradicated in favor of an
(as yet non-existent) metadata stream.
- I did not contact vorbis-dev, nor suggested an amendment to
  the official standard at:
  ...as I did not wish to bother the developers: they're
quite sick of tagging flamefests, and the standard is not
really open for change (as evidenced by the existence of the
unofficial recommendation).

- The unofficial extended recommendations:
  has no contact information, but I tried contacting the
webmaster who hosts it, to no avail (yet).

Thus instead (and I'd've done this anyways had an official
recommendation emerged), I'm going around to my favorite
projects in the hope of getting them to speak with each

The de facto standard appears to be TRACKTOTAL, as it is
recognized by the only programs (Ogg Drop and Vorbis Rage)
that to my knowledge recognize "Total # of Tracks" on Ogg
Vorbis files.

Other suggestions include TRACKCOUNT, and TOTALTRACKS, but
very little (only taste, it seems) would recommend these
over TRACKTOTAL, and no program to my knowledge recognizes
TRACKCOUNT or TOTALTRACKS (actually, Vorbis Rage now
(as of this week -- perhaps not in currently downloadable
version) recognizes TOTALTRACKS and changes it to TRACKTOTAL
if tags are re-written to the file).

A last idea is to put the "total # of tracks" in the
TRACKNUMBER tag, as in 04/13, like ID3v2; this is done
in some programs, including (currently) RhythmBox. This
is bad because it contradicts, rather than extends, the
Official Standard.
It's also a pain to parse, and doesn't degrade gracefully:
if one uses TRACKTOTAL, then a player/application that's not
aware of it can ignore it, but if one does faux ID3v2, then
applications that expect (understandably enough ;-)
just the Track Number in TRACKNUMBER get confused
(e.g., XMMS 1.2.7 has this problem).

Hence I am putting forth TRACKTOTAL as my suggestion for
RhythmBox to use.

Another question: what other projects should I contact?
I'm planning on contacting:
- Grip
  (so it provides the Total # of Tracks as a parameter
   that can be passed to encoders, to tag however they want)
  (1.2.7 barfs on TRACKNUMBER=04/13 in Vorbis)
  (there is a patch floating around to use arbitrary Vorbis
   tags in the display)
- EasyTag
  (this also uses the ID3v2 techniques of 04/13,
   breaking the Vorbis standard)
...any others?

Thus my suggestions:
1: Read the TRACKTOTAL vorbis tag to determine total # of
  tracks for Ogg Vorbis files.
  If TRACKTOTAL is not present, then parse
  TRACKNUMBER to see if it's of the form 04/13;
  this is for backwards compatibility.

2: If track # information is missing, just leave it blank,
  rather than filling in incorrect or misleading info.
  Note that the current treatment is inconsistent, as I
  observed above.
  In particular:
  a: If "Track Number" can be determined, but
    "Total # of Tracks" cannot, then it should leave
    the total blank, as in:
    Track number: 04 of: <blank>
  b: If neither can be determined, then it should leave them
    both blank, as in:
    Track number: <blank> of: <blank>
  c: (and of course if "Track number" can't be, but "Total #"
     can be, display "<blank> of 13")

Does this sound good and reasonable?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]