的Android设备不捕捉果冻豆4.2.2
看来,即使我的录像机配置文件设置为低,该视频是最高质量的低质量的视频。的Android设备不捕捉果冻豆4.2.2
这里是我的代码:
 camera.setDisplayOrientation(90);      camera.unlock(); 
     recorder.reset(); 
     recorder.setCamera(camera); 
     recorder.setAudioSource(MediaRecorder.AudioSource.MIC); 
     recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); 
     recorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_LOW)); 
//when removing these comments I get an exception on my 4.2.2 device when calling start() on the recorder. 
/*  recorder.setVideoFrameRate(24); 
     recorder.setVideoSize(480, 360); 
*/  
     recorder.setOrientationHint(90); 
     file = FileUtils.getFileName(FileTypes.VIDEO); 
     if (!file.exists()) { 
      try { 
       file.createNewFile(); 
      } catch (IOException e) { 
       e.printStackTrace(); 
      } 
     } 
     recorder.setOutputFile(FileUtils.getFileName(FileTypes.VIDEO).toString()); 
     recorder.setMaxDuration(45000); 
回答:
试试这个。虽然这看起来与您的代码相同,但它适用于我。为CamcorderProfile创建单独的实例并将记录器配置文件设置为此实例。
CamcorderProfile cprofileLow = CamcorderProfile       .get(CamcorderProfile.QUALITY_LOW); 
    recorder.setProfile(cprofileLow); 
    recorder.setOutputFile("/sdcard/videocapture_example.mp4"); 
    recorder.setMaxDuration(50000); // 50 seconds 
    recorder.setMaxFileSize(3000000); // Approximately 3 megabytes 
请你,你有一个高端设备(因为你是4.2.2)的通知,你可能会提供了一个很好的comparitively分辨率,它是在你的设备尽可能低的分辨率。
以上是 的Android设备不捕捉果冻豆4.2.2 的全部内容, 来源链接: utcz.com/qa/262489.html
