Skip to content

Lock video focus once instead of hunting continuously#29

Open
spollard wants to merge 1 commit into
FuriLabs:forkyfrom
spollard:fix/forky/video-focus-mode-auto
Open

Lock video focus once instead of hunting continuously#29
spollard wants to merge 1 commit into
FuriLabs:forkyfrom
spollard:fix/forky/video-focus-mode-auto

Conversation

@spollard

@spollard spollard commented Jun 2, 2026

Copy link
Copy Markdown

Problem

The video recording pipelines in Camera.qml build a droidcamsrc element but never set its focus-mode. It therefore falls back to the GstPhotography default CONTINUOUS_NORMAL, which on the Android camera HAL re-runs autofocus for the entire recording. The lens visibly hunts in and out, degrading every video.

Fix

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 recording and then keeps that focus steady. Two-line change, no behavioural change to stills or the viewfinder.

Measurements (FuriPhone radon)

Recorded the same scene through the existing back-record pipeline with the only difference being focus-mode, then computed a per-frame sharpness metric (Brenner gradient):

droidcamsrc focus-mode post-1s sharpness jitter behaviour
continuous-normal (current default) 0.56 sharpness bounces, lens hunting
auto (this PR) 0.02 focuses once, holds steady

auto also has a higher mean sharpness, since the image no longer repeatedly racks through blur.

If a fully fixed lens is ever preferred (e.g. for landscapes), focus-mode=infinity/manual are the alternatives — but auto keeps a sharp starting focus, which is the better general-purpose default.

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant