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.)
Questions tagged [mediarecorder]
994 questions
35
votes
2 answers
mediarecorder api playback through Web Audio api (not audio element)
I'm having an issue getting a captured blob from the mediaRecorder api to playback in Chrome (it works in Firefox). Not sure if it's a bug in Chrome.
The error it reports:
undefined:1 Uncaught (in promise) DOMException: Unable to decode audio…
Nigel Skeels
- 359
- 3
- 5
34
votes
5 answers
CamcorderProfile.QUALITY_HIGH resolution produces green flickering video
I haven't found any explanation for this so far. Basically I have a video recording class which works splendidly when setVideoSize() is set to 720 x 480 on my Samsung Galaxy S2.
I want it to record in the highest possible resolution so using…
William Stewart
- 801
- 1
- 14
- 27
31
votes
2 answers
MediaRecorder failed when i stop the recording
I have this error. Can somebody please help me, I think it's something about touch listener... The error is happening when I release my finger.
04-25 20:07:00.263: D/FB Sessions(18429): false
04-25 20:07:04.533: I/MediaRecorderJNI(18429): prepare:…
SeemsIndie
- 520
- 1
- 4
- 14
29
votes
5 answers
how to change video orientation in MediaRecorder to portrait
When I record video by MediaRecorder, it always records in landscape mode, regardless of real device orientation.
How to force MediaRecorder/Camera use real orientation ?
Vladimir Berezkin
- 3,367
- 4
- 24
- 32
29
votes
6 answers
MediaRecorder.stop() stop failed: -1007
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…
Alex
- 1,279
- 3
- 15
- 33
28
votes
3 answers
Record video with a different preview size than the resulting video file
I am attempting to allow users to record video that is a different size than the actual on-screen preview that they can see while recording. This seems to be possible from this documentation concerning the getSupportedVideoSizes function which…
Daniel Smith
- 8,262
- 3
- 31
- 56
28
votes
2 answers
What does Android's getMaxAmplitude() function for the MediaRecorder actually give me?
The Android MediaRecorder has a function .getMaxAmplitude(); which, as the API tells me, "Returns the maximum absolute amplitude that was sampled since the last call to this method." but I can't find what amplitude this is? Is it in pascal or…
Lukas Ruge
- 2,044
- 3
- 25
- 41
26
votes
4 answers
How can I add predefined length to audio recorded from MediaRecorder in Chrome?
I am in the process of replacing RecordRTC with the built in MediaRecorder for recording audio in Chrome. The recorded audio is then played in the program with audio api. I am having trouble getting the audio.duration property to work. It says
If…
Tom Chen
- 338
- 1
- 3
- 8
23
votes
2 answers
MediaStream Capture Canvas and Audio Simultaneously
I'm working on a project in which I'd like to:
Load a video js and display it on the canvas.
Use filters to alter the appearance of the canvas (and therefore the video).
Use the MediaStream captureStream() method and a MediaRecorder object to…
dsing7
- 233
- 1
- 2
- 4
23
votes
6 answers
Android can't record video with Front Facing Camera, MediaRecorder start failed: -19
I have two different code bases with the same problem.
The first one is code copied straight from developer.android.com here:
http://developer.android.com/guide/topics/media/camera.html#custom-camera
The second one is this…
Madhava Jay
- 712
- 1
- 5
- 13
22
votes
9 answers
MediaRecorder.stop() hanging with Android 4.0 (ICS)
When calling stop() within my Video Capture activity, on occasion, the software will hang and will not come back to life. Only triggering an ANR by hitting "Back" will allow me to kill the activity.
Within the log, I see the following line repeated…
Adam
- 221
- 2
- 4
20
votes
2 answers
MediaRecorder issue on Android Lollipop
I'm testing libstreaming on new Android Lollipop, and this code that worked on previous release, seems to launch exception.
try {
mMediaRecorder = new MediaRecorder();
mMediaRecorder.setCamera(mCamera);
…
andreasperelli
- 962
- 2
- 9
- 35
19
votes
6 answers
How to know when MediaRecorder has finished writing data to file
We're using MediaRecorder to record video to a file on the external storage using setOutputFile() before doing the actual recording.
Everything works fine, but the main issue is that as soon as the recording is done, we want to start playing the…
Stefan H Singer
- 5,304
- 2
- 23
- 26
16
votes
1 answer
Android - Choosing between MediaRecorder, MediaCodec and Ffmpeg
I am working on a video recording and sharing application for Android. The specifications of the app are as follows:-
Recording a 10 second (maximum) video from inside the app (not using the device's camera app)
No further editing on the video…
Rohan Stark
- 2,156
- 6
- 15
16
votes
2 answers
Blob video duration metadata
I am writing a software that manipulates camera stream video in firefox.
I am generating a Blob with video type recorded with MediaRecorder API.
What i am doing to save the blob as video in local storage is using FileSaver library :
…
Valere
- 181
- 1
- 8