---
title: "formatReader(with:options:)"
framework: MediaExtension
role: symbol
role_heading: Instance Method
platforms: [macOS 14.0+]
path: "mediaextension/meformatreaderextension/formatreader(with:options:)"
---

# formatReader(with:options:)

Creates a new format reader with the byte source and options that you specify.

## Declaration

```swift
func formatReader(with primaryByteSource: MEByteSource, options: MEFormatReaderInstantiationOptions?) throws -> any MEFormatReader
```

## Parameters

- `primaryByteSource`: The primary byte source for the format reader.
- `options`: The reader instantiation options.

## Return Value

Return Value A new format reader.

## See Also

### Creating a format reader

- [init()](mediaextension/meformatreaderextension/init().md)
