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

# VTMotionEstimationSessionCreate

Creates a session you use to generate a pixel buffer of motion vectors from two pixel buffers.

```
extern OSStatus VTMotionEstimationSessionCreate(CFAllocatorRef allocator, CFDictionaryRef motionVectorProcessorSelectionOptions, uint32_t width, uint32_t height, VTMotionEstimationSessionRef*motionEstimationSessionOut);
```

## Parameters

`allocator`

An allocator for the session. Pass NULL to use the default allocator.

`motionVectorProcessorSelectionOptions`

Available creation options are:

- [`kVTMotionEstimationSessionCreationOption_MotionVectorSize`](/documentation/VideoToolbox/kVTMotionEstimationSessionCreationOption_MotionVectorSize): Size of the search block.
- [`kVTMotionEstimationSessionCreationOption_UseMultiPassSearch`](/documentation/VideoToolbox/kVTMotionEstimationSessionCreationOption_UseMultiPassSearch): Use multiple passes to detect true motion.
- [`kVTMotionEstimationSessionCreationOption_Label`](/documentation/VideoToolbox/kVTMotionEstimationSessionCreationOption_Label): Label used for logging and resource tracking.

`width`

The width of frames in pixels.

`height`

The height of frames in pixels.

`motionEstimationSessionOut`

Points to a variable to receive the new motion-estimation session.

## Discussion

The function creates a session for computing motion vectors between two pixel buffers.

---

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)