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

# videoSettings

A dictionary that contains the compression settings for the output.

```
var videoSettings: [String : Any]! { get set }
```

## Discussion

To receive samples in their device-native format, set this value to an empty dictionary:

```objc
AVCaptureVideoDataOutput* myVideoOutput;
myVideoOutput.videoSettings = @{ }; // Receive samples in device format.
```

To receive samples in a default uncompressed format, set this value to `nil`. Then you can query this value to receive a dictionary of the settings the session uses.

In iOS versions prior to iOS 16, the only key supported is <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelBufferPixelFormatTypeKey>. In iOS 16 and later, the supported keys include the following:

- For compressed video output, only use [`AVVideoPixelAspectRatioKey`](/documentation/AVFoundation/AVVideoPixelAspectRatioKey), [`AVVideoCleanApertureKey`](/documentation/AVFoundation/AVVideoCleanApertureKey), [`AVVideoScalingModeKey`](/documentation/AVFoundation/AVVideoScalingModeKey), [`AVVideoColorPropertiesKey`](/documentation/AVFoundation/AVVideoColorPropertiesKey), and [`AVVideoAllowWideColorKey`](/documentation/AVFoundation/AVVideoAllowWideColorKey).
- For uncompressed video output, you can also use <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelBufferPixelFormatTypeKey>, <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelBufferWidthKey>, and <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelBufferHeightKey>, in addition to the compressed video output keys.

You can use [`availableVideoPixelFormatTypes`](/documentation/AVFoundation/AVCaptureVideoDataOutput/availableVideoPixelFormatTypes) and [`availableVideoCodecTypes`](/documentation/AVFoundation/AVCaptureVideoDataOutput/availableVideoCodecTypes) to get a list of the supported pixel formats and video codecs, respectively. The width and height need to match the [`videoOrientation`](/documentation/AVFoundation/AVCaptureConnection/videoOrientation) specified in the output’s [`AVCaptureConnection`](/documentation/AVFoundation/AVCaptureConnection), otherwise the system throws an <doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException>. The aspect ratio of the width and height also need to match the aspect ratio of the source’s [`activeFormat`](/documentation/AVFoundation/AVCaptureDevice/activeFormat), corrected for the connection’s [`videoOrientation`](/documentation/AVFoundation/AVCaptureConnection/videoOrientation), otherwise the system throws an <doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException>. If the width or height exceeds the source’s `activeFormat`‘s width or height, the system throws an <doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException>. Don’t change the width and height if [`deliversPreviewSizedOutputBuffers`](/documentation/AVFoundation/AVCaptureVideoDataOutput/deliversPreviewSizedOutputBuffers) is <doc://com.apple.documentation/documentation/Swift/true>, otherwise the system throws an <doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException>.

---

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)