Camera icon indicating copy to clipboard operation
Camera copied to clipboard

Video: Bitrate/compression (quality) cannot be (directly) configured

Open Chealer opened this issue 1 year ago • 4 comments

Secure Camera 74 can record videos. The resulting files are compressed using a lossy codec/format like H.265 (which currently cannot be chosen). Unfortunately, the extent of that compression and the resulting quality cannot be controlled directly. At 1920x1080, videos taken on a Google Pixel 6 are stored in files which occupy about 2 MB/s, which is very large for most videos (casual/informal memories recorded by citizens). In other words, a 2-minute recording would require approximately 240 MB in this context.

Secure Camera should let users configure the size/quality tradeoff somehow, either with a potentially subjective Video Quality setting similar to the existing Image Quality, or with a bit rate setting to control the compression's aggressiveness. A setting for an average bitrate would satisfy me.

Android's stock application also lacks this. Open Camera is one alternative application which allows a fair control over bitrate (but which is unfortunately considerably more complicated than Secure Camera).

I strongly suggest to not only allow configuration, but to either:

  1. lower default quality*
  2. or prompt the user.

*: I very much suspect Google's choice of default bitrate/compression for Android is influenced by the services its offers (Google One charges >20 €/year to store up to 100 GB of data, and its opinion about optimal quality is therefore highly biased).

Chealer avatar Nov 29 '24 06:11 Chealer

Hi @Chealer,

There seems to be an existing feature request filed on CameraX's issue tracker for the same (https://issuetracker.google.com/issues/241151504)

We have bumped the above CameraX issue thread. We'll update our thread as and when we receive updates from the issue tracker.

Thanks a lot for trying out our camera app and reporting this issue!

MHShetty avatar May 24 '25 13:05 MHShetty

Hi @Chealer,

We've prepared the code changes necessary for implementing an option to specify the video bitrate while recording. The PR should mostly get merged a while after the porting work for Android 16 completes which is currently being actively prioritized. Will update this thread whenever the PR gets merged or if there's any update to be shared before.

Thanks a lot for trying out our camera app and filing this feature request!

MHShetty avatar May 30 '25 22:05 MHShetty

It is an honor @MHShetty , thank you very much to you for the detailed followup (and to CameraX developers).

Chealer avatar Jun 06 '25 20:06 Chealer

Thanks a lot for your kind words @Chealer!

It could take a considerable while for the Android 16 porting process to complete and for things to settle post that. Will update this thread once there's some progress on this feature request.

Thank you for your valuable time and support!

MHShetty avatar Jun 06 '25 22:06 MHShetty