Good info, thank you very much. I was manually trying to find this info out. Much harder, but now I trust that I could code a program to pull the metadata fields from an AAC in an MPEG4 container!
Do you happen to know what type of tag that is? I don't see defined as any of the existing atoms, only that I found the atom where it appears to rest in... I need to look further into it but this is literally at the bit level with a hex editor using atom positions, etc...
First, I got the mapping of the metadata/atoms:
Atom ftyp @ 0 of size: 32, ends @ 32
Atom moov @ 32 of size: 57065, ends @ 57097
Atom mvhd @ 40 of size: 108, ends @ 148
Atom trak @ 148 of size: 53565, ends @ 53713
Atom tkhd @ 156 of size: 92, ends @ 248
Atom mdia @ 248 of size: 53465, ends @ 53713
(..omitted to cut down the size......)
Atom stsz @ 557 of size: 50724, ends @ 51281
Atom stco @ 51281 of size: 2432, ends @ 53713
Atom udta @ 53713 of size: 3384, ends @ 57097
Atom meta @ 53721 of size: 3315, ends @ 57036
Atom hdlr @ 53733 of size: 34, ends @ 53767
Atom ilst @ 53767 of size: 1282, ends @ 55049
Atom ©nam @ 53775 of size: 32, ends @ 53807
So we hit here, this is typical, using the naming convention, we've drilled down to ftyp.moov.udata.meta.ilst.©nam.data (.data is implied, and prepends all meta fields after the 4 character atom name)
I find at the end: Atom Xtra @ 57036 of size: 61, ends @ 57097
Movie duration: 294.336 seconds (04:54.34) - 282.72* kbp/sec bitrate (*=approximate)
Low-level details. Total tracks: 1
Trk Type Handler Kind Lang Bytes
1 soun [none listed] mp4a und 10401922
256.00 kbp/s MPEG-4 AAC Low Complexity/LC Profile channels: [2]
Ok, so there's our AAC profile info. Now here's looking at that Xtra atom in a hex editor:
I hope that's big enough for all to see, it shrunk it down. I highlighted/marked the position @ 57036 for 61 bytes, which ends at 53807. As you'll see, there's this data "ParentalRating" and followed a few bytes later by "Explicit". If you say the tag actually has a defined name (I believe you) -- then *** is this here, and why is it in a generic Xtra tag at the very end?
Neevermind. Figured it out. I had a hunch. It's freakin' Windows that put it there. God knows what kind of tag it is... ID3? Windows isn't gonna handle it properly. Gah. Red herring!
Back on the trail. Here's some documents those who are technically inclined may find interesting:
Here is the full PDF file defining Apple's format of MPEG-4 media (audio, movies) -- pretty awesome, detailed info. Definitely keeping this, it's for programmers (which I happen to be, luckily hah) -- https://developer.apple.com/library/mac/documentation/QuickTime/qtff/qtff.pdf
Awesome wiki on file formats... this one goes directly to what we're looking for, it has the 4CC's for video and audio, defines all of the top-level atoms: http://wiki.multimedia.cx/index.php?title=QuickTime_container
(root is implied, and is of course, "ftyp"; the indentation didn't carry over, but view the link for it)
moov
mvhd
trak
tkhd
edts
elst
mdia
...
stss
stsc
stsz
trak
trak
...
mdat
[data]
A 'meta' atom contains atoms containing human-readable textual data with meta information regarding the file. These atoms are marked with 4 bytes of course but the first byte is a value of 0xA9 (you saw this earlier in my example, it shows as the copyright symbol, so now you understand this normally cryptic line -- "Atom ©nam". The remaining 3 characters can be:
- nam: Name of song or video <--- So clearly, at this position, in this atom name, the song title would be stored, with 0xA9 before it. Same with these:
- cmt: General comment (atom name is ©cmt)
- alb: Album name (atom name would be ©alb)
Here's a real life output of a scanned file:
Atom "©nam" contains: Song Title
Atom "©ART" contains: Artist Name (why this is CAPS, I have no clue)
Atom "©alb" contains: Album Title
Atom "trkn" contains: 6 of 12 (now many of them stop having the 0xA9 char, and are all 4 letters-- I'm unsure but I THINK the "©" ones may be required?)
Atom "disk" contains: 1 of 1
Atom "©day" contains: 2000 (actually time/date... most of the time it's just the year. Apple puts a full timestamp in theirs ending with a Z)
Atom "cpil" contains: false (is compilation?)
Atom "pgap" contains: false (pregap/gapless?)
Atom "tmpo" contains: 0 (tempo/BPM)
Atom "©too" contains: iTunes 10.2.2.12, QuickTime 7.6.9 (encoding tool used)
The list of possible ones go on and on, I cut it off right there. Check the links above for all the dirty info if you want it.
Then there's special, super cryptic atoms, called user atoms... defined with names that are long hex UUID strings and are hidden, with the intention to hide it from the end user... may contain DRM stuff, or other relevant info such as info tying your account email/id to the file... which of course it is...
These look like this:
Atom "----" [com.apple.iTunes;iTunMOVI]
I'm going to stop right there, as most people are probably already long lost or unconcerned. This goes into something called RDNS (reverse dns -> notice the domain name is backwards? It would normally be typed as "iTunes.apple.com" -- that's the way normal DNS works on the internet... but enough. Notice only that the atom name is blanks "----" there can be many of these, all named this. If anyone is interested further or actually is intrigued by this and understands it, I'm up for discussion elsewhere...
Sorry for the length of this post. Now to find a file with the elusive, REAL "ITUNESADVISORY" atom. Thanks for the valuable info kstr79, without it I might still be barking up the wrong tree. It helped out! Any questions, I'll be glad to answer, but I think I scared most people off, LOL.