mediarecorder

MediaRecorder.stop() stop failed: -1007

二次信任 提交于 2019-12-17 15:47:32
问题 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

Record 5 seconds segments of audio using MediaRecorder and then upload to the server

感情迁移 提交于 2019-12-17 13:28:11
问题 I want to record user's microphone 5 seconds long segments and upload each to the server. I tried using MediaRecorder and I called start() and stop() methods at 5 seconds time interval, but when I concatenate these recordings there is a "drop" sound between. So I tried to record 5 seconds segments using timeslice parameter of start() method: navigator.mediaDevices.getUserMedia({ audio: { channelCount: 2, volume: 1.0, echoCancellation: false, noiseSuppression: false } }).then(function(stream)

Record 5 seconds segments of audio using MediaRecorder and then upload to the server

倾然丶 夕夏残阳落幕 提交于 2019-12-17 13:27:17
问题 I want to record user's microphone 5 seconds long segments and upload each to the server. I tried using MediaRecorder and I called start() and stop() methods at 5 seconds time interval, but when I concatenate these recordings there is a "drop" sound between. So I tried to record 5 seconds segments using timeslice parameter of start() method: navigator.mediaDevices.getUserMedia({ audio: { channelCount: 2, volume: 1.0, echoCancellation: false, noiseSuppression: false } }).then(function(stream)

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

限于喜欢 提交于 2019-12-17 04:10:50
问题 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 the issue: Next code works only on some devices and works temporary on some devices after a recent device rebooting or doesn't work at all If it doesn't work ok MediaRecorder.stop() method fails with the next error E/MediaRecorder: stop failed: -1007

MediaStream Capture Canvas and Audio Simultaneously

℡╲_俬逩灬. 提交于 2019-12-17 03:39:12
问题 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 record the surface of the canvas and the audio of the original video. Play the stream of both the canvas and the audio in an HTML video element. I've been able to display the canvas recording in a video element by tweaking this WebRTC demo code: https:/

Camera2 MediaRecorder changes Frame Rate on Galaxy S9

拜拜、爱过 提交于 2019-12-13 17:31:00
问题 I am not able to get a constant framerate with the camera2 API using MediaRecorder on the Galaxy S9 front camera. Essentially I am using the example Project from https://github.com/googlesamples/android-Camera2Video but stripped it down to find the error. I removed the mTextureView and use only the mediaRecorder surface. Here are the relevant code snippets: @Override protected void setUpMediaRecorder() throws IOException { final Activity activity = getActivity(); if (null == activity) {

How to trigger Vibration on Sound Input?

老子叫甜甜 提交于 2019-12-13 12:26:29
问题 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 input. Now I need my mobile to vibrate whenever there is a beep/or any sound. The input is given by a wire to the Headphone jack of the mobile so I know that there is only one frequency being input. I have a button, Clicking which starts recording. I

Android Media Recorder causes device to lock after long periods of recording

柔情痞子 提交于 2019-12-13 00:28:29
问题 I'm currently using the Android Media Recorder to capture video from the camera prior to streaming it. I'm finding that if I continuously record content for long periods of time 45 minutes + the device eventually locks up and the following error is written to the logs continuously 03-12 12:09:26.430: E/Camera2-StreamingProcessor(128): onFrameAvailable: Camera 0: No free recording buffers, dropping frame Eventually the application will display the 'stopped responding dialog' and I can kill the

Why is MediaRecorder delaying the start of recording?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 22:23:26
问题 I have implemented a feature in my android app that records an audio file using mediaRecorder . It works fine but for some reasons skips the the first second of recording. I used the exact same code from the developer documentation so I don't understand why it would do that. I looked for an answer to this issue, I found few people with the same issue, but no real solution. Here's is my research: MediaRecorder class starts recording audio after slight delay MediaRecorder Silence at Beginning

AudioRecord and MediaRecorder Android parallele

倖福魔咒の 提交于 2019-12-12 21:42:02
问题 I have to use in my application and audiorecord MediaRecorder same time. One register my scripts and the other for displaying the sound input with the amplitudes of the input signal. My application crash when I use simultaneously but independently it works fine. So do you have a solution that I can use at the same time??? Trace logCat : 10-16 22:02:08.675: E/MediaRecorder(9007): start failed: -1 10-16 22:02:08.675: W/System.err(9007): java.lang.RuntimeException: start failed. 10-16 22:02:08