Packing RAW AAC into m4a container?

痴心易碎 提交于 2019-12-01 18:14:30

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/8414888/packing-raw-aac-into-m4a-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!