简体   繁体   中英

Find the MediaCodec supported video encoding resolutions under Jelly Bean MR2

Is there any way to get the MediaCodec video encoding supported resolutions under Jelly Bean MR2?

For lollipop we can use the new getVideoCapabilities() method to find out all the supported video resolutions. But for lower API levels couldn't find a way in the MediaCodec API.

I'm aware of the CamcorderProfile class available since API 8 which can give some hints of what the hardware might support , but to use the camcorder profiles to resolve the encoder video resolutions seems to be a guess game without consistency which could fail easily on many devices.

If it's listed in the CDD then you can assume it. If not, you have to try and see if it works.

The screenrecord tool uses a retry-on-error scheme to deal with cases where the video encoder can't record at the display resolution, because there was no way to query for it back then.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM