---
title: maxRecordedFileSize
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturefileoutput/maxrecordedfilesize
---

# maxRecordedFileSize

The maximum size, in bytes, of the data that should be recorded by the receiver.

## Declaration

```swift
var maxRecordedFileSize: Int64 { get set }
```

## Discussion

Discussion This property specifies a hard limit on the data size of recorded files. Recording is stopped when the limit is reached and the fileOutput(_:didFinishRecordingTo:from:error:) delegate method is invoked with an appropriate error. The default value of this property is 0, which indicates no limit.

## See Also

### Setting file output properties

- [delegate](avfoundation/avcapturefileoutput/delegate.md)
- [maxRecordedDuration](avfoundation/avcapturefileoutput/maxrecordedduration.md)
- [minFreeDiskSpaceLimit](avfoundation/avcapturefileoutput/minfreediskspacelimit.md)
- [outputFileURL](avfoundation/avcapturefileoutput/outputfileurl.md)
- [recordedDuration](avfoundation/avcapturefileoutput/recordedduration.md)
- [recordedFileSize](avfoundation/avcapturefileoutput/recordedfilesize.md)
- [isRecording](avfoundation/avcapturefileoutput/isrecording.md)
- [isRecordingPaused](avfoundation/avcapturefileoutput/isrecordingpaused.md)
