<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetWriterInputGroup/init(inputs:defaultInput:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetWriterInputGroup(im)initWithInputs:defaultInput:"
  },
  "title" : "init(inputs:defaultInput:)"
}
-->

# init(inputs:defaultInput:)

Creates a group for the asset writer inputs.

```
init(inputs: [AVAssetWriterInput], defaultInput: AVAssetWriterInput?)
```

## Parameters

`inputs`

The inputs with tracks to arrange into a mutually exclusive group.

`defaultInput`

The group’s default input.

## Discussion

When you add an input group to an asset writer, the system sets the default input’s [`marksOutputTrackAsEnabled`](/documentation/AVFoundation/AVAssetWriterInput/marksOutputTrackAsEnabled) property value to <doc://com.apple.documentation/documentation/Swift/true>, and the value of the other inputs in the group to <doc://com.apple.documentation/documentation/Swift/false>.

---

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)