如何以编程方式将两个 aac 文件合并为一个?
我正在寻找 aac 音乐文件(iTunes 使用的东西)的 cat
。
用例:我的岳父不会碰电脑,除了他下载到 iPod 的有声读物。 我教了他一些 iTunes (Windows) 基础知识,但他的资料库一团糟。 事实证明,iTunes 针对收听播客和图书馆中的随机歌曲进行了优化,而不是针对有声读物。
我想编写一个脚本(最好是Python,但也适合其他东西)以正常的方式导入他的有声读物CD,将每张CD的曲目组合成可添加书签的aac文件(.m4b?),然后将其添加到iTunes所以它出现在有声读物部分。
我已经弄清楚如何与 iTunes 对话(Windows 中有一个 COM 接口,寻找 iTunes SDK)。 使用该界面,我可以使用 iTunes 将 CD 翻录为 aac 格式。 这是我遇到问题的 aac 文件的实际串联。 网上找不到合适的东西...
I'm looking for a cat
for aac music files (the stuff iTunes uses).
Use Case: My father in law will not touch computers except for audiobooks he downloads to his iPod. I have taught him some iTunes (Windows) basics, but his library is a mess. It turns out, that iTunes is optimized for listening to podcasts and random songs from your library, not for audiobooks.
I would like to write a script (preferably python, but comfortable with other stuff too) to import his audiobook cds in a sane fashion, combining the tracks of each cd into a bookmarkable aac file (.m4b?) and then adding that to iTunes so it shows up in the audiobooks section.
I have figured out how to talk to iTunes (there is a COM interface in Windows, look for the iTunes SDK). Using that interface, I can use iTunes to rip the CD to aac format. It's the actual concatenation of the aac files I'm having trouble with. Can't find the right stuff on the net...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我创建了一个名为“Chapter and Verse”的免费软件程序,用于将 m4a (AAC) 文件连接到带有章节标记和元数据的单个 m4b 有声读物文件中。
如果您已经使用 itunes(您说您已经)将 CD 翻录为 AAC,那么使用我的软件就可以轻松完成剩下的工作。 我就是为了这个确切的原因和场景而写的。 您可以从 www.lodensoftware.com 下载它
在尝试使用 SlideShow Assembler、QT SDK 和一堆除了其他命令行工具之外,我最终基于公开可用的 MP4v2 库构建了自己的应用程序。 文件的串联和章节的添加是使用 MP4v2 库完成的。
制作适合 iPod 格式的有声读物有很多细微差别。 信息很难找到。 使用 Apple 文档和开放库也有其自身的挑战。
祝你好运。
I created a freeware program called "Chapter and Verse" to concatenate m4a (AAC) files into a single m4b audiobook file with chapter marks and metadata.
If you have already ripped the CD's to AAC using itunes (which you say you have) then the rest is easy with my software. I wrote it for this exact reason and scenario. You can download it from www.lodensoftware.com
After trying to work with SlideShow Assembler, the QT SDK and a bunch of other command line tools, I ended up building my own application based on the publicly available MP4v2 library. The concatenating of files and adding of chapters is done using the MP4v2 library.
There are quite a few nuances in building an audiobook properly formatted for the iPod. The information is hard to find. Working with Apple documentation and open libraries has its own challenges as well.
Best of Luck.
与编程无关(嗯,有点。)
iTunes 已经具有将单个曲目翻录的功能(例如有声读物)。请查看:http://www.ehow.com/how_2108906_merge-cd-single-track-itunes.html
这解决了您眼前的问题,但我想人们可以保留讨论如何以编程方式完成它。
Not programming related (well, kinda.)
iTunes already has functionality to rip as a single track (e.g. an audiobook.) Check this out: http://www.ehow.com/how_2108906_merge-cd-single-track-itunes.html
That fixes your immediate problem, but I guess people can keep discussing how to do it programatically.
最强大的 Python 音频操作模块似乎是 Python 音频工具。 下载附带的 CLI 工具可能可以完成您想做的所有事情,甚至翻录,因此您甚至可以通过 shell 脚本来完成整个事情。 该模块本身也非常强大,并且具有一组方便的功能来操作音频文件。 如果您想坚持用 python 编写所有内容,那么在研究他们的 CLI 源代码后,您可能可以学到足够的知识来完成您想做的事情。 具体来说,他们有一个工具可以在任何编解码器中执行音频文件cat。 (它们确实依赖 FAAC/FAAD2 来获得 AAC 支持,但这对于您找到的每个库都是如此)
The most powerful Python audio manipulation module out there seems to be Python Audio Tools. The download comes with CLI tools that would probably do everything you'd want to do, even ripping, so you can even get by with shell scripting the whole thing. The module itself is also pretty powerful and has a handy set of functions to manipulate audio files. If you want to stick with writing everything in python, you can possibly learn enough to do what you want to do after studying their CLI source code. Specifically they have a tool that just does audio file cat in any codec. (They do depend on FAAC/FAAD2 for AAC support, but that'd be true for every library you'll find)
我还没有看到用于 python 的 aac 编解码器库,但您可以使用 wav 文件作为中间格式。
您可以将 CD 上的曲目作为 wav 文件提取,然后使用 wave 模块将它们连接成一个大文件,然后可以通过 itunes 将其转换为 aac。 由于数据的大小,这可能会大大增加您的处理时间,但这相当容易,并且您不需要任何外部库。
I haven't seen an aac codec library for python, but you could use wav files as an intermediary format.
You can pull the tracks off the cd as wav files, and then use the wave module to concatenate them into one large file, which could then be converted by itunes to aac. This may increase your processing time considerably because of the size of the data, but it would be fairly easy, and you don't need any external libraries.