<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/VideoReader/CameraConfiguration/init(position:pixelFormat:resolution:frameRate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents11VideoReaderV19CameraConfigurationV8position11pixelFormat10resolution9frameRateA2E8PositionO_AE05PixelI0OAE10ResolutionOSdtcfc"
  },
  "title" : "init(position:pixelFormat:resolution:frameRate:)"
}
-->

# init(position:pixelFormat:resolution:frameRate:)

Creates a camera configuration.

```
init(position: VideoReader.CameraConfiguration.Position = .front, pixelFormat: VideoReader.CameraConfiguration.PixelFormat = .bgra32, resolution: VideoReader.CameraConfiguration.Resolution = .high, frameRate: Double = 30.0)
```

## Parameters

`position`

The position of the camera. The default value is `.front`. For devices with just one camera this value is ignored.

`pixelFormat`

The pixel format of the camera frames. The default is `.bgra32`.

`resolution`

The camera resolution. The default values is `.high`.

`frameRate`

The camera frame rate. The default value is 30.0 frames per second.

---

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)