Is there any way to record & edit audio files using ADPCM codec in Android?
Apart from AMR_WB & AMR_NB audio codec; which all other open/standard codec supported in Android?
You should look into Android official Documentation for this apart from that you can support many other formats in your app by compiling FFmpeg library
http://developer.android.com/guide/appendix/media-formats.html
Related
Hi i need to know everything about codec integration in android like list of codec with details and which one is best to use and how to use .(For audio and video call over internet )
You can see all supported codecs at official documentation
https://developer.android.com/guide/topics/media/media-formats.html
In our calls project wich used WebRTC we using OPUS codec for audio and H264 for video.
Android have native audio encoders and audio decoders, and you can record and play with this native formats without problems, but you also can implements your own audio codecs. I do not understood very well how to do it, anyone know an implementation of custom encode codecs in android platform? I'm trying do it with opus format for be more specific, but any other codec format implementation can give-me an idea of how I can do it.
You can use FFMPEG to endode/decode a lot of audio codecs.
see: https://stackoverflow.com/a/4820282/763394
also you can have a look to gstreamer framework: https://stackoverflow.com/a/5780113/763394
I want to know whether following media are supported natively in Android or not I am not sure about Audio/Video as I am not well versed with media formats, so please enlighten me on following formats. I had already referenced http://developer.android.com/guide/appendix/media-formats.html
WMA file (As per my knowledge not supported)
Flash Media only Audio H.264 MP4( I dont know much about flash but only this that we can play flash file in android 2.2+ using webview)
Quick Time only Audio H.264 MP4
Real Media
Regards
Saurabh
You can find the list of supported formats here:
http://developer.android.com/guide/appendix/media-formats.html
I have simplified my question and offered a bounty:
What options are there for compressing raw PCM audio data to a mp3 on a Android device.
My original post:
I'm creating a synthesiser on my Android phone, and I've been generating PCM data to send to the speakers. Now I'm wondering if I can encode this PCM data as a mp3 to save to the sdcard. The MediaRecorder object can encode audio coming from the microphone into various formats, but doesn't allow the encoding from programmatically generated audio data.
So my question is, is there a standard Android API for encoding audio? If not, what pure Java or NDK based solutions are there? And can you recommend any of them?
Failing this I'll just have to save my generated audio as a WAV file, which I can easily do.
Pure Java
Look into Tritonus's clean room implementation of javasound which offers an MP3 encoder plugin here: http://www.tritonus.org/plugins.html
Secondly, I would suggest looking into jzoom's libraries JLayer or JLayerME: http://www.javazoom.net/javalayer/javalayer.html (this may only be decode, not sure)
If those doesn't suit your need you can look at this article from 2000 about adding MP3 capabilities to J2SE (with source): http://www.javaworld.com/javaworld/jw-11-2000/jw-1103-mp3.html
Native route
If you want "native" performance I would look at an FFmpeg or Lame port for Android.
Lame: http://lame.sourceforge.net/
As far as i know you can't do this using only the tools in the SDK. According to the official developer guide there isn't an MP3 encoder in the platform (Android Supported Media Formats), so you have to port an encoder on your own using the NDK, then write some wrapper code to receive the audio samples through JNI.
I'm currently working on porting some audio decoders from the Rockbox project for my own music player, and it can record audio into MP3, so maybe you should try to look into it's source and find the encoder library. Most of the decoders have ARM optimalizations which speeds up things noticable, so i guess some of the encoders have also this addition.
Mp3 encoder is not available in android.you have to compile libav with mp3 lame lib you can find code from
http://libavandroid.wordpress.com
I'm looking for, either open-source or commercially available, Audio and Videl encoder & decoder for Android for an application I want to write for Android. For audio, I want to be able to both encode-decode the AMR/AD-PCM/AAC formats and for Video H.263/H.264 & MPEG4 formats.
I can see from Android documentation that encoding & decoding AMR-NB audio format is provided by the Android platform and for Video H.263 is provided. But, for rest of the codecs (both Audio & Video) that I've listed, decoder is there but not encoder (If I got it right).
Can anyone please help me in providing me with the pointers/suggestions for how/where can I find these codecs that are optimized/suitable for Android?
Thanks & Regards,
Harsha
Can anyone please help me in providing
me with the pointers/suggestions for
how/where can I find these codecs that
are optimized/suitable for Android?
Contact PacketVideo (authors of the OpenCORE multimedia engine), and be prepared to write a check for a very large sum of money.
Or, use the Native Development Kit (NDK) and transcode the video from a supported format to the one you want.
Or, use a server to transcode the video from a supported format to the one you want.