---
title: preferredOutputSegmentInterval
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avassetwriter/preferredoutputsegmentinterval
---

# preferredOutputSegmentInterval

The interval of output segments that you prefer.

## Declaration

```swift
var preferredOutputSegmentInterval: CMTime { get set }
```

## Discussion

Discussion The default value is invalid, which indicates that the asset writer chooses an appropriate default value. You may also set a positive numeric or indefinite time. When the value is indefinite, each call you make to flushSegment() outputs a segment data. You can’t change this value after writing starts.

## See Also

### Configuring segment writing

- [delegate](avfoundation/avassetwriter/delegate.md)
- [AVAssetWriterDelegate](avfoundation/avassetwriterdelegate.md)
- [initialSegmentStartTime](avfoundation/avassetwriter/initialsegmentstarttime.md)
- [outputFileTypeProfile](avfoundation/avassetwriter/outputfiletypeprofile.md)
- [flushSegment()](avfoundation/avassetwriter/flushsegment().md)
