I have one question,
When I use the aurio recording on my program, it works fine, but when i try the video recording, my .3gp file is empty (0 bytes).
Can you please tell me why?
Here is a part of my code for the video recording which does not work:
protected void startRecording() throws IOException
{
mrec = new MediaRecorder(); // Works well
mrec.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mrec.setAudioSource(MediaRecorder.AudioSource.MIC); //Works well
mrec.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); //Works well with OutputFormat.THREE.GPP
mrec.setVideoSize(100, 100);
mrec.setVideoFrameRate(5);
mrec.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); // Works well
mrec.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
mrec.setOutputFile("/sdcard/test5.3gp"); //Works well with test5.mp4
mrec.prepare(); // Works well for the audio recording
mrec.start(); // Works well for the audio recording
}