Help - Search - Members - Calendar
Full Version: Spec for MP4 and M4A tags
Hydrogenaudio Forums > Lossy Audio Compression > AAC > AAC - Tech
deepp@speedpost.net
Hi does anyone know where there is a specification for finding the MP4 tag within a MP4 file and finding the M4A tag within a M4A file. I am purely interested in editing the meta-data of such files (artist name,album name..) rather than the audio itself.
deepp@speedpost.net
QUOTE(Latexxx @ Jan 27 2005, 09:10 PM)


Thanks this is a start but what is this MP4 or M4A, is there a English Spec Doc anywhere
Latexxx
Mp4 is m4a. There aren't any documents because everybody uses reverse-engineered itunes tags. So it isn't really a standard.
Garf
Well, MP4/M4A is specced of course. The music tags aren't, though.
spoon
>The music tags aren't, though.

How long has it been? two years. Apple do seem reluctant to play ball and make public a specification, reverse engineering is no match for manufacturer docs.
davelasker
I also built an app that edited mp4/m4a metadata (aacgain). I was nervous about using the mpeg4ip/mp4v2/mp4file implementation so I did some extensive testing with iTunes and found some bugs in mpeg4ip/mp4v2's metadata handling. Fortunately Bill May was very responsive to my comments and the fixes are now checked in to CVS.

You need to check out mpeg4ip from CVS to get the fixes; the most current official release (1.2) still has the bugs. Or you can download my aacgain source code which has a patch to fix the bugs.

See my posts on mpeg4ip's forum on sourceforge for more details.

HTH...

Dave

jtclipper
There is no spec but you can play around with itunes tagged files to get a basic idea using a HEX editor.
BTW the tag specs for mp4 ( music files ..) is immensely poor and lacks intelligence and broad support.
Pity for a supposed superior format.
davelasker
QUOTE(jtclipper @ Jan 29 2005, 05:10 AM)
... the tag specs for mp4 ( music files ..) is immensely poor and lacks intelligence and broad support ...
To get back to deepp's original post in this thread: I've never seen such a spec - do you have a reference to it?

Dave
emkey08
Hello,

I wanted to ask if there are any news about this (specs for MP4 or AAC tagging).
The MP4 specs seem to be available for free download from the ISO homepage from

http://www.iso.org/iso/en/CombinedQueryRes...String=14496-14

(but you need to register to get access to the document).

I'm a developer and I would greatly appreciate it if you would know any other sources for AAC (iTunes tagging format) specs.

Thanks.
Mathias
davelasker
QUOTE(emkey08 @ Apr 8 2007, 11:44) *

I'm a developer and I would greatly appreciate it if you would know any other sources for AAC (iTunes tagging format) specs.

Apple considers the tags used by iTunes to be proprietary; hence there is no official spec for them available.

The most complete documentation of iTunes tags I have been able to find is here:
http://atomicparsley.sourceforge.net/mpeg-4files.html. Scroll down to the middle of the document where it says Known iTunes Metadata Atoms.

Hope that helps...

Dave
emkey08
Dave,

thanks for the link. I already downloaded the AtomicParsley project and I'm currently delving into its source code because I want to write a native .NET iTunes tagging library. I need this for my new project I'm currently working on. Or do you know if such a (free) library already exists?

One more question: is it correct that AAC can also use a native tagging format except the de facto standard iTunes metadata tags of the MP4 container? I saw mp3tag to write ID3v1 and/or APEv2 tags to an AAC file.

Thanks for your advice.
Mathias
benski
There is a common misconception that there is a standard tagging format for AAC. This is certainly not the case. With MP4 (aka M4A) there is a standard place to put metadata (the udta atom - user data), but there is no standard on any fields except for 'cprt' for copyright. Nor is there anything in the standard forcing you to use the udta atom for all metadata.

"Raw" AAC formats like ADIF or ADTS do not have any tagging format at all. Typically id3v2 is used since the ADTS AAC frame header is basically the same as the MP3 frame header. This means that id3v2 tricks like unsynchronization apply without modification.
davelasker
QUOTE(emkey08 @ Apr 9 2007, 14:30) *

I already downloaded the AtomicParsley project and I'm currently delving into its source code because I want to write a native .NET iTunes tagging library. I need this for my new project I'm currently working on. Or do you know if such a (free) library already exists?

What do you mean my "Native .NET"? I thought MS Visual Studio/Visual C++ can compile C/C++ code into either Native (x86) or Common Language Runtime (.NET) object code.

Could you solve your problem by compiling AtomicParsely code with the "Use Managed Extensions" (/clr) project property set? You could use this approach to create a library which could be called by code written in C#, VB.NET, etc.

Dave
emkey08
QUOTE(davelasker @ Apr 19 2007, 02:49) *

What do you mean my "Native .NET"? I thought MS Visual Studio/Visual C++ can compile C/C++ code into either Native (x86) or Common Language Runtime (.NET) object code.


Hm, well I don't know if Visual Studio 2005 can compile C++ code into .NET object code or if you have to use C#, J# or VB.NET for that. Anyway, a .NET program can call a C++ compiled win32 dll, so it would be no problem anyway.

However, I'm currently working on a .NET tagging library and I don't want to include an external C++ dll if possible so that I can optimize and unify the interfaces used within the library. Thanks for your help anyway.

Mathias
Sebastian Mares
I am not sure so I might be writing BS here - VC++ 2005 writes .NET object code by default, but you can make it write Win32 code by using Platform SDK.
gb115b
any luck with that .net library for m4a tagging?
frozenspeed
QUOTE(gb115b @ Sep 22 2007, 13:59) *

any luck with that .net library for m4a tagging?



I've started writing my own lib for this in C#. I'll bump this thread when I have something worth showing. As I'm an overworked dev IRL who knows when that could be...
Jebus
QUOTE(frozenspeed @ Mar 6 2008, 15:59) *
QUOTE(gb115b @ Sep 22 2007, 13:59) *

any luck with that .net library for m4a tagging?



I've started writing my own lib for this in C#. I'll bump this thread when I have something worth showing. As I'm an overworked dev IRL who knows when that could be...




Check out the quicktime COM API... You can call it from C# and use that to read/write the MP4 metadata. Or, if you want a standalone C# library, you can at least fiddle with it to understand which tag atoms are used for what.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.