3

我试图录制视频,但它以非常低的分辨率录制。

我知道要设置视频分辨率,我会执行以下操作:

MediaRecorder recorder; recorder.setVideoSize(int width, int height);

好的,但我想获得设备支持的视频分辨率并设置为recorder.setVideoSize(int width, int height);

我知道我可以使用它,getSupportedVideoSizes()但实际上我不知道如何获取视频分辨率并做一些向我展示这些视频分辨率并选择然后将其设置为recorder.setVideoSize(int width, int height);

请帮助我,我已经尝试理解了很多!

4

1 回答 1

2

尝试以下代码段:

CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH);
recorder.setVideoSize(profile.videoFrameWidth, profile.videoFrameHeight);
于 2013-06-03T06:46:27.407 回答