---
title: activeLockedVideoFrameDuration
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturedeviceinput/activelockedvideoframeduration
---

# activeLockedVideoFrameDuration

The receiver’s locked frame duration (the reciprocal of its frame rate). Setting this property guarantees the intra-frame duration delivered by the device input is precisely the frame duration you request.

## Declaration

```swift
var activeLockedVideoFrameDuration: CMTime { get set }
```

## Discussion

Discussion Set this property to run the receiver’s associated AVCaptureDevice at precisely your provided frame rate (expressed as a duration). Query minSupportedLockedVideoFrameDuration to find the minimum value supported by this AVCaptureDeviceInput. In order to disable locked video frame duration, set this property to kCMTimeInvalid. This property resets itself to kCMTimeInvalid when the receiver’s attached activeFormat changes. When you set this property, its value is also reflected in the receiver’s activeVideoMinFrameDuration and activeVideoMaxFrameDuration. note: Locked frame duration availability may change depending on the device configuration. For example, locked frame duration is unsupported when isAutoVideoFrameRateEnabled or isSpatialVideoCaptureEnabled is set to true. note: Only one AVCaptureDeviceInput added to an AVCaptureMultiCamSession can follow an external sync device or run at a locked frame duration. note: Setting this property may cause a lengthy reconfiguration of the receiver, similar to setting activeFormat or sessionPreset. note: When using this property, set the exposure duration with setExposureModeCustom(duration:iso:completionHandler:) to one half the frame duration (or less) to maintain full dynamic range. important: If you set this property to a valid value while the receiver’s minSupportedLockedVideoFrameDuration is kCMTimeInvalid, it throws an NSInvalidArgumentException. important: If you set this property while the receiver’s  isLockedVideoFrameDurationSupported property returns false, it throws an NSInvalidArgumentException.

## See Also

### Locking frame duration

- [isLockedVideoFrameDurationSupported](avfoundation/avcapturedeviceinput/islockedvideoframedurationsupported.md)
