---
title: maxBufferedFrameCount
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturebroadcastvideooutput/maxbufferedframecount
---

# maxBufferedFrameCount

This represents the maximum count of buffered frames. By default the value is 0, which means late frames are immediately dropped to maintain minimal latency.

## Declaration

```swift
var maxBufferedFrameCount: Int { get set }
```

## Discussion

Discussion When set to a value greater than 0, the buffer absorbs minor timing jitter in the capture pipeline, reducing the possibility of dropping frames during temporary processing variations. Frames accumulate in the buffer up to the specified limit. Once the buffer reaches maxBufferedFrameCount, the oldest frame is removed to make room for each new incoming frame, maintaining a rolling window of buffered content. Calling resetFrameBuffer() clears all buffered frames and resets the buffer count back to 0, allowing the buffer to fill again from empty. The maximum supported value can be retrieved using maxSupportedBufferedFrameCount. Setting a value higher than the maximum supported value will raise an NSInvalidArgumentException. note: Enabling frame buffering (setting a value > 0) is useful for scenarios where temporary processing delays or timing variations are acceptable, such as when recording or archiving broadcast content. For live broadcast workflows where minimal latency is critical, keep the default value of 0.

## See Also

### Related Documentation

- [resetFrameBuffer()](avfoundation/avcapturebroadcastvideooutput/resetframebuffer().md)
- [maxSupportedBufferedFrameCount](avfoundation/avcapturebroadcastvideooutput/maxsupportedbufferedframecount.md)

### Managing Video Output

- [videoSettings](avfoundation/avcapturebroadcastvideooutput/videosettings.md)
- [maxSupportedBufferedFrameCount](avfoundation/avcapturebroadcastvideooutput/maxsupportedbufferedframecount.md)
- [resetFrameBuffer()](avfoundation/avcapturebroadcastvideooutput/resetframebuffer().md)
- [droppedFrameReplacementPolicy](avfoundation/avcapturebroadcastvideooutput/droppedframereplacementpolicy-swift.property.md)
