PDA

View Full Version : Setting Assets in M4A files with Motorola E770 (useful maybe for other mobile phones)


Hyper Shinchan
16th December 2006, 11:52
This is a guide that I wrote for mine Motorola E-770 in order to set metadata on m4a files containing AAC Plus audio. It will probably adapt easily to other Motorola mobile phone with the same problem (they don't support ITunes tags) and maybe to other mobile phone producers too, I really dunno, I just hope that it can be useful. If you don't care about the introduction (it's me that talk about mine problem and how I found the solution, and the reason that make this solution a little awkward). just skip to the pass 1.
Well, I have purchased a pair of weeks ago a Motorola E-770 and I discovered (yep, I've discovered it AFTER purchasing it) that it supports eAACPlus (aka AAC Plus 2). Now considering that it has only 30 MB built-in memory (expandible with external memory but for now I don't want to purchase one) AAC Plus can be really useful (personally I use 32 kbps bitrate with SBR and PS, it gives me an avarege size of 1MBxsong).
The problem that I easily recognized is that it doesn't read ITunes style tags, so I cannot use metadata. But I already knew that it supports the nice 3GPP assets (well, a limited subset of them, only title, author, description and copyright; "author" is showed as "artist"). For the ones that don't know what 3GPP assets are I can say that they are a metadata method derivated from the original cprt box of the ISO/IEC 144496 Part 12 specs. More info are avaible at the 3GPP file format page (http://www.3gpp.org/ftp/Specs/html-info/26244.htm).
So I thought maybe it can read 3GPP assets also on file stored in the music folder with the .m4a extension (yep, unfortunately a file to be saved in the music folder must have .m4a extension, .3gp and .mp4 will be automatically moved to the "proper" folder).
The fact is that it's pretty hard to produce a file with such characteristic (3gp brand and aac plus audio). The reason is that MP4Box doesn't allow -sbr or -sbrx switch with .3gp extension (I'll ask to the GPAC team to fully upgrade to 3GPP release 6 in the next version, at the moment it allows only AVC in 3gp and maybe it's because I mentioned time ago the adding in the Doom9 MP4Box page, maybe), and also because Atomic Parsley (one of the few program that can set 3GPP assets) is maniacally precise with the specifications complaints (if you use M4A%20 brand or mp42 or isom it doesn't allow 3GPP assets, only 3gp4,3gp5,3gp6 brands allow it), well I must say that I agree with Put_lock way to do (put_lock is the developper of AP).
So this is my short faq on how create 3GPP release 6 files (with AAC Plus audio) tagged with 3GPP assets.

1. First of all you must obtain an AAC Plus 2 (or 1) stream. I suggest to use Winamp (for the transcoding of file lying on your PC you can use or the transcoder plugin (http://www.winamp.com/plugins/details.php?id=146195) or megui). For the bitrate I use 32 kbps as I said above, but it's up to you. Anyway I strongly suggest to don't use anything above 64 kbps. For so high bitrate is better AAC-LC, because AAC Plus just reply the spectrum of the half rated file (and in some situation you can hear it, also with the poor headphones of a mobile phone).

2. Then it's time to mux the audio streams in the 3GPP file of course, to do that you must use the command prompt (I think that you could also use Yamb, if it still allows the brand setting in release 2.0). This is the command-line:

"C:\MyProgramFolder\MP4Box.exe" -no-sys -sbr -brand 3gp6 -ab 3gp5 -ab mp42 -add "C:\MyMusicFolder\MyRawAACPlusFile.aac" -new "C:\MyMuxed3GPPFile.iso"

Now two VERY important thing: the -sbr and NOT -sbrx must used as far as I know most of the mobile phone that support AAC Plus doesn't read the file if the sbr non backward compatible is used. Though they actually support AAC Plus! In fact in the changelog of the NeroAacEnc cli there's this phrase (in the 1.0.0.2 version):
" - neroAacEnc: Added backwards compatible signalling of SBR
and PS Audio Object Types (also when LC is used for encoding) for improved 3GPP Compatibility"
I'm not sure about what PS Audio Object Types means (the file created by that crappy encoder are crappy too, it creates terrible hint track info and it insert a void IOD without setting the audio profile, while the ObjectType Indication is a generic 0x40 used for MPEG-4 Audio. Anyway they have encountered mine same problem, the requirement of bc signalling of SBR.
An other important stuff, you must use an extension different than generic ones like .3gp .mp4 .m4a or MP4Box will overwrite our brand (and we don't want that this happens :)). The -ab options aren't necessary but if you use them you will conform to 3GPP suggested brand usage (the isom brand will be added by default).

3. We have almost finished it's time to tag the file. At the moment there are really few programs that allow it, QuickTime can tag only Mobile MP4 files and I've heard by put_lock that there would be an Helix project but I haven't ever seen it (I think that it would be just some library). So the only solution is Atomic Parsley (well, an optimal solution).
Atomic Parsley (https://sourceforge.net/projects/atomicparsley) supports all the 3GPP assets, and as you maybe know 3GPP specs allows album tags only with release 6 specs (anyway it doesn't bother us, at least my mobile phone doesn't read them, and anyway we HAVE created a release 6 complaint file).
You can see the AP (AtomicParsley) help page by typing "C:\AtomicParsley.exe" --3gp-help (general help: just type AtomicParsley at the bottom there are the other sub-page).
I'd like just to say an other think (that probably won't bother english speaking guys, but that could interest the others). 3GPP specs allows (just like it was allowed in the original ISO cprt box) to set more than one tag, with different language code. In my mobile phone this function is used and it will display the tags in this order (I presume, I must do extensive tests): MobilePhone setted language (in my case Italian), English, Others. So if I have three tags of wich one in Italian, one in English and one in Japanese it's displayed the one in Italian. If the Italian tag isn't avaible it will try reading the English if present otherwise it will display the tag without giving importance to the language code (I'm not sure about this last one, maybe some languages have higher priority); the funny thing is that one of the few players (the only?) that support this metadata doesn't respect this language setting rule, it just display the first tag (CrappyTime has also problem showing Unicode character like ®).
.
Anyway this is the command-line to use with AP (sorry, as far as I know no GUI uses the 3GPP options of AP, I've asked once to KurtNoise, but I think Yamb still doesn't support them).

"C:\MyProgramFolde\AtomicParsley.exe" "C:\MyMuxed3GPPFile.iso" --3gp-title "MyJapaneseTitleTag" lang=jpn --3gp-title "MyEnglishTitleTag" lang=eng --3gp-title "MyItalianTitleTag" --3gp-author "Author" lang=eng --3gp-album "Album" lang=eng --3gp-year 1995 --3gp-genre "Genre" --3gp-copyright "©" --freefree

There are also other tags, you can see them all in --3gp-help AP page as I foretold. Anyway the E-770 shows only 4 (as I foretold too):
title, author (artist), description, copyright.
But maybe your mobile phone is smarter than mine.
One more thing: I generally use the --freefree option coz I hate free boxes (a free box is a box that contains, generally, NULL chars in it, or that its contents is skippable. MP4Box writes in fact in his free box: "IsoMedia File Produced with GPAC 0.4.3-DEV ") I personally hate to have such insignificant overhead and I delete it.
If you don't like it too you need to set the default padding value (yes, it works as padding in program like ITunes that don't write all the file if it's present enough free space in the free box(es), AP uses the same mechanism if it's present enough free space, so the choiche is up to you, but considering that you'll store the file on a mobile phone it can be useful to reduce at the minimum the overhead, well metadata is superfluous too XD) to set it there are two solution:
1. You type :
SET AP_PADDING="DEFAULT_PAD=0"
each time that you open the prompt.
2. You go to the control pannel and create the new variable AP_PADDING and set its value to 0 (or anything else you like of course, default is 2046 if I'm right). The pannel of the variable is in the control pannel under "performance and maintenance" and "System", "Advanced". It's a button at the left bottom of the advanced table. Maybe the name are actually different, coz my Windows language is in Italian and I'm roughly translate them. If you don't find this table just tell me it, I'll reboot Windows in english and I'll take not of the precise location (sorry but I could take quite some day to answer in these days, but don't worry I'll answer to any question as soon as I can).
If you don't do one of this two steps you can also use --freefree but AP will add it default free space. If you use --freefree you'll rewrite the file, but if it's just a file of 1 or 2 MB it will take less than a 4 or 3 second (well, more or less, anyway it's a fast task).

So now you have just to change the extension to .m4a and transfer the file, I hope that you found this guide useful, anyway as soon as GPAC updates MP4Box to 3GPP6 this will become inutile (at least the part of the creation of a 3GPP6 file, the 2 step)!