<!--
{
  "availability" : [
    "iOS: 4.1.0 - 27.0.0",
    "iPadOS: 4.1.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.7.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetWriterInput/expectsMediaDataInRealTime",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetWriterInput(py)expectsMediaDataInRealTime"
  },
  "title" : "expectsMediaDataInRealTime"
}
-->

# expectsMediaDataInRealTime

A Boolean value that indicates whether the input tailors its processing for real-time sources.

```
var expectsMediaDataInRealTime: Bool { get set }
```

## Discussion

Set this value to <doc://com.apple.documentation/documentation/Swift/true> if your app appends media data to the input from a real-time source, such as an [`AVCaptureOutput`](/documentation/AVFoundation/AVCaptureOutput). Setting a <doc://com.apple.documentation/documentation/Swift/true> value optimizes the input for real-time usage so it accurately calculates the state of its [`isReadyForMoreMediaData`](/documentation/AVFoundation/AVAssetWriterInput/isReadyForMoreMediaData) property value.

You can’t set this value after writing starts.

> Important:
> To ensure optimal behavior, don’t set the value of this property and ``doc://com.apple.avfoundation/documentation/AVFoundation/AVAssetWriterInput/performsMultiPassEncodingIfSupported`` to <doc://com.apple.documentation/documentation/Swift/true> at the same time.

---

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)