<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/VTCompressionSessionEncodeMultiImageFrame",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Video Toolbox"
    ],
    "preciseIdentifier" : "c:@F@VTCompressionSessionEncodeMultiImageFrame"
  },
  "title" : "VTCompressionSessionEncodeMultiImageFrame"
}
-->

# VTCompressionSessionEncodeMultiImageFrame

Passes a multi-image frame to a compression session for encoding.

```
extern OSStatus VTCompressionSessionEncodeMultiImageFrame(VTCompressionSessionRef session, CMTaggedBufferGroupRef taggedBufferGroup, CMTime presentationTimeStamp, CMTime duration, CFDictionaryRef frameProperties, void *sourceFrameRefcon, VTEncodeInfoFlags *infoFlagsOut);
```

## Parameters

`session`

The compression session.

`taggedBufferGroup`

A <doc://com.apple.documentation/documentation/CoreMedia/CMTaggedBufferGroupRef> that contains the multiple images for a video frame to compress.

`presentationTimeStamp`

The presentation timestamp for this frame to attach to the sample buffer. Each presentation timestamp that you pass to a session must be greater than the previous one.

`duration`

The presentation duration for this frame to attach to the sample buffer. If you don’t have duration information, pass <doc://com.apple.documentation/documentation/CoreMedia/CMTime/invalid>.

`frameProperties`

A dictionary that specifies additional properties for encoding this frame. Some session properties may also change between frames, which affect subsequently encoded frames.

`sourceFrameRefcon`

Your reference value for the frame, which the system passes to the output callback function.

`infoFlagsOut`

Points to a [`VTEncodeInfoFlags`](/documentation/VideoToolbox/VTEncodeInfoFlags) value to receive information about the encode operation.

    The system sets the [`asynchronous`](/documentation/VideoToolbox/VTEncodeInfoFlags/asynchronous)     flag if the encode runs asynchronously.

    The system sets the [`frameDropped`](/documentation/VideoToolbox/VTEncodeInfoFlags/frameDropped)     flag if the encoding process dropped a frame (synchronously).

    Pass     `NULL`     if you don’t want to receive this information.

## Return Value

An `OSStatus` value that indicates the result of the operation.

## Discussion

The system doesn’t guarantee that encoded frames be output before the function returns. The session and encoder retain the image buffer as long as necessary.

> Important:
> Don’t modify the pixel data after making this call.

---

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)