Supported video sizes MediaRecorder API android

限于喜欢 提交于 2019-12-12 03:24:25

问题


I'm trying to record the contents of the screen using mediarecorder and mediaprojection api. When I'm trying to change the video to HD on my device the recording fails but it works fine with 640 x 480 resolution. So my question is how could I get the supported video resolutions on a particular device? Cheers Jon


回答1:


If your only interest is in API 21+, you can use the getVideoCapabilities() method.

The CamcorderProfile class has been around since API 8, but isn't quite as useful.

If all else fails, use trial and error, testing each desired resolution and flagging the ones that don't work.



来源:https://stackoverflow.com/questions/33203242/supported-video-sizes-mediarecorder-api-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!