IPB

Welcome Guest ( Log In | Register )

APEv2 tags in MP3, aimed: generally, at implementation, in rel.w/ foobar2000, vs. ID3v2.4
Tigermess
post Dec 29 2011, 19:30
Post #1





Group: Members
Posts: 66
Joined: 28-October 11
Member No.: 94746



Recent topics on ID3v2.4 and APEv2 implementation in foobar2000 (like this and that and others) raise the chase between ID3v2.4 and APEv2 tags. I'd like to start this topic as a branch of first mentioned topic, concerning APEv2 tags in MP3 files.

I want to choose optimal type of tags for MP3s with which I'll stick for few following years. ID3v2.3, ID3v2.4 and APEv2 are in the game. For long I've been tagging ID3v1+ID3v2.3, recently I started to like idea of multifields but after the discussions above I'm not sure what tag type is the best (selfishly enough for my needs). I'd appreciate multifields but I still want to keep best possible compatibility with most used SW/HW. In this matter after some googling and searching I have some questions about APEv2 and will be glad if you could help, especially if you were dealing with similar questions yourselves.

Q1: Are APE tag names standardized anyhow??
HA wiki says:
QUOTE
Just like Vorbis comment it defines some standard fields, but it also defines some formats for those fields (like what a date should look like).
I couldn't find it. Does any informal standard or recommendation exist? If not, default settings of most used players are standards enough - do iTunes, Winamp, foobar2000, Media Monkey or any hardware players have something in common? Basic field names - ARTIST, ALBUM, TITLE are obvious but others may be tricky. Shall I use spaces between words, no spaces or underscores? (e.g. ALBUM ARTIST is preffered by foobar2000 and Winamp, ALBUMARTIST is pref. by Mp3tag, nevertheless some people use ALBUM_ARTIST. ENCODED BY, ARTIST SORT NAME are other examples). Is more proper YEAR or DATE? DISC or DISCNUMBER? In this regard I see a benefit of imperfect yet precise ID3v2 recommendations specifying which field shall contain which kind of information.

Q2: Is APEv2 designed to contain pictures??
The implementation of pictures in APEv2 tag is very poor. foobar2000 doesn't support it yet (Peter said cautiously it will be done at some point, in Winamp it's in TO-DO state as well (I haven't tried latest version, correct me if I'm wrong), only Mp3tag can save pictures in APE tag. I stumbled upon these statements in APE tag FAQ, probably by Frank Klemm himself:
QUOTE
(ii) What's the point in storing binary data in a tag? I don't think storing images in files is a good idea (and Klemm seems to agree that 'long' tags is not a good idea).

(x) I store images and other goodies in the tags. There's no reason to be afraid of 30kb of extra data with a modern computer...
  • images should never be added to an audio file.
  • if the data is important for the audio-visual representation, an additional container format should be used to store data and relations between the data. A well designed example is the MPEG-4 system stream. Tags should be tags and not the worst possible concept of a container format.

and quote from APE tag format description:
QUOTE
It is strongly recommended that the data size be stored in the tags. The size should normally be in the roughly one kilobyte, never more than 8 kilobytes.

From these statements it looks like images and binary data in general are not welcome in APE format and it isn't designed for it. ID3v2 is having direct support for images and it is supported by many software and hardware players. Is there any problem with pictures in APE tags?

Q3: Is APEv2 suitable to be embedded into MP3?
I'm not sure how's APE in MP3 technically achieved. Are APE tags in MP3 saved on the same level as ID3 tags, or do they use some wrapper or ID3 tag as container? I assume MP3 doesn't define ID3 as the only and proper tag scheme, but it probably has requirements on embedding non-audio (in this case metadata) frames. Does APE meet those requirements?
From the description of APE tag at wikiaudio.org:
QUOTE
The foobar2000 player can also tag MP3 files with APEv2 tags instead of ID3 tags, because they are considerably easier to write and more flexible.However, because ID3 was designed with the MP3 format in mind and APEv2 was not, there are some complications. For example, the string APETAGEX signals the start of an APEv2 tag, but the string TAG signals the start of an ID3v1 tag. If the TAG in APETAGEX ends up where an ID3v1 tag is expected, it may be read incorrectly. ID3 also has an ďunsynchronization schemeĒ to ensure players do not try to play the tag data as audio; APEv2 has no such scheme, and APEv2 tags may result in errors or static at the end of files.

I use MP3val as a favourite tool to validate and repair all types of common errors in MP3 files. One of the most frequently reported error is "Garbage in the end of file". I checked test files tagged with few basic APE tags and they passed, however the statement above reveals that in rare cases APE tag will look like garbage in the end of file and will be ignored or removed by tools such as MP3val. Is it safe to use APE tags in MP3s? Any experience with misinterpreted APE tags or knowing current state of quote above are welcome.

The topic is as long as it can be. Thanks to those who were able to read it until here. In the times when I didn't know much about it, I was cutting MP3 off all tags and reimported them just to make sure that nothing else than ID3 frames I choose will not be there. Now I understand the benefits of APE tags, only the answers on the questions above aren't clear to me. Supposed answers: 1. No, 2. Yes, 3. Yes are in contradiction with excerpts I pasted.
Go to the top of the page
+Quote Post
 
Start new topic
Replies
Tigermess
post Dec 30 2011, 13:09
Post #2





Group: Members
Posts: 66
Joined: 28-October 11
Member No.: 94746



QUOTE (benski @ Dec 30 2011, 02:49) *
I'd be happy to finish the implementation of album art APEv2 in Winamp if someone can provide reliable test files.

Great news. What about these samples? I admit there are not many mp3s... Alex B could create them.

QUOTE (rodrigomartinho @ Dec 30 2011, 06:32) *
I already have my way of naming tags, but if we go further in this and want to make a new one, that maybe can serve for others, I'm in. At present I don't use spaces, but underlines in my custom tags (album_artist, date_of_reference, recording_info and VBR_mode).

Non-binding standards would be nice. We all solve similar problems as software developers do too. Maybe I'll try to push that later. With all respect to your naming scheme - from what I've seen now on very limited range of software (fb2k, Mp3tag, Winamp), two prefer spaces between words, one puts the words together - if you still can change it, I'd rather stick with one of those schemes. If you have any reasons to keep it - habits, friends - no problem :-)


QUOTE (rodrigomartinho @ Dec 30 2011, 06:32) *
QUOTE (Tigermess @ Dec 29 2011, 20:42) *
(side note to your previous Topic, Rodrigo: even APE doesn't expect multiple strings in Title, what a mess :-)))

What do you mean? It is working for me in foobar.

It's not a big deal. In the table, column "Recommended format of value" - Artist, composer, comment and others have one of the recommended values "List of UTF-8 strings" i.e. multiple strings. Title has only single string recommended. It was not against you, I was just surprised that multiple titles are missing in recommendation. It's the same behaviour which foobar2000 has now with ID3v2.4 - no multivalues allowed in a title.
Btw how do you plan to tag single-file rips of albums? Will you write all song names to the title? And all track numbers as multivalue too?

QUOTE (rodrigomartinho @ Dec 30 2011, 06:32) *
I may go with you in this and start saving id3v1 too. Since id3v1 should be in start and apev2 in end of file, shouldn't be a problem. Tests needed though.

In fact you won't even notice it, APE tag will always have priority and ID3v1 is saved in the background. The tags are imperfect but at least will be some... it will serve you well. Just beware, ID3v1 is in the end of file too, its written right after APEv2 tag - that's the reason for warning about possible confusion between TAG as a starting string for ID3v1 tag and APETAGEX as delimiter for APEv2. I hope if there were real problems, we already knew that, however ID3v2 is definitely safer - as ID3v2 is the one positioned in the beginning of the file.
Go to the top of the page
+Quote Post
rodrigomartinho
post Dec 30 2011, 15:03
Post #3





Group: Members
Posts: 21
Joined: 27-December 11
From: S„o Paulo
Member No.: 96067



QUOTE (Tigermess @ Dec 30 2011, 10:09) *
QUOTE (benski @ Dec 30 2011, 02:49) *
I'd be happy to finish the implementation of album art APEv2 in Winamp if someone can provide reliable test files.

Great news. What about these samples? I admit there are not many mp3s... Alex B could create them.

The question is only about copyright-free mp3 files? If it is so, it's easy to find some, isn't it?

QUOTE (Tigermess @ Dec 30 2011, 10:09) *
QUOTE (rodrigomartinho @ Dec 30 2011, 06:32) *
I already have my way of naming tags, but if we go further in this and want to make a new one, that maybe can serve for others, I'm in. At present I don't use spaces, but underlines in my custom tags (album_artist, date_of_reference, recording_info and VBR_mode).

Non-binding standards would be nice. We all solve similar problems as software developers do too. Maybe I'll try to push that later. With all respect to your naming scheme - from what I've seen now on very limited range of software (fb2k, Mp3tag, Winamp), two prefer spaces between words, one puts the words together - if you still can change it, I'd rather stick with one of those schemes. If you have any reasons to keep it - habits, friends - no problem :-)

I put underlines exactly because foobar uses space and mp3tag uses words together. I needed an "album_artist" tag that was different from "albumartist" (mp3tag) and "album artist" (foobar), since these for me mean "band". So I used underlines for other tags too. But I can change them, except for "album_artist".

QUOTE (Tigermess @ Dec 30 2011, 10:09) *
QUOTE (rodrigomartinho @ Dec 30 2011, 06:32) *
QUOTE (Tigermess @ Dec 29 2011, 20:42) *
(side note to your previous Topic, Rodrigo: even APE doesn't expect multiple strings in Title, what a mess :-)))

What do you mean? It is working for me in foobar.

It's not a big deal. In the table, column "Recommended format of value" - Artist, composer, comment and others have one of the recommended values "List of UTF-8 strings" i.e. multiple strings. Title has only single string recommended. It was not against you, I was just surprised that multiple titles are missing in recommendation. It's the same behaviour which foobar2000 has now with ID3v2.4 - no multivalues allowed in a title.
Btw how do you plan to tag single-file rips of albums? Will you write all song names to the title? And all track numbers as multivalue too?

Oh, I didn't notice that. But, different from id3, these are just recomendations, not limitations, and any frame should work with multiple values. As you know, multiple values in titles was the main reason I got into this discussion!
About single-file rips, I don't use them, so I got little experience on it. As far as I know they need a cuesheet to get properly tagged. When I get such files, I usually tear the files apart.

QUOTE (Tigermess @ Dec 30 2011, 10:09) *
QUOTE (rodrigomartinho @ Dec 30 2011, 06:32) *
I may go with you in this and start saving id3v1 too. Since id3v1 should be in start and apev2 in end of file, shouldn't be a problem. Tests needed though.

In fact you won't even notice it, APE tag will always have priority and ID3v1 is saved in the background. The tags are imperfect but at least will be some... it will serve you well. Just beware, ID3v1 is in the end of file too, its written right after APEv2 tag - that's the reason for warning about possible confusion between TAG as a starting string for ID3v1 tag and APETAGEX as delimiter for APEv2. I hope if there were real problems, we already knew that, however ID3v2 is definitely safer - as ID3v2 is the one positioned in the beginning of the file.

It just came to me now that after I properly mapped the discnumber tag in apev2 to just "disc", my previous setup of saving both apev2 and id3v2.4 should work between foobar and mp3tag. I'll test it again. And maybe it will work with other combinations, such as apev2 + id3v2.4 + id3v1, or apev2 + id3v2.3 + id3v1. I'll test that too and, if works indeed, it would be possible to have a scheme where complete tags work in foobar (apev2) and incomplete but largely supported tags would work in software that doesn't handle apev2. This would be the best of both worlds and seems this is our goal.
Go to the top of the page
+Quote Post
rodrigomartinho
post Dec 30 2011, 17:27
Post #4





Group: Members
Posts: 21
Joined: 27-December 11
From: S„o Paulo
Member No.: 96067



QUOTE (rodrigomartinho @ Dec 30 2011, 12:03) *
It just came to me now that after I properly mapped the discnumber tag in apev2 to just "disc", my previous setup of saving both apev2 and id3v2.4 should work between foobar and mp3tag. I'll test it again. And maybe it will work with other combinations, such as apev2 + id3v2.4 + id3v1, or apev2 + id3v2.3 + id3v1. I'll test that too and, if works indeed, it would be possible to have a scheme where complete tags work in foobar (apev2) and incomplete but largely supported tags would work in software that doesn't handle apev2. This would be the best of both worlds and seems this is our goal.


I made some further tests that clarified some more things.

1. About saving more than 1 tag in a file
I saved apev2 + id3v2.4 + id3v1 in some files. As you stated, id3v2.4 was at the beginning, apev2 at the end and 1d3v1 after apev2. But apev2 didn't end as expected with a "TAG", but with a "APETAGEX". Example of end of a file from HexEditor:
CODE
APETAGEX–...Ň..........†................COMPOSER.Pixinguinhap.......MUSICIANCREDITS.Pixinguinha:.Donga:.(...)PUBLISHER.Sinter SLP-1038........BAND.A Velha Guarda........DISC.1/1APETAGEX–...Ň..........Ä........TAGQue Perigo....................A Velha Guarda................A Velha Guarda................1955..............................ˇ


2. I tested these files with varied combinations of tags with the other audio software I have:

- Windows Media Player: doesn't read id3v2.4 nor apev2. Reads id3v2.3 and id3v1, even with apev2 present.
- iTunes: doesn't read apev2. Reads id3v2.4, even with apev2 present.
- VLC: Seemed to partially read apev2.

3. I seems that now I am finally aware of the problems about saving tags on files that have more than one tag type both in mp3tag and foobar. Apev2 and vorbis comments doesn't have any pre-definition for frame names. So, whatever you choose, both in mp3tag and foobar, is written in the file. But id3 is different. It has pre-defined frame names (TIT2, TPE1, etc), but none software uses them. Instead, they use a mapping between these frame names and more intelligible names, but these intelligible names aren't the same between mp3tag and foobar. So, TPE4, for instance, is MIXARTIST in mp3tag and REMIXED BY in foobar. This isn't a problem when you have only id3 tags. You save MIXARTIST in mp3tag, it writes TPE4 in file, foobar reads TPE4 in file and shows you REMIXED BY. If you change this tag, foobar will save in TPE4, so everything works between them, even if they show a different name.

This doesn't happen if you have id3 and ape tags in the same file. In the same example as above, when you save MIXARTIST in mp3tag, it will save TPE4 in id3 and MIXARTIST in ape. When foobar reads this file, it reads both tags and shows all frames, despite which tag type it is from, in the properties window. So it will show REMIXED BY (the TPE4 frame read from id3) and MIXARTIST (read from ape and shown unchanged). If you save this tags in foobar, it will create the TXXX MIXARTIST in id3 (since this isn't the name it expects for TPE4) and the REMIXED BY in ape. It was this kind of duplication (principally noted in DISCNUMBER) that was bothering me. Now that I finally understood it, I can see that, apart the unnecessary replication of frames, there isn't much to worry about this. And, since mp3tag has a mapping function, but foobar doesn't, it is possible to have full compatibility between frame names if one uses exclusively the foobar names, mapping them in mp3tag. This will be my next test.

Just a final comment. It would be great if mp3tag and foobar let you edit the internal mapping they do between id3 frame names and "intelligible names". If this was possible, one could choose his preferable standardization of tag names and edit it in this table. Then, apev2 and vorbis comments, which doesn't have pre-defined frame names, would also use this standard the user had chosen. All the problems described here would be gone. Mp3tag has already tried something is this path, with its mapping function, but it would be much easier if, instead of mapping the "internal intelligible names" to "chosen names for each file type", we could change the mapping between "internal intelligible names" and "id3 names".

This post has been edited by rodrigomartinho: Dec 30 2011, 17:39
Go to the top of the page
+Quote Post

Posts in this topic
- Tigermess   APEv2 tags in MP3   Dec 29 2011, 19:30
- - rodrigomartinho   Hi again Tigermess. As I stated in the other topic...   Dec 29 2011, 20:26
- - Tigermess   I've seen about 5 links from your post but not...   Dec 29 2011, 23:42
|- - rodrigomartinho   QUOTE (Tigermess @ Dec 29 2011, 20:42) I...   Dec 30 2011, 06:32
- - Tigermess   I've found something to Q2. Florian, Mp3tag de...   Dec 30 2011, 00:50
|- - Gumboot   QUOTE (Tigermess @ Dec 29 2011, 23:50) 1....   Dec 30 2011, 14:05
|- - Tigermess   Gumboot, thanks. I liked your argument about 11 an...   Jan 4 2012, 00:25
|- - rodrigomartinho   QUOTE (Tigermess @ Jan 3 2012, 21:25) I b...   Jan 4 2012, 01:31
- - benski   I'd be happy to finish the implementation of a...   Dec 30 2011, 02:49
|- - rodrigomartinho   QUOTE (benski @ Dec 29 2011, 23:49) I...   Dec 30 2011, 06:39
- - Tigermess   QUOTE (benski @ Dec 30 2011, 02:49) I...   Dec 30 2011, 13:09
|- - rodrigomartinho   QUOTE (Tigermess @ Dec 30 2011, 10:09) QU...   Dec 30 2011, 15:03
|- - rodrigomartinho   QUOTE (rodrigomartinho @ Dec 30 2011, 12...   Dec 30 2011, 17:27
|- - rodrigomartinho   QUOTE (rodrigomartinho @ Dec 30 2011, 14...   Jan 2 2012, 13:43
- - db1989   I am fairly sure that APEv2 and ID3v2 are mutually...   Dec 30 2011, 17:32
|- - rodrigomartinho   QUOTE (db1989 @ Dec 30 2011, 14:32) I am ...   Dec 30 2011, 22:18
- - db1989   I didnít say that they canít be added; I said that...   Jan 1 2012, 23:10
|- - rodrigomartinho   QUOTE (db1989 @ Jan 1 2012, 20:10) I didn...   Jan 2 2012, 13:35
- - benski   Winamp assumes that an APEv2 tag might come betwee...   Jan 3 2012, 01:54
- - Tigermess   I speak a little bit portuguese, no need to transl...   Jan 4 2012, 02:34
|- - rodrigomartinho   QUOTE (Tigermess @ Jan 3 2012, 23:34) I s...   Jan 4 2012, 02:40
- - Tigermess   Today I noticed that Soulsearchingsun updated Foob...   Feb 13 2012, 10:49
|- - rodrigomartinho   As far as I have tested it, the mapping in mp3tag ...   Feb 25 2012, 16:13
|- - rodrigomartinho   QUOTE (Tigermess @ Feb 13 2012, 07:49) To...   Mar 5 2012, 02:07
- - Tigermess   How did it go? I got stuck in the beginning, I cou...   Apr 8 2012, 14:00
- - Tigermess   Here's the updated version of table. https://...   Apr 14 2012, 18:57


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd September 2014 - 15:48