Does Android supports recording through OpenMAX AL APIs? - android

I have been trying to record audio/video on Android device and play it back using Open MAX AL APIs.
So far, audio playback part works smoothly. I referred native-media example to play mp4 file from the SD card using Media Player object. Before trying video playback, I started exploring audio recording.
While trying recording, I realized that Engine::CreateMediaRecorder returns SL_RESULT_FEATURE_UNSUPPORTED.
Does that mean, Android does not support recording through OpenMAXAL APIs?
This link partially talks about some of the features except Media Recorder. Where are the Android supported features of OpenMAXAL documented?

Yes, it is not supported. Please refer this reply from Glenn Kasten.

Related

Android media controller doesn't play sound for iOS recorded videos

I am currently developing a video streaming feature for one of my android apps. I am using android media framework for the purpose. Videos are streamed from an nginx server. Android recorded videos works fine but iOS recorded videos plays only the video not the sound.
It happens because the android support limited codecs in-built like mp3,mp4,mpeg.
While iphone support most of codecs.
What is the way to resolve this?
MP4 for video and MP3 for audio are widely accepted and work on both platforms.
So you need do some stuff at the server. Implement the ffmpeg library that will convert all the videos to MP4 and audio to MP3.
We are doing same mechanism to resolve this issue.
Some more information to understand the problem
Refer stackoverflow answer here
Hope This may help you to get the rid of your problem
Happy Coding!

Android custom audio player to replace MediaPlayer with libPd or OpenSL ES or AudioTrack

I have already developed Streaming Audio application using MediaPlayer API. All the features are works fine, expect it takes more time to start the playback (buffer time is more).
i want to add recording live audio stream(save the live stream data in disk, not the recording from MIC). as MediaPlayer does not provide any API to access the raw data stream, i am planning to build custom audio player.
i want to control the buffering time, access to the raw audio stream, should able to play all the audio format which are supported in android natively. which api (libPd or OpenSL ES or AudioTrack) will be suitable to build the custom audio player in Android?
In my experience OpenSL_ES would be the choice, here there is a Link that explains how to do audio streaming that you may find useful. bufferframes determines how many samples you will collect before playing, so smaller bufferframes faster response time, but you have to balance that with your device processing capabilities.
You can record with libpd (pd-for-android) too.
All the recording process is managed by libpd.
Check the ScenePlayer project, it uses libpd and lets you record audio into a folder on sdcard:
https://github.com/libpd/pd-for-android/tree/master/ScenePlayer

Does Android support slow-motion video playback?

I need to make video player on Android that is able to play in slow motion and with different playback speeds. I still cannot find a native API or some code to do this. Does Android 2.2 - 2.3 support to video slow-motion and can we control the video playback speed?
Yes, from API 23 android has PlaybackParams class .It supports adjustment of playback speed of video briefly given here .
You can try exploring libVLC for this. VLC player for Android is almost due. Check their website.
Check this thread that discusses how you do it.. http://forum.videolan.org/viewtopic.php?f=14&t=89296
libVLC developer documentation here with normal playback sample. You need to modify this sample to play the video frame by frame or slow down the frame rate.

Audio Android.Mixing a song and a voice recorded!

I am developing a karaoke app and i have been dealing with audio from android.I want an opinion on how can i save a single song from a voice recorded and another song playing in the background.
Thanks
You can try FFMPEG Library for Android, consider using android wrapper. There are several SO answers of help
Audio song mixer in android programmatically
How to overlay two audio files using ffmpeg
FFmpeg on Android
You may want to check amerge and amix ffmpeg filters based on your needs
SoundPool is a good option if requirements can be met just by playing two audio streams together.
SoundPool can also manage the number of audio streams being rendered
at once. When the SoundPool object is constructed, the maxStreams
parameter sets the maximum number of streams that can be played at a
time from this single SoundPool.
Also note Android - Lollipop version now supports multi-channel audio stream mixing
Multi-channel audio stream mixing means professional audio
applications can now mix up to eight channels including 5.1 and 7.1
channels.
Multi-channel support
If your hardware and driver supports multichannel audio via HDMI, you
can output the audio stream directly to the audio hardware.
Unfortunately, I don't think there's an "On device" way to combine two audio files into one. The best you can do is play both at the same time from what I've read.
See Sound Pool Documentation

Adding video codec to Android

Can someone please explain the steps I need to take in order to add a
new codec to Android?
Also, I would like the codec to be installed as part of an application
installation (or first launch) and NOT as part of a full Android OS
build.
The reason I want to do this is that I have an application that needs
to show a video of a non supported codec (HLS or TS), but I wouldn't
want to build a full blown video player - just integrate with the
existing, built-in, player.
Thanks,
Alik.
Can someone please explain the steps I need to take in order to add a new codec to Android?
Build your own firmware, or build your own media player (like VLC for Android).
Also, I would like the codec to be installed as part of an application installation (or first launch) and NOT as part of a full Android OS build.
That is not possible, unless you build your own media player.
The reason I want to do this is that I have an application that needs to show a video of a non supported codec (HLS or TS), but I wouldn't want to build a full blown video player - just integrate with the existing, built-in, player.
VLC for Android is due out (at least for some phones) shortly, so it may be able to play your format.
I think it maybe possible to add custom codec(though I have not tried) by referring to the android developer page Adding custom codec to android.
You can try out adding your codec through openMAX IL layer then call up the android media player to play it(I believe vlc has done in this way but uses its own player). The awesome player, the android default player, just fetch a list of codecs available through openMAX API and if there is a codec, it plays. So it is worth to try adding your codec during initialization of your app, and call up media player.

Categories

Resources