change video playback rate in android - android

i am developing a video recorder which should change the frequency and pitch of the sound only. video should play with the same rate. I used the Soundpool library to change rate of sound in android but it says it only works for audio files. Meanwhile for video recording i am using Mediarecorder library. I used setAudioSamplingRate but it just alters the frequency not pitch of sound. Can you tell me the solution.
Regards

Related

How to reach 30fps on recording audio and video using MediaCodec MediaMuxer on android?

I would like to record 1920x1080p, H264 video from camera and audio from mic. I started with the sample code. This only gets 15fps at the max.
https://github.com/saki4510t/AudioVideoRecordingSample
Another sample code can reach 30fps without audio.
https://github.com/google/grafika "Show + capture camera"
I am running Android 5.1, on which MediaRecorder can record AV at 30fps. But I have to access the video data before muxer.
I guess it is related to timestamp on both video and audio. I was able to reach 26fps with AV out of sync.
Any suggestions on 30fps on AudioVideoRecordingSample?

Android: Record raw audio and record video at the same time

I develop an Android app based on sound and video records. I would like to get a real-time playback of the mic audio in the headphones while previewing AND capturing the video and sound.
What i have now, working fine alone:
1) use Superpowered library to record audio and playing it back in real-time (during preview and record). Behind the scene, it does directly with C++ the work of AudioRecord by pushing the buffer to the output (headphones). The goal is to apply audio effects on the raw sound in real-time.
2) capture the video with mediaRecorder
When audio playback is running, I try to launch the video record, it crashes starting :
E/MediaRecorder: start failed: -2147483648
I imagine that i can't launch two recording process at the same time. I think using the AudioRecord or Superpowered lib is the good way to process the raw audio, but I can't figure out how to record video without conflicting with the current audio recording.
So is there a way to achieve my feature?
(minSdk 16)
According bigflake
The MediaCodec class first became available in Android 4.1 (API 16). It was added to allow direct access to the media codecs on the device.
In Android 4.3 (API 18), MediaCodec was expanded to include a way to provide input through a Surface (via the createInputSurface method). This allows input to come from camera preview or OpenGL ES rendering.
So if it's possible please think about increasing MinSDK to 18 and use AudioVideoRecordingSample or HWEncoderExperiments as examples.

How to implement Audio Record Quality in android?

I am working on an Android project in which I want the same functionality as the Android native audio recorder. Specifically the sound quality option. I can't use the native recorder, so I'm recording audio using the AudioRecord class. How do I process the data coming from the AudioRecord class for the quality? Application has three quality defined which I need to implement:
Low - records will have only high pitch sounds,
Medium - records will have some of background sound,
High - everything that reaches at microphone Will be Recorded.
Please suggest some way to do it.

Re-sampling audio alters the speed

I need to mix audio files with different sample rates. I'm trying to change the sample rate of all the audio files to say 44100Hz. But when I re-sample the audio files, the speed of the original audio is altered (becomes slow). Is there a way to re-sample the audio without altering the speed? I'm using the following function to re-sample the audio file.
http://code.google.com/p/musicg/source/browse/src/com/musicg/dsp/Resampler.java
When you play the resampled audio you should play it with the new sample rate. You may be using the resampled audio at a faster sample rate.

Reduce the background noise when recording in android

I have developed a app which record the sound & play at same time approximate 100ms delay by using audio track & audio record class in android. But the played audio have lot of background noise. So there is any way in android to reduce the background noise while playing.
Please don't tell me used to Audacity Software for reduce the noise because i am not saving the recorded audio. I am just save it in a buffer & play this buffer by audio track.Cab be implemented a filter to reduce the background noise in android using NDK.
The simple thing to do is play the audio back using the voice setting. It will filter out most of the "hum" noise. AudioManager.STREAM_VOICE_CALL. You can use the NoiseSupression filter if available. NoiseSuppressor.create(device.getAudioSessionId());
You can use ClearRecord application. It is free. You can play audio with noise reduction on. While playing audio, the background noise gets eliminated and clear one can hear clear sound.

Categories

Resources