I was looking for a way to record in mpeg-4 with the ability to pause and resume but it seemed like there isn't one. So I decided to record in raw wave format and convert to .m4a. Is there a way I can convert .wav file to .m4a in android. I've looked around for mencoder port for android but found none, there were some post's about porting ffmpeg to android on linux but its not quite clear how i can use it in android to merge two .m4a files or convert .wav file to .m4a.
Like on a DVD where there's a normal audio track, and another audio track like commentary or a dubbed language. To do this with ffmpeg and two m4a files, use the command ffmpeg -i in-1.m4a -acodec copy out.m4a -i in-2.m4a -acodec copy -newaudio. The order of options is important, so don't mess with it.
Making the second file play immediately after the first. The easiest way to do this is to use a program designed for audio manipulation like SoX. It appears that there is a recent but unstable Android port of SoX.
If you want to do the concatenation strictly in ffmpeg, then you can do the following: