Answer the question
In order to leave comments, you need to log in
How to programmatically change the quality of the resulting video in android to medium?
According to this page https://developer.android.com/guide/topics/media/c... I can send "to the camera" some instructions like:
MediaStore.EXTRA_OUTPUT - This setting requires a Uri specifying a path and file name where you'd like to save the video. This setting is optional but strongly recommended. If you do not specify this value, the Camera application saves the requested video in the default location with a default name, specified in the returned intent's Intent.getData() field.
MediaStore.EXTRA_VIDEO_QUALITY - This value can be 0 for lowest quality and smallest file size or 1 for highest quality and larger file size.
MediaStore.EXTRA_DURATION_LIMIT - Set this value to limit the length, in seconds, of the video being captured.
MediaStore.EXTRA_SIZE_LIMIT - Set this value to limit the file size, in bytes, of the video being captured.
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);
startActivityForResult(intent, REQUEST_VIDEO_CAPTURE);
Answer the question
In order to leave comments, you need to log in
To record video from the camera, MediaRecorder
is used.
According to your link, this is described in the Capturing videos section.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question