mediarecorder

MediaRecorder failed when i stop the recording

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: 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 : surface = 0x189250 ( identity = 1813 ) 04 - 25 20 : 07 : 10.493 : E / MediaRecorder ( 18429 ): stop failed : - 1007 04 - 25 20 : 07 : 10.493 : D / AndroidRuntime ( 18429 ): Shutting down VM 04 - 25 20 : 07 : 10.493 : W / dalvikvm ( 18429 ): threadid = 1 : thread

How can I use a MediaRecorder object in an Angular2 application?

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm building a small Angular2 app and I'm trying to use a MediaRecorder object ( https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder ) like so: var mediaRecorder = new MediaRecorder(stream); However, TypeScript is telling me it cannot find name 'MediaRecorder'. I'm guessing this is down to my TypeScript configuration which I pulled directly from the QuickStart guide ( https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html ). The configuration looks like this: { "compilerOptions": { "target": "es5", "module": "commonjs"

android recording a video, initializing the camera

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: public class FulfillVideoTaskActivity extends Activity implements SurfaceHolder.Callback, OnInfoListener, OnErrorListener{ private Button initBtn = null; private Button startBtn = null; private Button stopBtn = null; private Button playBtn = null; private Button stopPlayBtn = null; // save Button should be implemented private TextView recordingMsg = null; private VideoView videoView = null; private SurfaceHolder holder = null; private Camera camera = null; private static final String TAG ="RecordVideo"; private MediaRecorder recorder = null;

MediaRecorder IOException: prepare failed

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use MediaRecorder to record voice, my code is: public void record(View v) { Log.d(TAG, "record"); this.mediaRecorder.setAudioChannels(1); this.mediaRecorder.setAudioSamplingRate(44100); this.mediaRecorder.setAudioEncodingBitRate(64000); this.mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); this.mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); this.mediaRecorder.setOutputFile(this.file.getAbsolutePath()); this.mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); try { this.mediaRecorder.prepare

Why show error IllegalStateException when setting MediaRecorder?

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My code setting MediaRecorder, it show error at row set Quality mMediaRecorder = new MediaRecorder(); // Step 1: Unlock and set camera to MediaRecorder mCamera.stopPreview(); mCamera.unlock(); mMediaRecorder.setCamera(mCamera); mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER); mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT); mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); mMediaRecorder.setProfile(CamcorderProfile .get(CamcorderProfile.QUALITY_HIGH)); mMediaRecorder.setAudioEncoder

Calling MediaRecorder crashes app in AndroidStudio

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to create a class that sets and starts audio recording but as soon as I click the button the app crashes. Iv isolated the problem to where I set the parameters for the MediRecorder. private void startRec() throws IOException { if (mrecorder!=null) mrecorder.release(); mrecorder= new MediaRecorder(); -> mrecorder.setAudioSource(MediaRecorder.AudioSource.MIC); /* mrecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mrecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); mrecorder.setOutputFile(MFILE); mrecorder

java.lang.RuntimeException: start failed at android.media.MediaRecorder.start(Native Method)

匿名 (未验证) 提交于 2019-12-03 00:50:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on records a phone calls. When i start a record a phone call then it's unfortunately stop. & it's gives error MediaRecorder start fail -2147483648. I Please tell me what is the problem in my code? Here is my Code. public class incomingcall extends BroadcastReceiver { Context c; MediaRecorder recorder; public incomingcall() { } @Override public void onReceive(Context context, Intent intent) { c = context; try { PhoneStateChangeListener pscl = new PhoneStateChangeListener(); TelephonyManager tm = (TelephonyManager) context

MediaRecorder.stop() hanging with Android 4.0 (ICS)

不羁的心 提交于 2019-12-02 23:56:10
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 over and over: W/CameraSource(YYYYY): Timed out waiting for incoming camera video frames: XXXXXX us Has anyone else seen this behavior? Any workarounds? We've been struggling for this issue for a long time too. We have just copied the code from android developer site for capturing video but the application hangs before mediarecorder.stop() is called

Android MediaRecorder录制播放音频

匿名 (未验证) 提交于 2019-12-02 23:49:02
1、请求录制音频权限 <user-permission android:name="android.permission.RECORD_AUDIO"/> RECORD_AUDIO 权限从6.0后需要进行用户授权,通过ActivityCompat.requestPermissions(); 2、创建运行MediaRecorder 2.1 设置音频源setAudioSource(int audio_source) ,多少情况使用MediaRecorder.AudioSource.MIC 2.2 设置输出音频文件格式 setOutputFormat(int output_format) *(Android 8.0 开始支持MPEG2_TS 格式) 2.4 设置音频编码器 setAudioEncoder(int audio_encoder) 2.5 通过完成初始化 prepare() 3 停止释放资源 MediaPlayer mediaPlayer=new MediaPlayer(); mediaPlayer.setDataSource(recordFile.getPath()); mediaPlayer.prepare(); mediaPlayer.start(); mediaPlayer.setOnCompletionListener(new MediaPlayer

webRTC convert webm to mp4 with ffmpeg.js

南楼画角 提交于 2019-12-02 21:08:11
I am trying to convert webM files to mp4 with ffmpeg.js. I am recording a video from canvas(overlayer with some information) and recording the audio data from the video. stream = new MediaStream(); var videoElem = document.getElementById('video'); var videoStream = videoElem.captureStream(); stream.addTrack(videoStream.getAudioTracks()[0]); stream.addTrack(canvas.captureStream().getVideoTracks()[0]); var options = {mimeType: 'video/webm'}; recordedBlobs = []; mediaRecorder = new MediaRecorder(stream, options); mediaRecorder.onstop = handleStop; mediaRecorder.ondataavailable =