解决方案 »

  1.   

    mMediaRecorder
    .setVideoSource(MediaRecorder.VideoSource.CAMERA);
    mMediaRecorder
    .setAudioSource(MediaRecorder.AudioSource.MIC);

    // mMediaRecorder
    // .setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
    // mMediaRecorder
    // .setVideoEncoder(MediaRecorder.VideoEncoder.H264);
    // mMediaRecorder
    // .setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
    // mMediaRecorder.setVideoSize(1920, 1020);
    // mMediaRecorder.setVideoFrameRate(15);//现象:在2.3上正常,4.0上报错,原因:每秒12-15帧之间足以表示运动,电视是30


    mMediaRecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH));
    mMediaRecorder.setPreviewDisplay(mSurfaceHolder
    .getSurface());
    String videoOutPath = Environment.getExternalStorageDirectory()
    + "/DCIM/"
    + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".3gp";
    mMediaRecorder.setOutputFile(videoOutPath);
    设置属性在API 8以上只需要setProfile,outputformat/encoder等不用设置了,我改成这样之后视频清晰度和大小就和系统的录制视频一样了
      

  2.   

     mMediaRecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH));
    只是多了这段代码,而且还使用的都是系统默认的格式