<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVURLAssetPreferPreciseDurationAndTimingKey",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:@AVURLAssetPreferPreciseDurationAndTimingKey"
  },
  "title" : "AVURLAssetPreferPreciseDurationAndTimingKey"
}
-->

# AVURLAssetPreferPreciseDurationAndTimingKey

A Boolean value that indicates whether the asset should provide accurate duration and precise random access by time.

```
let AVURLAssetPreferPreciseDurationAndTimingKey: String
```

## Discussion

Setting a value of <doc://com.apple.documentation/documentation/Swift/true> indicates longer loading times are acceptable in cases where you require precise timing. Container formats like QuickTime and MPEG-4 provide sufficient timing information and don’t require additional parsing to retrieve it. Other formats don’t provide sufficient summary information, and the system can’t accurately calculate the resource’s duration and timing without examining the media content.

If you only intend to play the asset, the default value of <doc://com.apple.documentation/documentation/Swift/false> is sufficient because [`AVPlayer`](/documentation/AVFoundation/AVPlayer) supports approximate random access by time when full precision isn’t available. If you intend to insert the asset into [`AVMutableComposition`](/documentation/AVFoundation/AVMutableComposition) or [`AVMutableMovie`](/documentation/AVFoundation/AVMutableMovie), precise random access is typically desirable, and you should set this option to <doc://com.apple.documentation/documentation/Swift/true>.

---

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)