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

# VTHDRPerFrameMetadataGenerationSessionCreate

Creates a metadata generation session object.

```
extern OSStatus VTHDRPerFrameMetadataGenerationSessionCreate(CFAllocatorRef allocator, float framesPerSecond, CFDictionaryRef options, VTHDRPerFrameMetadataGenerationSessionRef*hdrPerFrameMetadataGenerationSessionOut);
```

## Parameters

`allocator`

The allocator.

`framesPerSecond`

Value must be greater than 0.0

`options`

`CFDictionary` may contain the key [`kVTHDRPerFrameMetadataGenerationOptionsKey_HDRFormats`](/documentation/VideoToolbox/kVTHDRPerFrameMetadataGenerationOptionsKey_HDRFormats).

`hdrPerFrameMetadataGenerationSessionOut`

A pointer to a variable to receive the new session.

## Discussion

The returned session object may be used to perform HDR Per Frame Metadata Generation.

Call CFRelease to release your object reference.

---

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)