How can I convert audio .m4a to .wav programmatically using MediaMuxer and MediaCodec? Is it possible?
Asked
Active
Viewed 1,097 times
1
naXa stands with Ukraine
- 30,969
- 16
- 175
- 237
-
1better way to use FFmpeg – Ashvin solanki Sep 17 '18 at 17:57
-
You have to decode your .m4a to pcm and add some header to product a .wav file https://stackoverflow.com/questions/21131595/convert-from-pcm-to-wav-is-it-possible – E.Abdel Sep 24 '18 at 08:44
1 Answers
0
You can use FFMPEG wrapper for it. Go to https://github.com/WritingMinds/ffmpeg-android-java link there is a working ffmpeg wrapper for Android. you can easily use it.
Then u can use below command to convert it .m4a to .wav
ffmpeg -i <path of inputSong.m4a> <path of outputSong.wav>
in the wrapper you don't need ffmpeg part. You need to replace it from -y. You can get those details when navigate to that wrapper
PushpikaWan
- 2,284
- 2
- 12
- 22