Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w (Read 13401 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Title should read: Hack of neroAacEnc.exe makes files that play on cell phone and auto head unit that only support "iTunes encoded only" m4a files.

My LG cell phones and JVC head unit only support m4a files that are "iTunes encoded only". They wouldn't play files made by neroAacEnc.exe. After this simple hack, the files do play.

I used a hex editor on neroAacEnc.exe v1.5.4.0 to replace four bytes. The encoder now enters "M4A " as the major brand in the file's beginning. This one change now lets my restrictive hardware play the Nero encoded files as if they were iTunes encoded files. I'm using foobar2000 v1.1.8 to do my encoding and tagging.

This is what I did:

The string to find and replace in "neroAacEnc.exe" v1.5.4.0:
" mp42 "
in hex:
"00 6D 70 34 32 00"

Replace the above string with:
" M4A  "
in hex:
"00 4D 34 41 20 00"

I've included the leading and lagging "00" for the search and replace because "mp42" appears twice; only the second appearance is to be replaced and it is the one that is preceded and followed by "00".

You can get a free hex editor here: http://mh-nexus.de/en/hxd/

You can get neroAacEnc.exe v1.5.4.0 here: ftp://ftp6.nero.com/tools/NeroAACCodec-1.5.1.zip
Although the zip file name seems to indicate version 1.5.1, it actually contains version 1.5.4.0.

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #1
I'm wondering whether its worth my effort coding a patcher for this.........................................
or not.

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #2
I'm wondering whether its worth my effort coding a patcher for this.........................................

Only if your patcher plays sweet demoscene music while doing its business. 
Creature of habit.

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #3
What a silly restriction… Considering that the fix is so simple and there’s obviously no actual differences between the files created by Apple’s encoder and others, what is this? A cynical piece of co-marketing?


Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #5
Do you mean completely replace the top hex with the bottom? In other words, the bottom hex values are to replace the top?

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #6
Short answer:
Yes.

Long answer:
In the 1.5.4.0 version of the file "neroAacEnc.exe", find the second occurrence of the string "mp42"; replace that string with "M4A " (that's M4A and a space).

The first occurrence of the string "mp42" is followed with "isom"; that's not the one to replace, leave it alone.

The second occurrence of the string "mp42" is followed by non-printing characters with the hex value of 00; that's the one to replace.

Only 4 characters are to be overwritten; the second occurrence of the string "mp42" is replaced with "M4A " (that's M4A and a space).

In hex, the characters "mp42" are: 6D 70 34 32. Replace those four with "M4A " (that's M4A and a space), which in hex are: 4D 34 41 20.

I recommend keeping a backup copy neroAacEnc.exe that you don't tamper with. In case this procedure goes wrong, you can start over.

Be care not to add or remove any other characters (only replace the original four with the new four). If the file is made longer or shorter, it will not execute.

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #7
Thanks for the guide, I had a problem with my Alpine car deck which doesn't play Nero AACs files. Unfortunately it did not solve my problem. I know that you tested a LG phone and a JVC head unit but I tried it as well for my head unit.

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #8
I wonder it was just an oversight rather than a conspiracy.


Most likely it was a "sanity check" routine making sure it was a valid MP4 file written by an engineer who either 1) did not have full knowledge of the MPEG-4 spec or 2) only tested with a limited set of files.

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #9
Thanks for the guide, I had a problem with my Alpine car deck which doesn't play Nero AACs files. Unfortunately it did not solve my problem. I know that you tested a LG phone and a JVC head unit but I tried it as well for my head unit.

Are you sure the hack went correctly? Is the ftyp now "M4A " in the file made by the hacked version of neroAacEnc.exe? You can check with the hex editor. Open your .m4a file with the hex editor and look at the first 32 bytes. Actually only the 9th, 10th, 11th, and 12th bytes are of major interest, but the whole 32 should be as follows:

The original Nero encoder writes this:
... ftypmp42....M4A mp42isom....
00 00 00 20 66 74 79 70 6D 70 34 32 00 00 00 00 4D 34 41 20 6D 70 34 32 69 73 6F 6D 00 00 00 00

The correctly modified Nero encoder writes this:
... ftypM4A ....M4A mp42isom....
00 00 00 20 66 74 79 70 4D 34 41 20 00 00 00 00 4D 34 41 20 6D 70 34 32 69 73 6F 6D 00 00 00 00

BTW, the iTunes encoder writes this:
... ftypM4A ....M4A mp42isom....
00 00 00 20 66 74 79 70 4D 34 41 20 00 00 00 00 4D 34 41 20 6D 70 34 32 69 73 6F 6D 00 00 00 00

The underlined section is the only change the hack makes happen. It changes "ftypmp42" to "ftypM4A[space]".

You can find more information about .m4a file header construction here: Atomic Parsley

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #10
Yes the hack went correctly and the values are now the ones you posted.

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #11
Yes the hack went correctly and the values are now the ones you posted.


Have you tested iTunes encoded files on your unit?

If they play but the modded Nero files don't, even though the first 32 bytes are identical, I don't know what could be the problem. Unless it's a tagging problem; what program does your tagging for you?

If iTunes files don't play, it looks like your unit just doesn't support .m4a files. Will it play plain unwrapped .aac files of any make?

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #12
My Alpine unit plays Apple AACs encoded files with no problem, it supports AAC. For Nero AAC conversion (and tagging) i use dbpoweramp or foobar, but with no success. The unit reads them as I see the song timing going on but with no sound, with both modified or unmodified Nero AAC encoder. It's probably my head unit then, I guess I'll stick with Apple AAC which is not a problem after all. It's just that I had a few Nero files encoded by some friends of mine.

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #13
I actually do wonder, why Nero hasn't updated the NeroAAC encoder lately.

Is the project dead, or are they still working on it? As I cannot use the Quicktime AAC encoder under Linux, I'm kinda stuck to using NeroAAC. Would be nice if that would still be actively developed, since it's still the best free AAC encoder for Linux.

There is no better alternative to my knowledge around. FAAC isn't on-par with NeroAAC or QuickTime yet.

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #14
As I cannot use the Quicktime AAC encoder under Linux

Wine + QuickTime/QT lite + qaac/qtaacenc ?

Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w

Reply #15
I actually do wonder, why Nero hasn't updated the NeroAAC encoder lately.

Is the project dead, or are they still working on it? As I cannot use the Quicktime AAC encoder under Linux, I'm kinda stuck to using NeroAAC. Would be nice if that would still be actively developed, since it's still the best free AAC encoder for Linux.

There is no better alternative to my knowledge around. FAAC isn't on-par with NeroAAC or QuickTime yet.


You could dual boot your system.

As for the NeroAAC I guess it is dead. Beforehand, it was far superior to iTunes AAC but I guess that is no longer true. The other option is to buy a Kenwood deck. I had a full GPS touch screen head unit I bought in 2008--sold with my last vehicle--that played everything, including FLAC. The downside was that it was 800+ USD.

My current car, a Nissan Cube LX, has a decent head unit and it has a USB input, which is where I play all of my music from. Same problem you guys are having. It will play aac, but not Nero aac. I would replace it with a GPS Kenwwod (not that I can even afford it these days), but it has a really good built in Bluetooth for my phone and comes with a factory Rockford Phosphate subwoofer. Not as nasty as my 2007 Tacoma with the Kenwood, six separates and a 10" Bazooka dual voice coil sub off of a 300wt alpine monoamp, but it's plenty loud and sounds plenty good so I can't justify the upgrade just to play more formats. I actually just went back to MP3 using VBR. I can't hear the difference in my car.