Skip to main content


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: tool to "optimise" m4a so they stream correctly over a LAN (Read 2381 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

tool to "optimise" m4a so they stream correctly over a LAN


I use FAAC to create m4a files and various command line tools (eg mp4tags) to manage my tags. Although the files play fine in iTunes, VLC, mplayer, and so on, I found that they couldn't be streamed over a LAN to other iTunes or Soundbridge clients (using mt-daapd or iTunes) because these tools write the order of the atoms within the m4a files 'incorrectly' (i.e. moov atom after the mdat atom).

Up until now, I've been using aacgain to fix the atom order for me. This was taking WAY too long after a batch tag change because aacgain renormalises the sound levels and you can't turn this slow function off.

I wrote this short kludge in C to check the atom order and to fix in-place if wrong.... I've compiled under FC5 / Linux but it should work OK under other systems if you can manage to compile it.

As an example of usage, you can use the tool to check and fix your entire collection as per...

find . -name "*m4a" | xargs m4a_optimise

The programme comes with no guarantees, no responsibility taken if you accidently hose your collection. I suggest you only work on backups of your collection. etc etc etc.

Enjoy and I hope some of you find it useful. (Two versions of the code in the attached zip - one with CR/LF for windows users, the other without for Linux users)



tool to "optimise" m4a so they stream correctly over a LAN

Reply #1
Sweet. Thanks for the upload 
budding I.T professional