Encoding AAC Audio using AudioRecord and MediaCodec on Android

前端 未结 2 1590
既然无缘
既然无缘 2020-12-13 05:46

I am trying to encode aac audio using android AudioRecord and MediaCodec. I have created a encoder class very similar to (Encoding H.264 from camera with Android MediaCodec)

2条回答
  •  离开以前
    2020-12-13 06:22

    You can use Android's MediaMuxer to package the raw streams created by MediaCodec into a .mp4 file. Bonus: AAC packets contained in a .mp4 don't require the ADTS header.

    I've got a working example of this technique on Github.

提交回复
热议问题