---
title: "init(pixelBuffer:formatDescription:presentationTimeStamp:duration:)"
framework: coremedia
role: symbol
role_heading: Initializer
path: "coremedia/cmreadysamplebuffer/init(pixelbuffer:formatdescription:presentationtimestamp:duration:)"
---

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

Creates a sample buffer carrying image buffer.

## Declaration

```swift
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.
