Hi, I am trying to record a video using the existing RsVideoRecord library, but it fails to record the video. I found the following java code and I need your help, to convert it to B4A using JavaObject.
The code is the following :
Thanks a lot
The code is the following :
B4X:
mediaRecorder = new MediaRecorder();
// mCamera will get it from Erel's Camera library ....
mediaRecorder.setCamera(mCamera);
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
mediaRecorder.setMaxDuration(-1);
mediaRecorder.setOutputFile(fileToSave.getPath()); // your file
mediaRecorder.setVideoFrameRate(10);//videoFramesPerSecond);
mediaRecorder.setVideoSize(320, 240); // or some other size
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT);
mediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());
mediaRecorder.setMaxFileSize(100000000); // size in bytes
mediaRecorder.prepare();
mediaRecorder.start();
Thanks a lot