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
 

Trending Posts

Forum statistics

Threads
943,468
Messages
6,918,978
Members
3,159,032
Latest member
Sam_274