2013-04-23 1 views
2

비디오 레코더 프로파일을 낮게 설정 한 후에도 비디오 품질이 가장 좋은 것처럼 보입니다.Android 기기가 Jelly Bean에서 저품질로 비디오를 캡처하지 못합니다. 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); 
+0

나는 동일한 코드를 가지고 있으며 정상적으로 작동합니다. – Lucifer

+0

@ 루시퍼 어떤 안드로이드 버전을 사용하고 있습니까? 최신 4.2.2입니까? – user1940676

+0

안드로이드 2.3.3에서 4.0.4 – Lucifer

답변

2

이 시도 :

여기 내 코드입니다. 이 코드는 코드와 같지만 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 좋은 해상도를 얻을 수 있습니다, 그것은 당신의 장치에서 가능한 가장 낮은 해상도입니다.

+0

글쎄 그것은 저에게 효과가 없었습니다. – user1940676

관련 문제