仅使用 Apple API 将 AIFF 转换为 AAC
我正在使用 QTKit 中的 QTMovie 创建一个电影文件,一切正常。我遇到的唯一问题是生成的 MOV 文件中的音频只是原始 AIFF,因此文件大小比我想要的要大。我见过很多能够编码为 AAC 的第三方库,但是有没有我可以调用的 Apple API 来完成这项工作?我不介意在将 AIFF 添加到 QTMovie 之前将其转换为 AAC,或者将编码作为将 QTMovie 写入磁盘的一部分完成。
I am creating a movie file using QTMovie from QTKit and everything's working nicely. The only problem I have is that the audio in the resulting MOV file is just the raw AIFF hence the file size is larger than I'd like. I've seen plenty about third party libraries capable of encoding to AAC but are there any Apple APIs which I can call to do this job? I don't mind converting the AIFF to AAC prior to adding it to my QTMovie or having the encoding done as part of writing the QTMovie to disk.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这实际上可以使用 QTKit 轻松实现。我只需在调用 writeToFile:withAttributes: 时将 QTMovieExportType 设置为“mpg4”并将 QTMovieExport 设置为 YES 即可。
This was actually easily achievable using QTKit. I just needed to set the QTMovieExportType to 'mpg4' and QTMovieExport to be YES when calling writeToFile:withAttributes:.