google / jetpack-camera-app

Apache License 2.0
139 stars 26 forks source link

Preview freeze while capturing image at 60fps #190

Closed Zeronfinity closed 4 months ago

Zeronfinity commented 6 months ago

JCA version

1.0.0-rc01

Device

Pixel 7 pro

Steps to reproduce

  1. Set 60 FPS from settings (might need app restart to take effect)
  2. Capture an image

Expected

No preview freeze/lag for capture

Observed

Preview froze (stuck at same frame) during the capture

Remarks

Not sure, but probably related to a known CameraX issue of not copying repeating request FPS to non-repeating request. This can cause a session recreation due to default still capture template value being 30 FPS which can potentially have these kinds of effects.

0:com.google.jetpackcamera  f208:222357385634699ns:             REQ: output stream ids: 1
0:com.google.jetpackcamera  f208:222357385634699ns:             REQ:android.control.captureIntent: [VIDEO_SNAPSHOT]
0:com.google.jetpackcamera  f208:222357385634699ns:             REQ:android.control.aeTargetFpsRange: [30 30 ]
0:com.google.jetpackcamera  f208:222357488990754ns:                            RES:android.control.captureIntent: [VIDEO_SNAPSHOT]
0:com.google.jetpackcamera  f208:222357488990754ns:                            RES:android.control.awbState: [SEARCHING]
0:com.google.jetpackcamera  f208:222357488990754ns:                            RES:android.control.afRegions: [1714 1353 2366 1719 0 ]
0:com.google.jetpackcamera  f208:222357488990754ns:                            RES:android.control.aeTargetFpsRange: [30 30 ]
0:com.google.jetpackcamera  f209:222357734020686ns:             REQ: output stream ids: 0
0:com.google.jetpackcamera  f209:222357734020686ns:             REQ:android.control.captureIntent: [VIDEO_RECORD]
0:com.google.jetpackcamera  f209:222357734020686ns:             REQ:android.control.aeTargetFpsRange: [60 60 ]
0:com.google.jetpackcamera  f209:222357848951487ns:                            RES:android.control.captureIntent: [VIDEO_RECORD]

Recording

https://github.com/google/jetpack-camera-app/assets/34229687/77ead22b-a2d2-45e2-9f33-26455d8467ec

Zeronfinity commented 5 months ago

This has been fixed at CameraX side in https://android-review.googlesource.com/c/platform/frameworks/support/+/3061644

The issue should be fixed in JCA when the snapshot version is updated (tested manually with CameraX change ported to JCA).

temcguir commented 4 months ago

Verified this is fixed with the latest build of JCA. Thanks!