将 RAW AAC 打包到 m4a 容器中?
我有一个使用 FAAC 将原始 PCM 转换为原始 AAC 的 Android 应用程序,但现在我不知道如何将其打包到 m4a 容器中。
我在网上搜索了很多信息,但都没有解决我的问题。他们大多数都引用ffmpeg / mp4box命令行,但我需要的是在Android环境中解决这个问题,这意味着Java Eclipse或JNI。
有什么提示吗?
I have an Android app using FAAC to convert raw PCM into raw AAC, but now I don't know how it can be packed into m4a container.
I've searched on the net and found a lot of info, but none of them solves my question. Most of them referring ffmpeg / mp4box command line, but what I need is to solve this in Android environment, which means either Java Eclipse, or JNI.
Any hint please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这个 Github 上的 AACEncoder 项目 似乎很棒!
这对我有用。
它实际上具有将原始 PCM 波形文件编码为 AAC 原始文件的能力,然后将该原始 AAC 文件重新打包到 MP4(M4A) 容器中。
因此,如果您只是想将原始 AAC 转换为 M4A,这个类将是一个好的开始,不要忘记添加它的依赖项。
但对于那些想要在没有 FFMPEG 和 NDK 的情况下完成此任务的人来说,这绝对是一个不错的选择。
This AACEncoder Project on Github seems to be great!
And it works for me.
It actually has the ability encode raw PCM wave file into AAC raw file and then repack that raw AAC file into MP4(M4A) container.
So if you are just looking to convert raw AAC into M4A, this class will be a good start and dont forget to add its dependencies.
But its definitely a good choice for someone who wants do it without FFMPEG and NDK.
注意:哎呀,真的很抱歉,没有看到您需要仅 Android 环境的解决方案。但我保留我的答案,因为它可能对其他人有帮助。
我遇到了同样的问题,不是与 android 相关的,而是相同的 Raw AAC 问题,我在这个论坛上找到了答案。现在,我的 Rockboxed 便携式播放器可以读取从 FLV YouTube 视频中提取的 AAC 音轨。
但是我不知道如何批量转换。我不太懂命令行。
在 ffmpeg 中:
ffmpeg -i input.aac -codec:将output.m4a复制
到MP4Box中:
MP4Box -add input.aac#audio output.m4a
PS:您可能需要重命名您的文件,即。 MJBeatiT.aac 而不是迈克尔·杰克逊 - Beat It (remix2013).aac
NOTE: OOPS REALLY SORRY, DIDNT SEE YOU NEEDED AN ANDROID ENVIRONEMENT ONLY SOLUTION. HOWEVER I KEEP MY ANSWER SINCE IT MIGHT BE HELPFUL FOR SOME OTHERS.
I had same problem, not android related but same Raw AAC problem, and i found the answer on this forum. Now my Rockboxed portable player can read AAC audio tracks extracted from FLV YouTube videos.
However i don't know the hell how to batch convert. I'm not that much command line saavy.
in ffmpeg:
ffmpeg -i input.aac -codec: copy output.m4a
in MP4Box:
MP4Box -add input.aac#audio output.m4a
PS: you'll probably have to rename your files, ie. MJBeatiT.aac rather than Michael Jackson - Beat It (remix2013).aac