android-mediarecorder

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

How to solve artifact issue with front camera video recording on some Android devices?

旧时模样 提交于 2019-12-13 19:41:59
问题 I am trying to programmatically record video from the front camera of an Android device. While most test devices I have, including the Nexus 4, Nexus 7, and the Samsung Galaxy S4, record the video correctly, some do not. For example, here's a screenshot of a segment of video recorded by a Samsung Galaxy S3: There are weird artifacts and colors, and the video does not seem to be centered (it is pointed at a person's face, which you can see is just barely visible in the shot). Here's my code: /

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) {

Android MediaRecorder making rotated video

℡╲_俬逩灬. 提交于 2019-12-13 14:36:41
问题 I've been trying to get MediaRecorder to work following the official example and although I am able to make a file it is rotated 90 degrees clockwise... Now I am trying this in portrait mode and have indeed rotated the previewsurface 90 degrees and locked it to portrait mode... I have no idea how to fix this and get a portrait oriented video and have tried the myriad of solutions related to this topic all to no avail... Code: public class CameraRecorder { private Camera cam; private

Working sample code for button.performClick()

元气小坏坏 提交于 2019-12-13 10:53:48
问题 Can someone please put a working code example of button.performClick() assigned to a OnClickListener . The following code which I have used returns false for button.performClick() - myButton.performClick() myButton.setOnClickListener ( new View.OnClickListener() { @Override public void onClick ( View view ) { ............. } }); 回答1: button.performClick() should be myButton.performClick(); then you should exec it after you register the OnClickListener for your myButton myButton

how to simulate app with media recorder(video) on avd(emulator)

依然范特西╮ 提交于 2019-12-13 05:43:04
问题 How to simulate video media recorder on android virtual device. I have tried to run an application that just capture videos with the guide:Building a Camera App http://developer.android.com/guide/topics/media/camera.html#custom-camera 回答1: I'm assuming you have basic knowledge of android and eclipse. You have to create an Android Virtual Device in Eclipse that supports Camera Input. Depending on your needs, you have to enable Front Camera and/or Back Camera. When you start your application

how to automatically record 30sec video and send via email in a single button click?

混江龙づ霸主 提交于 2019-12-13 04:02:32
问题 In this project first we have to save phone no and mail ID of a particular person.And an image button is placed.when the Image button is clicked once we need to get 30sec video and it directly send to the set mail id of that person Automatically. but we can't get these two actions in a single button click. Here we are using two buttons for these two further actions. so please help us to get these two actions in a single button click.. package com.example.attack; import java.io.File; import

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

Android Media Recorder Stop Exception

大憨熊 提交于 2019-12-12 15:57:47
问题 I am recording both video and audio from the android media recorder... I am checking the clip length, if less then 2 sec, delete it... But the problem is if i check the duration of file from file path, MediaRecorder throws exception everytime after once exception is thrown, even when i record audio of 10 seconds? But when i comment the code to check the duration of video created, it worsk fine... Following is my code if (prMediaRecorder != null) { try { prMediaRecorder.stop(); timer.cancel();

Android recorded aac(.mp3) file not playing in iOS

偶尔善良 提交于 2019-12-12 14:27:22
问题 Hi I'm using the following code to record audio on Android myRecorder = new MediaRecorder(); myRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); myRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); myRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); myRecorder.setAudioSamplingRate(44100); myRecorder.setAudioEncodingBitRate(256); myRecorder.setAudioChannels(1); voiceFileName = getFilename(); myRecorder.setOutputFile(voiceFileName); private String getFilename() { String