<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 10.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/kVTCompressionPropertyKey_PixelAspectRatio",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Video Toolbox"
    ],
    "preciseIdentifier" : "c:@kVTCompressionPropertyKey_PixelAspectRatio"
  },
  "title" : "kVTCompressionPropertyKey_PixelAspectRatio"
}
-->

# kVTCompressionPropertyKey_PixelAspectRatio

The pixel aspect ratio for encoded frames.

```
let kVTCompressionPropertyKey_PixelAspectRatio: CFString
```

## Discussion

If a video encoder enforces specific pixel aspect ratios, this property will be read-only ([`VTSessionSetProperty(_:key:value:)`](/documentation/VideoToolbox/VTSessionSetProperty(_:key:value:)) returns [`kVTPropertyReadOnlyErr`](/documentation/VideoToolbox/kVTPropertyReadOnlyErr)). The pixel aspect ratio is set on the format description for output samples, and may affect source frame scaling. `NULL` is a valid value for this property, meaning square pixels (1:1).

---

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)