Around two and a half years ago, AAC became my audio encoder of choice. iTunes had a good AAC Quicktime codec built in and the benchmark tests I read as well as audiophile reports, asserted that AAC was as good, if not better than LAME at high bitrate levels (read: 256 VBR -q0). So, the convenience of iTunes & AAC made me switch.
Scroll forward to 2006 and I now find myself having switched to the ‘tried and tested’ combination of OSX and iTunes. As you’ve probably read (or, maybe haven’t) from my previous blog entry, I’ve setup a VPN on my GNU/Linux server at home enabling to me to listen to my iTunes playlists wherever I have an internet connection. Now, today at work I wish to listen to an AAC file encoded a good few years ago with iTunes 4.6. Will it stream remotely? No, it will not. Argh! I tried another couple of AAC files I had encoded outside of iTunes, these didn’t work either. I tried a recently encoded iTunes 6 AAC file - this worked! I had initially thought it was Apple being pro-DRM again (*sigh*), however thankfully i was incorrect!
Let me explain; AAC files contain metadata. Lots of encoders appear to like placing the metadata at the end of the file - presumably because it makes the file easier to update. However, for streaming an audio file this is going to cause problems - can you see where i’m going with this yet? ;) If you have to read the entire stream before you can parse the metadata, what chance is there to start streaming the file? None.
No, the metadata has to go at the start of the file. You might be reading this thinking, ‘now i have to re-rip and encode my files..!!’, but you’d be wrong. There’s an excellent utility called ‘mp4creator’ which will overcome this slight problem for us. The source is available for UNIX OS’s, and I believe some Windows binaries have been compiled as well. These are available from Rarewares.
Once the program is compiled, you need to use this CLI argument to place the metadata from your existing audio file at the start of the AAC file:
mp4creator -optimize /path/to/file.m4a
or all-in-one - see attached binary
find . -name "*m4a" | xargs m4a_optimise
After this has been accomplished, try streaming the file within iTunes - impressed? I was! Hope that saves someone else some head-scratching when they encounter this problem!
October 12, 2006



















Sorry, no comments yet.