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, 00:50
Post #2





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



I've found something to Q2. Florian, Mp3tag dev himself mentioned never more than 8KB rule as a obstacle for implementing embedding images into APEv2. And also that Mp3tag discards all binary data. 1.3 years later the embedding was done, without explaning how come that for years the rule was held and now it was breached. A demand for embedded pictures had certainly its role; if the rule itself was proven wrong, surpassed by technological improvement or simply ignored is hard to tell.

More, there's mention about two ways of embedding - "Godfather", which is against rules, and "JRMC", the proper one. I suppose Mp3tag uses the right one.
Go to the top of the page
+Quote Post
Gumboot
post Dec 30 2011, 14:05
Post #3





Group: Members
Posts: 51
Joined: 11-December 11
From: United Kingdom
Member No.: 95728



QUOTE (Tigermess @ Dec 29 2011, 23:50) *
1.3 years later the embedding was done, without explaning how come that for years the rule was held and now it was breached. A demand for embedded pictures had certainly its role; if the rule itself was proven wrong, surpassed by technological improvement or simply ignored is hard to tell.


If you want to define a format where the maximum length of a field needs only 11 bits to encode, then you do not allocate 32 bits to that field. Simple as that.

Looking over the format it appears that APEv2 is generally safe from false sync markers (which would break MP3 compatibility) provided you do not have any field or tag length greater than about 56kB and you do not embed any binary data (like cover art). APEv3 would need to reserve a couple of bits in the flags field (and keep them zero) to keep that level of safety.

There are greater lengths that are safe to encode, and there is binary data which is safe to encode, but beyond the constraints above things could get hairy.

This post has been edited by Gumboot: Dec 30 2011, 14:06
Go to the top of the page
+Quote Post
Tigermess
post Jan 4 2012, 00:25
Post #4





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



Gumboot, thanks. I liked your argument about 11 and 32 bits :-) And Rodrigo for gapless playback test as well. I suppose there's no need to doubt about quality of APE tags anymore. Nobody addressed Q3 but it!s more my laziness than anything else standing behind it - I'll have a look at MP3 specs myself.

Rodrigo, if you find time, post your further observations, I'll gladly read it. Looks like we were dealing with similar issues. I began to compare tag "standards" and their implementation in popular software; for this purpose I did a table. The table can be downloaded here. I still need to add at least Vorbis standards and Winamp default mappings (the more the better), then I can decide how to label fields for most compatibility across various tag types and SW. Feel free to enhance it (I didn't have time to upload it to googledocs though, just offline version for now).

I will be busy in following 3 weeks so sorry if I won't make early replies; but don't hesitate to discuss anything that comes on your mind about APE tags; after that I'll finally choose my tagging scheme.
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: 21st December 2014 - 11:45