dg428
dg428

Reputation: 441

Android Nexus 6 Camera ignoring EXTRA_VIDEO_QUALITY

I am calling the Camera on Nexus 6 like this:

Intent videoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
videoIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0); // Low Quality
videoIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(currentPath));
startActivityForResult(videoIntent, REQUEST_CODE);

But no matter what I set the value of MediaStore.EXTRA_VIDEO_QUALITY to be it always take a high quality video (a 5 second video is always about ~8 MB)

Other devices and camera apps work as expected, it only started to happen I think with the upgrade to Android 6.0.

I have tried the different values in CamcorderProfile too, and they don't make a difference.

Upvotes: 1

Views: 335

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007544

Other devices and camera apps work as expected

There are thousands of Android device models and hundreds of camera apps. I suspect that you have not tried them all. EXTRA_VIDEO_QUALITY is a hint, not a command. You cannot rely upon any particular camera app, whether pre-installed or installed by a user, to honor that extra.

I have tried the different values in CamcorderProfile too, and they don't make a difference.

CamcorderProfile is not used as part of ACTION_VIDEO_CAPTURE. If you are referring to using MediaRecorder directly, you might wish to open a separate Stack Overflow question, where you supply the code that you are using to configure the MediaRecorder.

Upvotes: 2

Related Questions