user3051755
user3051755

Reputation: 1557

MediaStore.EXTRA_VIDEO_QUALITY not working good?

I'm capturing video using a camera intent and when I set image quality to high intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);, video size is 15 MB, while when I set image quality to low intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);, video size is 20 MB. Both videos last 10 seconds. I tested high and low quality more that 5 times, and each time result was the same.

On Android website it says:

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.

So is this a bug?

Also, after I stop recording video, I get option to Discard or to Save video. Whether I click on Discard or on Save, video is saved.

Does anyone know how to fix it, or at least how to remove it, because it's useless to click on Discard when it will save video anyway.

I tested it on Samsung Galaxy S3.

Upvotes: 3

Views: 3762

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007544

So is this a bug?

Quite possibly. Contact the developers of whatever camera app you are using for your testing and give them a reproducible test case demonstrating the issue. Note that there are hundreds, perhaps thousands, of camera apps for Android, and none of them are required to honor EXTRA_VIDEO_QUALITY.

Does anyone know how to fix it, or at least how to remove it, because it's useless to click on Discard when it will save video anyway.

Contact the developers of whatever camera app you are using for your testing and give them a reproducible test case demonstrating the issue. Note that there are hundreds, perhaps thousands, of camera apps for Android, and they each can handle their UI and data-saving how they see fit. In the particular case of videos, they pretty much have to write it to disk, because they will not have enough RAM for it; however, on a "Discard" they should clean up the recording, in theory.

Upvotes: 3

Related Questions