#1 2015-03-04 03:09

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

MP3 and FLAC metatags

Currently the metatags available for MP3s are ID3_Artist, ID3_AlbumArtist, ID3_Title, ID3_Album, ID3_Year, ID3_Genre, ID3_TrackNo and ID3_PartOfSet.

The metatags available for WMA and FLAC are Artist, Title, Album, Year, Genre and TrackNo.

Suggestions:

1) Change ID3_ to MP3_ since that is much more recognizable to average users and clearly lets them know which files those tag options work with.

2) If ID3_TrackNo is less than 10 it pads the number with a 0 (zero) in the beginning. Since FLAC_TrackNo doesn't do this (not sure about WMA since I didn't check) the behavior should be the same everywhere. IMO there is no need for any zero-padding at all. My audio players don't show the track number with zero-padding either.

3) I'd like to see MP3_TotalTracks in addition to MP3_TrackNo.

4) ID3_PartOfSet displays something like "2/10", which corresponds to "Disc Number/Total Discs". Not only is the name technical/confusing but the slash naturally causes problems since it's an invalid character and needs another rule to remove. Instead, corresponding with MP3_TrackNo and MP3_TotalTracks I'd like to see ID3_PartOfSet replaced by separate MP3_DiscNo and MP3_TotalDiscs (no zero-padding).

5) Similar to the above, I'd like to see FLAC_TrackNo, FLAC_TotalTracks, FLAC_DiscNo and FLAC_TotalDiscs (and if possible for WMA too).

6) I'd like to see FLAC_AlbumArtist (and if possible for WMA too).

tl;dr: The available metatags for MP3, FLAC and possibly WMA should ideally be the same, i.e. Artist, AlbumArtist, Title, Album, Year, Genre, TrackNo, TotalTracks, DiscNo and TotalDiscs (of course with no zero-padding anywhere). Hopefully the currently used tag library i.e. Audio Tools Library 2.3 will allow these changes, or it can be replaced with one that does.

Offline

#2 2015-03-10 18:58

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: MP3 and FLAC metatags

1) Change ID3_ to MP3_ since that is much more recognizable to average users and clearly lets them know which files those tag options work with.

Seems reasonable.

I know that ID3 has also been adopted in a number of other formats, but not sure how widely it is actually used (http://en.wikipedia.org/wiki/ID3#Non-MP … ternatives).

2) If ID3_TrackNo is less than 10 it pads the number with a 0 (zero) in the beginning. Since FLAC_TrackNo doesn't do this (not sure about WMA since I didn't check) the behavior should be the same everywhere. IMO there is no need for any zero-padding at all. My audio players don't show the track number with zero-padding either.

This should be easy to fix.

3) I'd like to see MP3_TotalTracks in addition to MP3_TrackNo.

Need to check if its available.

4) ID3_PartOfSet displays something like "2/10", which corresponds to "Disc Number/Total Discs". Not only is the name technical/confusing but the slash naturally causes problems since it's an invalid character and needs another rule to remove. Instead, corresponding with MP3_TrackNo and MP3_TotalTracks I'd like to see ID3_PartOfSet replaced by separate MP3_DiscNo and MP3_TotalDiscs (no zero-padding).

It is actually natively stored in X/Y format in ID3 frame, but we can break it down into separate tags.

http://id3.org/id3v2.3.0:

  • TPOS - The 'Part of a set' frame is a numeric string that describes which part of a set the audio came from. This frame is used if the source described in the "TALB" frame is divided into several mediums, e.g. a double CD. The value may be extended with a "/" character and a numeric string containing the total number of parts in the set. E.g. "1/2".

  • TRCK - The 'Track number/Position in set' frame is a numeric string containing the order number of the audio-file on its original recording. This may be extended with a "/" character and a numeric string containing the total numer of tracks/elements on the original recording. E.g. "4/9".

5) Similar to the above, I'd like to see FLAC_TrackNo, FLAC_TotalTracks, FLAC_DiscNo and FLAC_TotalDiscs (and if possible for WMA too).
6) I'd like to see FLAC_AlbumArtist (and if possible for WMA too).

Original specification of tags in FLAC files does not have any of such tags (http://www.xiph.org/vorbis/doc/v-comment.html).

However, there seems to have been an unofficial community recommendation to add more tags, but its hard to say if it was ever adopted by anyone (http://www.legroom.net/2009/05/09/ogg-v … mendations).

Offline

#3 2015-03-12 05:27

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: MP3 and FLAC metatags

den4b wrote:

I know that ID3 has also been adopted in a number of other formats, but not sure how widely it is actually used (http://en.wikipedia.org/wiki/ID3#Non-MP … ternatives).

In practice in all these years I've yet to come across any format other than MP3 in wide usage that uses ID3 tags. I don't foresee any end user confusion at all; quite the opposite in fact which is why I suggested the change.

den4b wrote:
Andrew wrote:

3) I'd like to see MP3_TotalTracks in addition to MP3_TrackNo.

Need to check if its available.

As far as I can tell you can break up TRCK into TrackNo and TotalTracks, and TPOS into DiscNo and TotalDiscs.

den4b wrote:

It is actually natively stored in X/Y format in ID3 frame, but we can break it down into separate tags.

Yup, that's what I'd like to see - four separate options for TrackNo, TotalTracks, DiscNo and TotalDiscs.

den4b wrote:

Original specification of tags in FLAC files does not have any of such tags (http://www.xiph.org/vorbis/doc/v-comment.html).

However, there seems to have been an unofficial community recommendation to add more tags, but its hard to say if it was ever adopted by anyone (http://www.legroom.net/2009/05/09/ogg-v … mendations).

Can you please check out how foobar2000 does it? IMO its tagging capabilities are right up there, if not the best available in a media player for Windows. For example I added tags for AlbumArtist (not Artist), TrackNo, TotalTracks, DiscNo and TotalDiscs to a FLAC:

FLACTags.png

Here's what MediaInfo says:

General
Complete name                  : Michael Jackson - Thriller.flac
Format                         : FLAC
Format/Info                    : Free Lossless Audio Codec
File size                      : 18.7 MiB
Duration                       : 3mn 20s
Overall bit rate mode          : Variable
Overall bit rate               : 782 Kbps
Album                          : Thriller
Album/Performer                : Michael Jackson
Part                           : 20
Part/Total                     : 200
Track name                     : Thriller
Track name/Position            : 10
Track name/Total               : 100
Genre                          : Pop
Recorded date                  : 1982

Audio
Format                         : FLAC
Format/Info                    : Free Lossless Audio Codec
Duration                       : 3mn 20s
Bit rate mode                  : Variable
Bit rate                       : 781 Kbps
Channel(s)                     : 2 channels
Sampling rate                  : 44.1 KHz
Bit depth                      : 16 bits
Replay gain peak               : 0.000000
Stream size                    : 18.7 MiB (100%)
Writing library                : libFLAC 1.2.1 (UTC 2007-09-17)

And here's what the official metaflac utility says if I run it with metaflac.exe --export-tags-to=- "Michael Jackson - Thriller.flac":

ALBUM=Thriller
ALBUMARTIST=Michael Jackson
DATE=1982
DISCNUMBER=20
GENRE=Pop
TITLE=Thriller
DISCTOTAL=200
TRACKTOTAL=100
TRACKNUMBER=10
replaygain_track_peak=0.000000

Last edited by Andrew (2015-03-12 05:31)

Offline

#4 2015-03-15 15:43

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: MP3 and FLAC metatags

It's in the works currently, will post back once it's ready for testing.

Offline

#5 2015-03-17 10:58

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: MP3 and FLAC metatags

All of the points have been addressed (except WMA_TotalTracks cannot be added, because it is not supported by WMA/ASF specification).

What's new in ReNamer 6.1.0.11 Beta:

* Trim new lines at the end of system formatted renaming errors;
* Renamed ID3_* meta tags to MP3_* (ID3_* will remain as hidden aliases);
* Internal cleanup of handling of MP3_* meta tags;
* Do not pad with zeros MP3_TrackNo and WMA_TrackNo meta tags;
* Handle Unicode data in FLAC_* meta tags;
* Added Portuguese translit alphabet;
* Added FLAC_AlbumArtist, FLAC_TrackTotal, FLAC_DiscNo, FLAC_DiscTotal meta tags;
* Added MP3_TrackTotal, MP3_DiskNo, MP3_DiskTotal meta tags;
* Added WMA_AlbumArtist, WMA_DiskNo, WMA_DiskTotal, WMA_PartOfSet meta tags;
* Fixed non-string tag handling issues in WMA files;
* Broader range of supported WMA files (no limits on SampleRate, ByteRate, etc);
* Converted WMA_TrackNo meta tag from 0-based to 1-based;

Offline

#6 2015-03-21 20:41

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: MP3 and FLAC metatags

Works great, Denis! smile

Some observations:

1) Since MP3_PartOfSet can always be represented as MP3_DiskNo/MP3_DiskTotal, what's the use of having it available separately? IMO PartOfSet is a confusing term for users (does it refer to tracks? disks? something else?) whereas TrackNo, TrackTotal, DiskNo and DiskTotal are unambiguous and easily understandable.

2) WMA_PartOfSet can perhaps be handled better IMO. As per the docs "The WM/PartOfSet attribute contains the part number and the total number of parts in the set to which the file belongs. The two values are separated by a slash." In practice all programs seem to take this to mean that WMA_PartOfSet can be either WMA_DiskNo by itself or WMA_DiskNo/WMA_DiskTotal.

Now if I set WMA_PartOfSet to be 2/200 (for example), then ReNamer shows:
WMA_PartOfSet = 2/200
WMA_DiskNo = 2
WMA_DiskTotal = 200

So all is ok in this case.

But if I set WMA_PartOfSet to be just 2, then ReNamer shows:
WMA_PartOfSet = 2
WMA_DiskNo = <empty>
WMA_DiskTotal = <empty>

In this case shouldn't it set WMA_DiskNo to 2?

My suggestion would be the same as for MP3_PartOfSet, i.e. split the values into DiskNo and DiskTotal (if it exists) and omit WMA_PartOfSet entirely because the terminology is confusing.

3) Regarding WMA_TrackTotal, you're right and I couldn't find it in the official specs (only found WM/TrackNumber). Wonder where foobar2000 saves it though? In a custom tag perhaps? hmm If MP3Tag saves it the same way then perhaps this may be yet another instance of a de facto unofficial standard as a result of widespread use.

Last edited by Andrew (2015-03-24 19:54)

Offline

#7 2015-03-25 21:12

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: MP3 and FLAC metatags

Andrew wrote:

1) Since MP3_PartOfSet can always be represented as MP3_DiskNo/MP3_DiskTotal, what's the use of having it available separately? IMO PartOfSet is a confusing term for users (does it refer to tracks? disks? something else?) whereas TrackNo, TrackTotal, DiskNo and DiskTotal are unambiguous and easily understandable.

PartOfSet is the name and value of the physical tag found in MP3 and WMA files. DiskNo and DiskTotal are extracted from PartOfSet. By definition, PartOfSet is stored in "X/Y" format, but in reality it could be any arbitrary string. If we remove PartOfSet meta tag, we will lose access to the raw unprocessed content of that physical file tag, in case it differs from the default "X/Y" format. I'm not sure whether it's a strong enough argument to keep it.

Andrew wrote:

2) WMA_PartOfSet can perhaps be handled better IMO. As per the docs "The WM/PartOfSet attribute contains the part number and the total number of parts in the set to which the file belongs. The two values are separated by a slash." In practice all programs seem to take this to mean that WMA_PartOfSet can be either WMA_DiskNo by itself or WMA_DiskNo/WMA_DiskTotal.

I agree. In the next version MP3_TrackNo, MP3_DiskNo, WMA_TrackNo, WMA_DiskNo will also work with numeric track and disk tags, in addition to standard "X/Y" format.

Andrew wrote:

3) Regarding WMA_TrackTotal, you're right and I couldn't find it in the official specs (only found WM/TrackNumber). Wonder where foobar2000 saves it though? In a custom tag perhaps? hmm If MP3Tag saves it the same way then perhaps this may be yet another instance of a de facto unofficial standard as a result of widespread use.

I played around with Winamp's and Mp3tag's tagging capabilities and they both simply force "X/Y" into the "WM/TrackNumber" tag. WMA_TrackTotal meta tag will be added using the same concept.

Offline

#8 2015-03-27 12:44

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: MP3 and FLAC metatags

den4b wrote:

PartOfSet is the name and value of the physical tag found in MP3 and WMA files. DiskNo and DiskTotal are extracted from PartOfSet.

Yes, I know this. smile

den4b wrote:

By definition, PartOfSet is stored in "X/Y" format, but in reality it could be any arbitrary string. If we remove PartOfSet meta tag, we will lose access to the raw unprocessed content of that physical file tag, in case it differs from the default "X/Y" format. I'm not sure whether it's a strong enough argument to keep it.

Well... I'm not entirely convinced either that it's a strong enough reason to retain it, but anyway even if you do there's no harm done so it's up to you really.

den4b wrote:

I played around with Winamp's and Mp3tag's tagging capabilities and they both simply force "X/Y" into the "WM/TrackNumber" tag. WMA_TrackTotal meta tag will be added using the same concept.

It is a string after all, so no wonder apps are treating it similar to WM/PartOfSet. So if WM/TrackNumber is an integer then populate only WMA_TrackNo, else if it is two integers separated by a slash then split it up and populate WMA_TrackNo and WMA_TrackTotal, right?

Offline

#9 2015-03-28 01:16

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: MP3 and FLAC metatags

Andrew wrote:

So if WM/TrackNumber is an integer then populate only WMA_TrackNo, else if it is two integers separated by a slash then split it up and populate WMA_TrackNo and WMA_TrackTotal, right?

Yes, WMA_TrackNo and WMA_TrackTotal will handle a sole integer value in "WM/TrackNumber" as well as "X/Y" format.

Changes in 6.1.0.12 Beta:

* Added Indonesian language PO file;
* Updated Japanese and Russian language PO files;
* Split filter settings into default and session settings; Any modifications
  to filters now apply to session settings, with an option to use them as defaults;
* Extract MP3_TrackNo, MP3_DiskNo, WMA_TrackNo, WMA_DiskNo from numeric track and
  disk tags, in addition to standard "X/Y" format;
* Added WMA_TrackTotal meta tag;
* Deprecated MP3_PartOfSet and WMA_PartOfSet tags in favor of respective
  MP3_DiskNo/MP3_DiskTotal and WMA_DiskNo/WMA_DiskTotal tags;

Offline

Board footer

Powered by FluxBB