I have Samsung S10 which has video stabilization feature. Using system default Camera app I can see the difference when it's enabled and not: first if it's enabled than there will be some zoomed preview, second it is noticeable during device movements.
I tried to enable stabilization in my own app using Camera2 API, also FullHD and rear camera (the same as with default system app).
I tested that characteristics.get(CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES)
returns only CONTROL_VIDEO_STABILIZATION_MODE_OFF
so this is not supported.
But characteristics.get(CameraCharacteristics.LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION)
has CameraMetadata.LENS_OPTICAL_STABILIZATION_MODE_ON
So I as I understand this is exactly the option to enable video stabilization (optical), should be the same as in default system app.
But when I do the next for camera capture session configuration it doesn't change anything, no zoomed preview (as it was with default system camera app) and no changes during movement, so the video is the same in my app as it would have been in default camera app with disabled video stabilization
captureRequestBuilder.set(
CaptureRequest.LENS_OPTICAL_STABILIZATION_MODE,
CameraMetadata.LENS_OPTICAL_STABILIZATION_MODE_ON
)
So setting this parameter doesn't change anything.
Why video stabilization works in default system camera app but not in my own app using Camera2 API?