I’m working on an app that can record a video with the camera and then upload that video file to somewhere. I’ve noticed that on my own phone the camera has support for super huge resolution, so the video files end up being something like 3840x2178 which is nice, but this means that it takes sooo long to upload and it consumes a huge amount of data. I think 1920x1080 (or whatever the ratio is) would be enough to call it high quality.
The issue in getting a smaller video resolution is that the only way to control the video quality is by specifying a quality parameter which is between 0 and 1. So I can’t specifically say that I want this or that resolution - I’ve checked the APIs in both Android and iPhone and I’ve drawn the conclusion that it’s just not as simple as improving the Cordova plugin…
My approach now is to check what is the maximal resolution that is supported by the camera and judging from this I can specify what the quality parameter should be. For example, if the best resolution is 1280x720 then I will go with quality = 1. If the best resolution is 3840x2178 then I will go with quality = 0.5 or something.
Does this sound like a good approach or is there something smarter I can do?