Change camera recording codec programmatically in Android

Uncategorized
I’m using the following code to record the camera in Android. How can I change the default codec (the default is H264) here?

Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
fileUri = getOutputMediaFileUri(MEDIA_TYPE_VIDEO);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the file

Sharing is caring!

Leave a Reply