Discussion:
Encode Recorded data to AMR-WB with OPENSL.
Arveen Kaur
2018-07-16 06:46:38 UTC
Permalink
I'm developing an audio recorder app with OpenSLES on Android. I want to
encode the recorded PCM data to AMR-WB and save the encoded buffer in a
file for time being.

Can anyone help me with this?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1cd66b22-60a3-4a1a-b9cd-24d0df76b140%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Don Turner' via android-ndk
2018-07-17 10:41:15 UTC
Permalink
You will need to use a 3rd party encoder for AMR-WB. I have had some
success with FFmpeg in the
past. https://www.ffmpeg.org/general.html#VisualOn-AMR_002dWB-encoder-library

You may also want to check out the Oboe library (github.com/google/oboe)
which provides an easier to use API than OpenSL ES.
Post by Arveen Kaur
I'm developing an audio recorder app with OpenSLES on Android. I want to
encode the recorded PCM data to AMR-WB and save the encoded buffer in a
file for time being.
Can anyone help me with this?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/5ddcc2d4-0efa-44b1-8f17-8362bafde7af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Arveen Kaur
2018-07-18 08:33:31 UTC
Permalink
This page
http://developer.android.com/guide/appendix/media-formats.html
states "The table below describes the media format support built into the
Android platform"
and the table includes the AMR-WB encoder/decoder.
Then why do we require an explicit encoder/decoder library.

Regards,
Arveen
Post by Arveen Kaur
I'm developing an audio recorder app with OpenSLES on Android. I want to
encode the recorded PCM data to AMR-WB and save the encoded buffer in a
file for time being.
Can anyone help me with this?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/0712abab-d0e6-49c9-bc6b-524fb9406f49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Don Turner' via android-ndk
2018-07-18 16:20:16 UTC
Permalink
Good point, I hadn't spotted that.

In that case you should be able to use NdkMediaCodec
<https://developer.android.com/ndk/reference/group/media> to use the
built-in AMR-WB encoder. Here's an example for decoding
<https://github.com/googlesamples/android-ndk/tree/master/native-codec>.

---
Post by Arveen Kaur
This page
http://developer.android.com/guide/appendix/media-formats.html
states "The table below describes the media format support built into the
Android platform"
and the table includes the AMR-WB encoder/decoder.
Then why do we require an explicit encoder/decoder library.
Regards,
Arveen
Post by Arveen Kaur
I'm developing an audio recorder app with OpenSLES on Android. I want to
encode the recorded PCM data to AMR-WB and save the encoded buffer in a
file for time being.
Can anyone help me with this?
--
You received this message because you are subscribed to a topic in the
Google Groups "android-ndk" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/android-ndk/th6Hl8pzfgE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/0712abab-d0e6-49c9-bc6b-524fb9406f49%40googlegroups.com
<https://groups.google.com/d/msgid/android-ndk/0712abab-d0e6-49c9-bc6b-524fb9406f49%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAMksjJnj93aMVq_ergS4GN4%3D%3DPogkNCMZ3g3-VW%2BQb8wnnU2Ng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Arveen Kaur
2018-07-19 03:58:28 UTC
Permalink
Hi,

I can not want to use JNI in my application so using NdkMediaCodec
<https://developer.android.com/ndk/reference/group/media>, Do we have some
other method to achieve it.
Either by using AUDIOPLAYER/AUDIORECORDER provided in OPENSL.
I was able to do decoding of AMR-WB using the "AudioPlayer", but that too
with URI.
Still stuck how to go about encoding using OPENSL API's.

Regards,
Arveen
Post by 'Don Turner' via android-ndk
Good point, I hadn't spotted that.
In that case you should be able to use NdkMediaCodec
<https://developer.android.com/ndk/reference/group/media> to use the
built-in AMR-WB encoder. Here's an example for decoding
<https://github.com/googlesamples/android-ndk/tree/master/native-codec>.
---
7939 287199
Post by Arveen Kaur
This page
http://developer.android.com/guide/appendix/media-formats.html
states "The table below describes the media format support built into the
Android platform"
and the table includes the AMR-WB encoder/decoder.
Then why do we require an explicit encoder/decoder library.
Regards,
Arveen
Post by Arveen Kaur
I'm developing an audio recorder app with OpenSLES on Android. I want to
encode the recorded PCM data to AMR-WB and save the encoded buffer in a
file for time being.
Can anyone help me with this?
--
You received this message because you are subscribed to a topic in the
Google Groups "android-ndk" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/android-ndk/th6Hl8pzfgE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
<javascript:>.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/0712abab-d0e6-49c9-bc6b-524fb9406f49%40googlegroups.com
<https://groups.google.com/d/msgid/android-ndk/0712abab-d0e6-49c9-bc6b-524fb9406f49%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/91fa3946-d645-4ddd-85c8-cd3fb7e75400%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Don Turner' via android-ndk
2018-07-19 11:55:55 UTC
Permalink
Why would you need to use JNI? NdkMediaCodec is part of the NDK and since
you are already using OpenSL ES which is also part of the NDK you should be
able to achieve what you want using C++ alone.
Post by Arveen Kaur
Hi,
I can not want to use JNI in my application so using NdkMediaCodec
<https://developer.android.com/ndk/reference/group/media>, Do we have
some other method to achieve it.
Either by using AUDIOPLAYER/AUDIORECORDER provided in OPENSL.
I was able to do decoding of AMR-WB using the "AudioPlayer", but that too
with URI.
Still stuck how to go about encoding using OPENSL API's.
Regards,
Arveen
Post by 'Don Turner' via android-ndk
Good point, I hadn't spotted that.
In that case you should be able to use NdkMediaCodec
<https://developer.android.com/ndk/reference/group/media> to use the
built-in AMR-WB encoder. Here's an example for decoding
<https://github.com/googlesamples/android-ndk/tree/master/native-codec>.
---
Post by Arveen Kaur
This page
http://developer.android.com/guide/appendix/media-formats.html
states "The table below describes the media format support built into
the Android platform"
and the table includes the AMR-WB encoder/decoder.
Then why do we require an explicit encoder/decoder library.
Regards,
Arveen
Post by Arveen Kaur
I'm developing an audio recorder app with OpenSLES on Android. I want
to encode the recorded PCM data to AMR-WB and save the encoded buffer in a
file for time being.
Can anyone help me with this?
--
You received this message because you are subscribed to a topic in the
Google Groups "android-ndk" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/android-ndk/th6Hl8pzfgE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/0712abab-d0e6-49c9-bc6b-524fb9406f49%40googlegroups.com
<https://groups.google.com/d/msgid/android-ndk/0712abab-d0e6-49c9-bc6b-524fb9406f49%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1630b228-6346-41b8-8e37-6348c878b1c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...