Encoder/Decoder PCM to AMR Android

2019-08-07 13:56发布

I've been looking for a while now for any java library that allows me to encode and decode a PCM-AMR audio stream that is sent through a TCP socket connection. Without having to use Android's JNI.

Is there anything that can help me?

In the worst case scenario. How can I do it using any C++ library with JNI? (any reference of how to use ffmpeg with JNI will be appreciated)

Hope you can help me.

1条回答
你好瞎i
2楼-- · 2019-08-07 14:35

Note that pcm usually means RAW and note encoded downstream of the microphone (hardware ) that generated the signal. amr-nb, amr-wb are encoded. So, i suggest that you resolve exactly what type of bytestream that you have on the socket..

Then, IMO , on android, ffmpeg libs provide robust , wide choice of TO/FROM Codecs and the way to convert.

See any of the main github [android-ffmpeg] projects, acouple of which are below:

guardian

halfninja

Its a bit of learn curve to sort thru all the JNI/Android stuff. IMO if you are doing low-level media stuff like this , you have little alternate to mastering JNI.

查看更多
登录 后发表回答