android 录制视频清晰度问题

时间:2023-01-31 21:10:48
不需要过多设置 
//next codes is right for 2.3 and 4.0           mMediaRecorder=new MediaRecorder();           //设置视频源           mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);           //设置音频源           mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);                    //相机参数配置类        CamcorderProfile cProfile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH);         mMediaRecorder.setProfile(cProfile);         //设置录制的视频帧率,注意文档的说明:           mMediaRecorder.setVideoFrameRate(30);            //设置输出路径           mMediaRecorder.setOutputFile("/sdcard/Document/data/"+ currentTemp + "/" + currentXml + "/"+System.currentTimeMillis()+".mp4");         //设置预览画面           mMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());