android-mediarecorder

Improve Audio Recording quality in android?

对着背影说爱祢 提交于 2019-11-29 08:20:57
I am using the MediaRecorder for audio recording in android. I receive very poor audio quality when I record. I checked iPhone recording, and it is very good, but in android I receive horrible sound. For sound recording I use: recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); recorder.setAudioEncoder(MediaRecorder.AudioSource.DEFAULT); recorder.setOutputFile(path); recorder.prepare(); recorder.start(); How do I improve Audio Recording quality? Try this one - recorder = new MediaRecorder();

Media Recorder To record calls is sometime unable to Record other side voice

北战南征 提交于 2019-11-29 01:38:55
In my application there is a feature to record voice calls and it works perfectly well. But when tested on (Samsung s7, s8 ) it doesn’t work well. The application is able to record only callers voice not the voice from the other end. Below is my code to check please suggest a solution MediaRecd = new MediaRecorder(); MediaRecd.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL ); MediaRecd.setAudioChannels(ConstantVariables.audioChannels);//monoRecording MediaRecd.setAudioEncodingBitRate(64); MediaRecd.setAudioSamplingRate(44100); MediaRecd.setOutputFormat(output_formats[pos]);//.mp3

Fix 3GP file after streaming from Android Media Recorder

ε祈祈猫儿з 提交于 2019-11-28 23:06:54
问题 I am trying to stream video from android camera through local unix socket and write file from stream to sdcard. Everything works fine, except file is not playable with any player. It's because Android not filling some gaps in the file because socket is not seekable. As I understand I need to make some modifications after video stream is over. I read several articles here, here and here, but none of them helped me. I am playing with hex editor to learn how to do it manually, so afterwards it

Get/modify frames while recording mp4 with MediaRecorder

五迷三道 提交于 2019-11-28 10:07:14
I am recording mp4 with the following code. But while I am recording, 1- is it possible get frames of video in real time in array Data or another format? 2- is it possible to modify frames? For example, to invert the colors and make it look negative. public class MainActivity extends Activity implements OnClickListener, SurfaceHolder.Callback { MediaRecorder recorder; SurfaceHolder holder; boolean recording = false; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager

How to add text on video recording?

强颜欢笑 提交于 2019-11-28 09:06:54
I search lot but not find any solution. My question is how to add text to video while recording so that we can get same text when we see video. I want something like this when i see capture video. Currently i am getting time and video sepratly. So issue is how to combine it.Any kind of help will be appreciated.Thanks in advance.. This is a pretty difficult problem to solve generally using android assuming that you are attempting to add the text to the actual video file, and not simply displaying a TextView over a VideoView . You mention that you currently have the time and video separately, so

MediaRecorder.stop() stop failed: -1007

跟風遠走 提交于 2019-11-28 06:48:14
I am recording video with MediaRecorder. My code works fine on 2.3.3 but fails on 4.0.3. The issue is following: the code mediaRecorder.stop() throws the RuntimeExeption java.lang.RuntimeException: stop failed. at android.media.MediaRecorder.stop(Native Method) with LogCat message 04-05 15:10:51.815: E/MediaRecorder(15709): stop failed: -1007 UPDATE I've found, that MediaPlayer reports an error (via MediaPlayer.OnErrorListener) almost immediately after the start. Error code is 100 (media server died), extra -1007. UPDATE 2 Code to prepare the MediaRecorder c = Camera.open(); ... // Step 1:

Error opening android camera for streaming video

浪子不回头ぞ 提交于 2019-11-28 06:46:50
问题 I'm trying to write video stream from my Galaxy Tab to server. according to this manual i should do something like this: frontCamera = getFrontCamera(); if((socket!= null)&&(frontCamera!=null)) { try { frontCamera.setPreviewDisplay(cameraPreview.getHolder()); } catch (IOException e1) { // TODO Auto-generated catch block Log.e("","",e1); } frontCamera.startPreview(); recorder = new MediaRecorder(); frontCamera.unlock(); recorder.setCamera(frontCamera); recorder.setAudioSource(MediaRecorder

Android Call Recording Incoming voice not getting recorded

人走茶凉 提交于 2019-11-28 04:10:59
I'm working auto call recorder app, I'm able to record voice call on below android 6 using MediaRecorder.AudioSource.VOICE_CALL , From android 6 not able to record voice call using VOICE_CALL . I managed to record using MediaRecorder.AudioSource.MIC but here incoming voice not getting recorded and I want to record voice call in normal mode not in speaker on mode. Please help me on this. (I had tried on Xiomi Redmi 4a(android 6),not working). myRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); myRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); myRecorder.setAudioEncoder

how to get frames of video file in android

怎甘沉沦 提交于 2019-11-28 02:26:32
I want to get the frames of a video file to show in a gallery view in android. and how to edit frames, for example Select frame sections use selected sections delete selected sections copy selected sections cut selected sections paste into the head paste into the tail You can use the MediaMetadataRetriever class. It has getFrameAt() method wherein you can specify the time of the frame that you want to get. For details refer to MediaMetadataRetriever Actually, MediaMetadataRetriever.getFrameAtTime uses microseconds as a parameter, not milliseconds. Once you make that change, you can get the

Android: Video recording output orientation flipped

别来无恙 提交于 2019-11-28 02:24:12
I have developed an app that can record video. When the recording starts the video is recorded in a rotated orientation. The video view while recording is flipped to the left. I cant figure out why its like that. Can someone help me with this issue. My codings are as follows: MainActivity.java: import android.app.Activity; import android.media.CamcorderProfile; import android.media.MediaRecorder; import android.os.Bundle; import android.os.Environment; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget.Button; import java.io.File