我正在尝试录制视频,但录制的分辨率非常低。
我知道为了设置视频分辨率我会做这样的事情:
MediaRecorder 记录器; recorder.setVideoSize(int width, int height);
好的,但我想获取设备支持的视频分辨率并设置为 recorder.setVideoSize(int width, int height);
我知道我可以使用 getSupportedVideoSizes()
获取它,但我真的不知道如何获取视频分辨率并做一些事情来显示这些视频分辨率并选择然后将其设置为recorder.setVideoSize(int width, int height);
请帮帮我,我已经试着理解了很多!
最佳答案
尝试以下代码段:
CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH);
recorder.setVideoSize(profile.videoFrameWidth, profile.videoFrameHeight);
关于android - 如何在 Android 上使用 getSupportedVideoSizes()?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16886713/