我需要从屏幕的所需部分捕获视频,如 -
我试过了
...
try {
camera.unlock();
recorder.setCamera(camera);
recorder.setOrientationHint(cameraRotationDegree);
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
**recorder.setVideoSize(sz.width, sz.height);**
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
recorder.setOutputFile(fileName);
recorder.prepare();
recorder.start();
isRecording = true;
} catch (IllegalStateException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
但它会在屏幕上记录。
是否可以从屏幕的所需部分捕获视频?
答案 0 :(得分:0)