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);
我有相同的代码,它工作正常。 – Lucifer 2013-04-23 13:16:11
@Lucifer你使用的是什么android版本?它是最新的4.2.2吗? – user1940676 2013-04-23 13:17:06
Android 2.3.3至4.0.4 – Lucifer 2013-04-23 13:17:28