Recording with FPS 60 cannot be stopped

526 views
Skip to first unread message

Tomáš Válek

unread,
Dec 20, 2021, 10:48:29 AM12/20/21
to Android CameraX Discussion Group
Hi,
after bindToLifecycle I am trying to set 60 FPS (yes test devices supported recording with 60 FPS).

try {
        val options = CaptureRequestOptions.Builder()
                     .setCaptureRequestOption(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, Range(FPS60, FPS60))
                        .build()
        val cameraControl = Camera2CameraControl.from(camera!!.cameraControl)
        cameraControl.captureRequestOptions = options
} catch (e: java.lang.Exception) {
        e.printStackTrace()
}

This works for foreground recording with preview, but It does not work for background recording.

Logcat is full of:
E/mm-camera: <IMGLIB><ERROR> 902: module_ppeiscore_handle_dis_update: MISMATCH Old matrix. Ignore event, since no frame for it!
E/mm-camera: <IMGLIB><ERROR> 965: module_ppeiscore_handle_dis_update: Error path!
D/VideoEncoder: Drop buffer by not in start-stop range.
D/VideoEncoder: Drop buffer by not in start-stop range.

When I used val videoCaptureBuilder = VideoCapture.Builder() from package name androidx.camera.core with videoCaptureBuilder.setVideoFrameRate(60), It worked perfectly..

Gerry Fan

unread,
Dec 21, 2021, 3:52:20 PM12/21/21
to Android CameraX Discussion Group, Tomáš Válek
which device are you using? Probably this is device dependent:  I tried you code on Pixel6 Pro, the captured file does show 60 FPS;
but on a device not supporting 60fps (getCameraCharacteristic(CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES)), the code executed ok, but when capturing it stuttered very severely, then it recovered after 1 or 2 sec itself(on capturing), the captured video frame rate (it would be an average) is about 7 or 8 (depends on captured time period). 

tonyt...@google.com

unread,
Dec 22, 2021, 1:26:05 AM12/22/21
to Android CameraX Discussion Group, Gerry Fan, Tomáš Válek
Hi,
Thanks for the question. camera-video doesn't support customized frame rate for now. And manually setting it through Camera2CameraControl may introduce unexpected behavior.

Tomáš Válek

unread,
Jan 20, 2022, 3:39:27 AM1/20/22
to Android CameraX Discussion Group, tonyt...@google.com, Gerry Fan, Tomáš Válek
Pixel 2 Android 11.

When will it be available? Customers expect recording in 60 FPS for more than a year ...

Dne středa 22. prosince 2021 v 7:26:05 UTC+1 uživatel tonyt...@google.com napsal:

Android CameraX Discussion Group

unread,
Jan 20, 2022, 4:10:50 AM1/20/22
to Android CameraX Discussion Group, Tomáš Válek, tonyt...@google.com, Gerry Fan
Thank you for letting us know. This feature request is in our pipeline. Since we have many feature requests in the bucket, we need to prioritize the needs with limited resources. This feature request is currently tracked in https://issuetracker.google.com/177918193. I've cc'ed you in the ticket, and you will get update once it is supported. 
Reply all
Reply to author
Forward
0 new messages