HydrogenAudio

Hydrogenaudio Forum => Uploads => Topic started by: skt on 2006-06-01 04:10:36

Title: tool to "optimise" m4a so they stream correctly over a LAN
Post by: skt on 2006-06-01 04:10:36
Hi,

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)

[attachment=2255:attachment]
Title: tool to "optimise" m4a so they stream correctly over a LAN
Post by: HotshotGG on 2006-06-01 04:14:45
Sweet. Thanks for the upload