<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureScreenInput/init(displayID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureScreenInput(im)initWithDisplayID:"
  },
  "title" : "init(displayID:)"
}
-->

# init(displayID:)

Initializes a capture screen input that provides media data from the specified display.

```
init?(displayID: CGDirectDisplayID)
```

## Parameters

`displayID`

The ID of the display from which to capture video.

    `CGDirectDisplayID`     is defined in     `<CoreGraphics/CGDirectDisplay.h>`    .

## Return Value

A capture screen input initialized to provide media data from a given display. If the display cannot be used (because it is not available on the system, for example), returns `nil`.

## Discussion

---

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)