GrapheneOS / Camera

Modern camera app focused on privacy and security with QR & barcode scanning.
https://grapheneos.org/
MIT License
846 stars 86 forks source link

Viewfinder does not match recorded video with EIS enabled #238

Closed enchainingrealm closed 2 years ago

enchainingrealm commented 2 years ago

I am running Camera version 39 on a Pixel 2. To reproduce this bug:

In the recorded video, the subject is at the edge of the screen instead of the center. I except the viewfinder should always match the recorded video to prevent misleading the user while shooting.

thestinger commented 2 years ago

This is probably just how EIS works on that device.

enchainingrealm commented 2 years ago

Do you mean EIS is implemented via an Android API that GrapheneOS Camera calls? And thus it's out of scope for GrapheneOS Camera to fix this issue?

thestinger commented 2 years ago

We use the Camera2 EIS toggle. It's the standard Pixel implementation of EIS. You should try using Google Camera to see if the same behavior occurs. It's possible Google Camera uses a more advanced implementation though.

enchainingrealm commented 2 years ago

I do indeed get the same behaviour with Google Camera, although it's less severe because the maximum zoom is 5.0x in Google Camera. With a less zoomed-in view, there is less difference between the viewfinder and recorded video.

thestinger commented 2 years ago

Is the maximum zoom only 5x when EIS is enabled in Google Camera? It's possible they added an artificial limit to work around this issue, but that limit isn't implemented in the Camera2 API. I don't think we're going to add a workaround specifically for the Pixel 2.

enchainingrealm commented 2 years ago

In Google Camera, the maximum zoom for photos is 7.0x and the maximum zoom for videos is 5.0x, regardless of whether EIS is enabled.

thestinger commented 2 years ago

That seems like an artificial limitation they implemented in Google Camera since the Camera2 API still says the maximum zoom is 7x when video is added as a use case. I don't think we're doing anything wrong and it works.