IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Guide: hack neroAacEnc to make files play on “iTunes encoded only” h/w, e.g. LG cell phone + JVC head unit. A simple hex hack, then files play
LCtheDJ
post Oct 6 2011, 17:55
Post #1





Group: Members
Posts: 108
Joined: 14-November 02
Member No.: 3778



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.

This post has been edited by LCtheDJ: Oct 6 2011, 18:03
Go to the top of the page
+Quote Post
mudlord
post Oct 6 2011, 18:19
Post #2





Group: Developer (Donating)
Posts: 805
Joined: 1-December 07
Member No.: 49165



I'm wondering whether its worth my effort coding a patcher for this.........................................
or not.
Go to the top of the page
+Quote Post
Soap
post Oct 6 2011, 19:35
Post #3





Group: Members
Posts: 1005
Joined: 19-November 06
Member No.: 37767



QUOTE (mudlord @ Oct 6 2011, 13:19) *
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. wink.gif


--------------------
Creature of habit.
Go to the top of the page
+Quote Post
db1989
post Oct 6 2011, 21:01
Post #4





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



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?
Go to the top of the page
+Quote Post
greynol
post Oct 6 2011, 21:12
Post #5





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



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


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
DDD4
post Oct 7 2011, 04:30
Post #6





Group: Members
Posts: 78
Joined: 23-December 07
Member No.: 49786



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

This post has been edited by db1989: Oct 7 2011, 11:04
Reason for edit: Was there any point to quoting the initial post at all, much less in its entirety?
Go to the top of the page
+Quote Post
LCtheDJ
post Oct 7 2011, 10:54
Post #7





Group: Members
Posts: 108
Joined: 14-November 02
Member No.: 3778



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.

This post has been edited by db1989: Oct 7 2011, 11:05
Reason for edit: no need to quote above post
Go to the top of the page
+Quote Post
Larson
post Oct 7 2011, 11:05
Post #8





Group: Members
Posts: 131
Joined: 27-March 09
Member No.: 68422



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.
Go to the top of the page
+Quote Post
benski
post Oct 7 2011, 14:39
Post #9


Winamp Developer


Group: Developer
Posts: 670
Joined: 17-July 05
From: Brooklyn, NY
Member No.: 23375



QUOTE (greynol @ Oct 6 2011, 16:12) *
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.
Go to the top of the page
+Quote Post
LCtheDJ
post Oct 8 2011, 00:23
Post #10





Group: Members
Posts: 108
Joined: 14-November 02
Member No.: 3778



QUOTE (Larson @ Oct 7 2011, 03:05) *
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

This post has been edited by LCtheDJ: Oct 8 2011, 00:43
Go to the top of the page
+Quote Post
Larson
post Oct 8 2011, 07:41
Post #11





Group: Members
Posts: 131
Joined: 27-March 09
Member No.: 68422



Yes the hack went correctly and the values are now the ones you posted.
Go to the top of the page
+Quote Post
LCtheDJ
post Oct 8 2011, 10:28
Post #12





Group: Members
Posts: 108
Joined: 14-November 02
Member No.: 3778



QUOTE (Larson @ Oct 7 2011, 23:41) *
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?
Go to the top of the page
+Quote Post
Larson
post Oct 8 2011, 11:20
Post #13





Group: Members
Posts: 131
Joined: 27-March 09
Member No.: 68422



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.
Go to the top of the page
+Quote Post
polemon
post Oct 8 2011, 11:44
Post #14





Group: Members
Posts: 144
Joined: 1-April 09
Member No.: 68578



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.


--------------------
-EOF-
Go to the top of the page
+Quote Post
lvqcl
post Oct 8 2011, 12:18
Post #15





Group: Developer
Posts: 3327
Joined: 2-December 07
Member No.: 49183



QUOTE (polemon @ Oct 8 2011, 14:44) *
As I cannot use the Quicktime AAC encoder under Linux

Wine + QuickTime/QT lite + qaac/qtaacenc ?
Go to the top of the page
+Quote Post
DDD4
post Oct 8 2011, 21:03
Post #16





Group: Members
Posts: 78
Joined: 23-December 07
Member No.: 49786



QUOTE (polemon @ Oct 8 2011, 05:44) *
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.

This post has been edited by DDD4: Oct 8 2011, 21:05
Go to the top of the page
+Quote Post

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: 25th July 2014 - 11:33