<p>I am trying to join together several audio files into one mp4/m4a file containing chapter metadata.</p>

<p>I am currently using QTKit to do this but unfortunately when QTKit exports to m4a format the metadata is all stripped out (this has been confirmed as a bug by Apple) see <a href="http://files.shinydevelopment.com/audiojoiner.zip" rel="nofollow noreferrer">sample code</a>. I think this rules QTKit out for this job, but would be happy to be proven wrong as it is a really neat API for it if it worked.</p>

<p>So, I am looking for a way to concatenate audio files (input format does not really matter as I can do conversion) into an m4a file with chapters metadata.</p>

<p>As an alternative to code, I am open to the idea of using an existing command line tool to accomplish this as long as it is redistributable as part of another application.</p>

<p>Any ideas?</p>

[{'answer_id': 55038, 'author': 'amrox', 'author_id': 4468, 'author_profile': 'https://Stackoverflow.com/users/4468', 'pm_score': 3, 'selected': True, 'text': '<p><a href="http://audiobookmaker.sourceforge.net/" rel="nofollow noreferrer">Audiobook Maker</a> does something like this, and I believe it uses ffmpeg under the hood.  It\'s open source, so maybe its worth a look?</p>\n'}, {'answer_id': 69607, 'author': 'user10864', 'author_id': 10864, 'author_profile': 'https://Stackoverflow.com/users/10864', 'pm_score': 0, 'selected': False, 'text': '<p>Depending on where the bug is, you could try going straight to the QuickTime C APIs to write the movie file.  You might also try adding the chapters track using the C APIs.  </p>\n\n<p>Any word on when Apple will fix the bug?  I am planning to create enhanced podcasts with QTKit, and need this to work. </p>\n'}, {'answer_id': 151632, 'author': 'user10864', 'author_id': 10864, 'author_profile': 'https://Stackoverflow.com/users/10864', 'pm_score': 1, 'selected': False, 'text': '<p>I discovered these guys: <a href="http://www.sensoryresearch.net/thoughtconduit/dev?id=8" rel="nofollow noreferrer">sensoryresearch</a> who license an API for writing chapter/text/link tracks to MP4s (which is what an M4A is).  </p>\n'}, {'answer_id': 24188797, 'author': 'Tankman六四', 'author_id': 1758793, 'author_profile': 'https://Stackoverflow.com/users/1758793', 'pm_score': 1, 'selected': False, 'text': '<p>commandline tool mp4chaps does the work. It is from mp4v2-utils package if you use Ubuntu. Remember to specify qt format for quicktime, because Nero format chapter marks seems to be used less nowadays.</p>\n'}]
['https://Stackoverflow.com/questions/53705', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4496/']