- Home /
Get device's maximum video resolution? (360 VR project)
Hello,
I am currently working on a Google Cardboard 360 video project for android and iphone using EasyMovieTexture. The application is mostly done, however we would like to play the best possible video the device can render, and so far haven't found a way to do so.
I've tried checking the device's resolution, openGL's max texture size, the available video memory, but none of these values seem to tell me wether the video can be played or not.
I have tried playing the same .mp4 h264 on two phones outside of unity, with the same resolutions (a Galaxy s4 and a Honor phone, both 1920 x 1080), and the Honor one could play 1440x1440 videos while the s4 could only go up to 1080x1080 (square resolutions are necessary for the VR project).
For now we let the user choose a resolution at the start of the experience, but it is far from optimal. Do you know a way to solve this problem?
Thank you for your time.
Do you have a solution for this? I'm looking for the exact same thing...
Answer by Grako · Oct 20, 2017 at 12:09 PM
@Backlight How about simply playing a video file and if it gets an error you try lower resolution?
I just got such error on iOS from MediaPlayerCtrl:OnError(MEDIAPLAYER_ERROR, MEDIAPLAYER_ERROR):
"[prepareAsset]Error: Item cannot be played"
Or you check if the video progresses.
Answer by cdr9042 · Dec 19, 2019 at 09:59 AM
you might have to write a plugin to get the information using MediaCodecInfo.VideoCapabilities https://developer.android.com/reference/android/media/MediaCodecInfo.VideoCapabilities