<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 14.0.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureDevice/videoZoomFactor",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureDevice(py)videoZoomFactor"
  },
  "title" : "videoZoomFactor"
}
-->

# videoZoomFactor

A value that controls the cropping and enlargement of images captured by the device.

```
var videoZoomFactor: CGFloat { get set }
```

## Discussion

This value is a multiplier. For example, a value of `2.0` doubles the size of an image’s subject (and halves the field of view). Allowed values range from `1.0` (full field of view) to the value of the active format’s [`videoMaxZoomFactor`](/documentation/AVFoundation/AVCaptureDevice/Format/videoMaxZoomFactor) property. Setting the value of this property jumps immediately to the new zoom factor. For a smooth transition, use the [`ramp(toVideoZoomFactor:withRate:)`](/documentation/AVFoundation/AVCaptureDevice/ramp(toVideoZoomFactor:withRate:)) method.

The device achieves a zoom effect by cropping around the center of the image captured by the sensor. At low zoom factors, the cropped images is equal to or larger than the output size. At higher zoom factors, the device must scale the cropped image up to the output size, resulting in a loss of image quality. The active format’s [`videoZoomFactorUpscaleThreshold`](/documentation/AVFoundation/AVCaptureDevice/Format/videoZoomFactorUpscaleThreshold) property indicates the factors at which upscaling occurs.

Before changing the value of this property, you must call [`lockForConfiguration()`](/documentation/AVFoundation/AVCaptureDevice/lockForConfiguration()) to acquire exclusive access to the device’s configuration properties. Otherwise, setting the value of this property raises an exception. When you finish configuring the device, call [`unlockForConfiguration()`](/documentation/AVFoundation/AVCaptureDevice/unlockForConfiguration()) to release the lock and allow other devices to configure the settings.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)