<!--
{
  "documentType" : "article",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/VTFrameSilo-api-collection",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "VTFrameSilo"
}
-->

# VTFrameSilo

An object that stores sample buffers from a multipass encoding session.

## Discussion

A frame silo object starts out empty and is populated by calls to [`VTFrameSiloAddSampleBuffer(_:sampleBuffer:)`](/documentation/VideoToolbox/VTFrameSiloAddSampleBuffer(_:sampleBuffer:)) to add sample buffers in ascending decode order. After the first full pass, additional passes may be performed to replace sample buffers. Each such pass must begin with a call to [`VTFrameSiloSetTimeRangesForNextPass(_:timeRangeCount:timeRangeArray:)`](/documentation/VideoToolbox/VTFrameSiloSetTimeRangesForNextPass(_:timeRangeCount:timeRangeArray:)), which takes a list of time ranges. Samples in these time ranges are deleted, and calls to [`VTFrameSiloAddSampleBuffer(_:sampleBuffer:)`](/documentation/VideoToolbox/VTFrameSiloAddSampleBuffer(_:sampleBuffer:)) can then be made to provide replacements.

Call [`VTFrameSiloCallFunctionForEachSampleBuffer(_:in:refcon:callback:)`](/documentation/VideoToolbox/VTFrameSiloCallFunctionForEachSampleBuffer(_:in:refcon:callback:)) or [`VTFrameSiloCallBlockForEachSampleBuffer(_:in:handler:)`](/documentation/VideoToolbox/VTFrameSiloCallBlockForEachSampleBuffer(_:in:handler:)) to retrieve sample buffers. The frame silo object may write sample buffers and data to the backing file between addition and retrieval; don’t expect to get identical object pointers back.

The sample buffers are ordered by decode timestamp.

## Topics

### Creating Frame Silos

[`func VTFrameSiloCreate(allocator: CFAllocator?, fileURL: CFURL?, timeRange: CMTimeRange, options: CFDictionary?, frameSiloOut: UnsafeMutablePointer<VTFrameSilo?>) -> OSStatus`](/documentation/VideoToolbox/VTFrameSiloCreate(allocator:fileURL:timeRange:options:frameSiloOut:))

Creates a frame silo object using a temporary file.

### Configuring Frame Silos

[`func VTFrameSiloAddSampleBuffer(VTFrameSilo, sampleBuffer: CMSampleBuffer) -> OSStatus`](/documentation/VideoToolbox/VTFrameSiloAddSampleBuffer(_:sampleBuffer:))

Adds a sample buffer to a frame silo object.

[`func VTFrameSiloSetTimeRangesForNextPass(VTFrameSilo, timeRangeCount: CMItemCount, timeRangeArray: UnsafePointer<CMTimeRange>) -> OSStatus`](/documentation/VideoToolbox/VTFrameSiloSetTimeRangesForNextPass(_:timeRangeCount:timeRangeArray:))

Begins a new pass of samples to be added to a frame silo object.

[`func VTFrameSiloCallBlockForEachSampleBuffer(VTFrameSilo, in: CMTimeRange, handler: (CMSampleBuffer) -> OSStatus) -> OSStatus`](/documentation/VideoToolbox/VTFrameSiloCallBlockForEachSampleBuffer(_:in:handler:))

Retrieves sample buffers from a frame silo object.

[`func VTFrameSiloCallFunctionForEachSampleBuffer(VTFrameSilo, in: CMTimeRange, refcon: UnsafeMutableRawPointer?, callback: (UnsafeMutableRawPointer?, CMSampleBuffer) -> OSStatus) -> OSStatus`](/documentation/VideoToolbox/VTFrameSiloCallFunctionForEachSampleBuffer(_:in:refcon:callback:))

Retrieves sample buffers from a frame silo object.

### Inspecting Frame Silos

[`func VTFrameSiloGetProgressOfCurrentPass(VTFrameSilo, progressOut: UnsafeMutablePointer<Float32>) -> OSStatus`](/documentation/VideoToolbox/VTFrameSiloGetProgressOfCurrentPass(_:progressOut:))

Gets the progress of the current pass.

[`func VTFrameSiloGetTypeID() -> CFTypeID`](/documentation/VideoToolbox/VTFrameSiloGetTypeID())

Retrieves the Core Foundation type identifier for the frame silo object.

### Data Types

[`class VTFrameSilo`](/documentation/VideoToolbox/VTFrameSilo)

An object that stores a large number of sample buffers, as produced by a multipass compression session.



---

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)