---
title: "init(formatDescription:clock:)"
framework: avfoundation
role: symbol
role_heading: Initializer
path: "avfoundation/avcapturemetadatainput/init(formatdescription:clock:)"
---

# init(formatDescription:clock:)

Creates capture metadata input to provide timed groups to a capture session.

## Declaration

```swift
init(formatDescription desc: CMMetadataFormatDescription, clock: CMClock)
```

## Parameters

- `desc`: A doc://com.apple.documentation/documentation/CoreMedia/CMFormatDescription that defines the metadata to be supplied by the client. Throws doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException if NULL is passed.
- `clock`: A doc://com.apple.documentation/documentation/CoreMedia/CMClock that provides the timebase for the supplied samples. Throws doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException if NULL is passed.
