上百度google好多次,好多说setVideoFrameRate(30)的,然而并没有什么卵用,再次感谢这位大锅:http://blog.csdn.net/huiguixian/article/details/29852661
先获取到这个玩意儿:
CamcorderProfile mProfile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH);
然后所有的参数都从mProfile获取,然后录制的视频就清楚了,copy一下上面网址的设置:
-
- mMediaRecorder = new MediaRecorder();
- mMediaRecorder.setCamera(mCamera);
-
-
- mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
- mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
-
-
- mMediaRecorder.setOutputFormat(mProfile.fileFormat);
- mMediaRecorder.setAudioEncoder(mProfile.audioCodec);
- mMediaRecorder.setVideoEncoder(mProfile.videoCodec);
- mMediaRecorder.setOutputFile("/sdcard/FBVideo.3gp");
- mMediaRecorder.setVideoSize(mProfile.videoFrameWidth, mProfile.videoFrameHeight);
- mMediaRecorder.setVideoFrameRate(mProfile.videoFrameRate);
- mMediaRecorder.setVideoEncodingBitRate(mProfile.videoBitRate);
- mMediaRecorder.setAudioEncodingBitRate(mProfile.audioBitRate);
- mMediaRecorder.setAudioChannels(mProfile.audioChannels);
- mMediaRecorder.setAudioSamplingRate(mProfile.audioSampleRate);
-
-
- mMediaRecorder.setPreviewDisplay(mHolder.getSurface());