How to record video and audio with MediaCodec and MediaMuxer
问题 I am able to record(encode) video with the help of MediaCodec and MediaMuxer. Next, I need to work on audio part and mux audio with video with help of MediaCodec and MediaMuxer. I am facing two problems: How to encode audio with MediaCodec. Do I need to encode audio and video in separate threads? How can I pass audio and video data to MediaMuxer (as writeSampleData() method takes only one type of data at a time)? I referred to MediaMuxerTest but it is using MediaExtractor. I need to use