Questions tagged [mediarecorder]

Mediarecorder is the Android class used for recording Audio and Video available since API Level 1. (For the Web-API, use the [web-mediarecorder] tag instead.)

994 questions
9
votes
2 answers

Android MediaRecorder Sampling Rate and Noise

I have an issue using Android's MediaRecorder to record sound from microphone to .m4a files (AAC-LC, MPEG-4 container). Starting from API level 18, the default sampling rate drops from 44.1 or 48 kHz (depending on device) to only 8 Hz. If I…
user4672580
9
votes
8 answers

MediaRecorder crashes on start

i've searched many topics but no straight answer. I have this code : recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); …
eric.itzhak
  • 14,702
  • 26
  • 83
  • 137
8
votes
2 answers

Android MediaRecorder in streaming

Its possible to "stream" result of MediaRecorder? The unique method i can see is mediaRecorder.setOutputFile that receives a FileDescriptor. So i can write the result to a File or send via socket to receiver. I tried the second solution but the…
8
votes
1 answer

How to change framerate when using MediaRecorder Class

I try to record video using MediaRecorder Class. However I find out that I failed to lower the framerate of the video stream. I'm using H.264 as my Video Encoder and AAC as my Audio Encoder(yes, it is supported in API LEVEL 10 and above, AKA Android…
Kevin Tong
  • 3,008
  • 1
  • 14
  • 12
8
votes
1 answer

MediaRecorder and VideoSource.SURFACE, stop failed: -1007 (a serious Android bug)

I'm trying to record MediaRecorder without using Camera instance but using Surface video source (yes it's possible, but it turned out that it's not that perfect) - mediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE); I just write what…
user25
  • 1,834
  • 1
  • 24
  • 47
8
votes
2 answers

MediaRecorder gives start error or IllegalStateException

I am using MediaRecorder for recording a video through Camera API of android. I am stucked with a very strange problem. private void startRecordingVideo() { recorder = new MediaRecorder(); …
Megha Maniar
  • 424
  • 5
  • 19
8
votes
4 answers

Couldn't hear incoming voice in recorded calls in android 7?

I am developing an Android app for recording calls. This is my code snippet. recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT); recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); …
8
votes
1 answer

stream a MediaRecorder file while recording

I am trying to get a video stream from point A (2.1 android phone) to point B (my server) in real time. How would I do it? Detailed below are my attempts (a little long, but concise!) The goal is to get an hour long video recorded with the phone…
user426957
8
votes
4 answers

How to trigger Vibration on Sound Input?

I am trying to create an android application where I filter one specific frequency of a beep and make the phone vibrate. I am taking input from the MIC of mobile and using MediaRecorder class, by using this class, I can record, save and play the…
Momo Pomo
  • 257
  • 1
  • 4
  • 19
8
votes
1 answer

how to mute the "beep" by MediaRecorder.start()?

I have tried all methods mentioned in the following links How to shut off the sound MediaRecorder plays when the state changes Need to shut off the sound MediaRecorder plays when the state changes but none of them work. Anyone knows how to achieve…
suitianshi
  • 3,224
  • 1
  • 13
  • 33
8
votes
3 answers

camera - preview changes after start recording video

I have custom full screen camera in landscape mode. Device size is 1024 x 600. Supported Preview Size List width x height 176 x 144 320 x 240 352 x 288 528 x 432 640 x 480 1024 x 576 1024 x 768 Supported Video Size List…
ella2964823
  • 107
  • 1
  • 9
8
votes
1 answer

Voice recognition fails to work when the voice is under recording

I am working on a function that when a button is pressed, it will launch voice recognition and at the same time will record what the user says. Codes as follows: button_start.setOnTouchListener( new View.OnTouchListener() { …
pearmak
  • 4,701
  • 15
  • 57
  • 117
8
votes
2 answers

Android mediarecording error start failed -19 runTimeException

I'm experiencing a problem with my mediarecording. I'm trying to use the front camera to recored. This gives me an error(but the preview is working). Whenever I use the back camera everything works just fine, I think this is very weird. What could…
8
votes
6 answers

Media Recorder start failed in android for camera

I am working on video recording app in which i want to display preview and when user click on record button it start recording and when user click stop button it stop recording. I got video preview on my surface but when i press start button it…
user1597878
8
votes
2 answers

MediaRecorder setVideoSize shows different behaviour in different devices

I am using media recorder to record video in an android app.…
Deepzz
  • 4,489
  • 1
  • 26
  • 52