Background: My music library was originally encoded from CD's using iTunes a few years ago. I have several thousand files encoded as M4A (AAC) audio files, which I'd rather not re-encode. As a converted Linux enthusiast, I have been using SonGBird for a couple of years. Recently, a bug in some library or tool corrupted most of my M4A files, so they are not readable by many tools, although SonGBird can still play them. This prevents me from playing all the songs on my Android phone and from moving to some other Linux player, like Rhythmbox for example. ... Just to be clear, I have purchased all of these files. I am NOT trying to circumvent any protection schemes.

Problem: I need write a small tool that will:

  1. Parse the readable metadata and tag-info from my M4A files.
  2. Strip out broken, corrupted, or non-standard tags, frames, atoms, etc.
  3. Write back a clean, pristine, standards-compliant M4A file.

Question: What tool, library, or API do I use? How can I tell what is really wrong with the files that I have? I need the fixed files to play in all (most) M4A players. Example code would be much appreciated.

link|improve this question
feedback

migrated from stackoverflow.com Aug 11 '11 at 6:42

This question came from our site for professional and enthusiast programmers.

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown