<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMReadySampleBuffer/init(pixelBuffer:formatDescription:presentationTimeStamp:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Media",
      "CoreMedia"
    ],
    "preciseIdentifier" : "s:9CoreMedia19CMReadySampleBufferVAA0A5Video015CVReadOnlyPixelE0CRszrlE05pixelE017formatDescription21presentationTimeStamp8durationACyAFGAF_So08CMFormatL3RefaSgSo6CMTimeaAPtcfc"
  },
  "title" : "init(pixelBuffer:formatDescription:presentationTimeStamp:duration:)"
}
-->

# init(pixelBuffer:formatDescription:presentationTimeStamp:duration:)

Creates a sample buffer carrying image buffer.

```
init(pixelBuffer content: Content, formatDescription: CMVideoFormatDescription? = nil, presentationTimeStamp: CMTime, duration: CMTime = .invalid)
```

## Parameters

`formatDescription`

Format description of the content. If provided, the format must be have video
media type. If not provided, one will be created using `CMVideoFormatDescription.init(pixelBuffer:)`.

`presentationTimeStamp`

The time at which sample will be presented. Must be valid numeric time.

`duration`

Duration of the sample. Set to `CMTime/invalid` if not present.

---

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)