From 159442d8f9bd8f59bc959a6a67d28ccfb6be5769 Mon Sep 17 00:00:00 2001 From: spollard Date: Tue, 2 Jun 2026 12:06:27 -0400 Subject: [PATCH] Lock video focus once instead of hunting continuously The video recording pipelines build a droidcamsrc element but never set its focus-mode, so it falls back to the GstPhotography default of CONTINUOUS_NORMAL. On the Android camera HAL this re-runs autofocus for the entire recording, making the lens visibly hunt in and out and degrading every video. Set focus-mode=auto (single-shot autofocus, then hold) on droidcamsrc in both the front and back record pipelines so the camera focuses once at the start of the recording and then keeps that focus steady. Measured on a FuriPhone (radon): per-frame sharpness jitter after the first second dropped from ~0.56 (continuous) to ~0.02 (auto), with a higher mean sharpness since the image no longer racks through blur. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/qml/Camera.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qml/Camera.qml b/src/qml/Camera.qml index 2285f83..8415805 100644 --- a/src/qml/Camera.qml +++ b/src/qml/Camera.qml @@ -430,7 +430,7 @@ Item { property var backends: [ { - frontRecord: "gst-pipeline: droidcamsrc mode=2 camera-device=1 ! tee name=t " + frontRecord: "gst-pipeline: droidcamsrc mode=2 camera-device=1 focus-mode=auto ! tee name=t " // preview + "t. ! queue leaky=downstream max-size-buffers=1 ! video/x-raw, width=" + vidW @@ -459,7 +459,7 @@ Item { + outputPath, backRecord: "gst-pipeline: droidcamsrc camera-device=" + camera.deviceId - + " mode=2 ! tee name=t " + + " mode=2 focus-mode=auto ! tee name=t " // preview + "t. ! queue leaky=downstream max-size-buffers=1 ! video/x-raw, width="