According to this page https://developer.android.com/guide/topics/media/c ... I can send "to the camera" some instructions, such as:
MediaStore.EXTRA_OUTPUT - This is where you need to save the video. This setting is optional but strongly recommended. If you’re not intending to specify the intent’s Intent.getData () field. MediaStore.EXTRA_VIDEO_QUALITY - This is the smallest file size. MediaStore.EXTRA_DURATION_LIMIT - in seconds, of video being captured. MediaStore.EXTRA_SIZE_LIMIT - in video, be it captured.
I tried to use 1 of the parameters ( MediaStore.EXTRA_VIDEO_QUALITY ):
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0); startActivityForResult(intent, REQUEST_VIDEO_CAPTURE); and this is sooo weird parameter. First, it not only changes the resolution to the minimum, but also changes the resulting ratio to 4: 3. Secondly, the resulting 15 second image weighs ~ 300-500 kb, while its completely analogous brother without this parameter is 30 MB. This is an obvious bust.
I do not need 30 MB of video (because it has yet to be sent over the network, most likely more often via a mobile connection), but 0.3 MB is an obvious brute force. Parameter 0.5 is perceived by the camera as 0 (and this possibility is not described.
PS Yes, the video is already limited in time - 15 seconds.