Change camera recording codec programmatically in Android

  • Thread starter Android Central Question
  • Start date
A

Android Central Question

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
 

Forum statistics

Threads
943,200
Messages
6,917,761
Members
3,158,873
Latest member
cloudsofmana