Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.

Camera preview stabilization

For devices running Android 13 or higher, the camera framework provides support for video stabilization on the preview stream and other non-RAW streams in camera capture sessions. This feature lets third-party apps provide a what you see is what you get (WYSIWYG) experience when comparing between the camera preview and the recording.

Implementation

To provide third-party apps with this feature, device manufacturers must advertise support for the following keys and implement preview stabilization algorithms in the camera HAL:

To modify the default settings for this feature, assign a default value in the capture request template when creating a capture request using createCaptureRequest.

For a reference implementation of this feature, see the code for EmulatedCamera in Cuttlefish at hardware/google/camera/devices/EmulatedCamera/hwl/EmulatedSensor.cpp.

For more details on video stabilization modes, see CONTROL_VIDEO_STABILIZATION_MODE.

Validation

To test your implementation of this feature, use the following CTS and ITS tests:

CTS:

ITS (tests field of view and stabilization quality):

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025年12月02日 UTC.