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

# initialMovieFragmentInterval

The interval at which to write the initial movie fragment.

```
var initialMovieFragmentInterval: CMTime { get set }
```

## Discussion

When using fragment writing, you can set this property value to indicate the interval at which to write the initial fragment.

The default value is <doc://com.apple.documentation/documentation/CoreMedia/CMTime/invalid>, which indicates to use the interval set in the [`movieFragmentInterval`](/documentation/AVFoundation/AVAssetWriter/movieFragmentInterval) property. The [`movieFragmentInterval`](/documentation/AVFoundation/AVAssetWriter/movieFragmentInterval) property is typically set to 10 seconds, so if an error occurs before writing the first fragment, the movie file won’t be playable. To avoid this case, your app may want to set a shorter interval, such as 1 second, to write the initial fragment, and then use a 10 second interval for subsequent fragments.

You can’t set this property after writing starts.

---

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)