Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android front facing camera is recording videos between 7.5 and 8.0 - setVideoFrameRate does not work - Samsung galaxy s2

I'm trying to record videos using the front facing camera, following is the code snippet, I'm setting the setVideoFrameRate to 29, but the recorded video is having the fps between 7.5 and 8. I need the video fps of the vidio recorded 29.

      recorder.setPreviewDisplay(holder.getSurface()); 
      recorder.setOnInfoListener(this); 
      recorder.setAudioSource(MediaRecorder.AudioSource.MIC); 
      recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); 
      recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); 
      recorder.setVideoFrameRate(29);
      recorder.setVideoSize(640,480);
      recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264); 
      recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); 
      recorder.setOutputFile("/sdcard/recordvideooutput.mp4"); 
      recorder.setMaxDuration(16*1000);
like image 440
user566502 Avatar asked Nov 17 '11 03:11

user566502


1 Answers

i was facing the same problem but finally got the solution Video record using front camera

like image 146
nvavadiya Avatar answered Sep 21 '22 09:09

nvavadiya