<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureAudioDataOutput/recommendedAudioSettingsForAssetWriter(writingTo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureAudioDataOutput(im)recommendedAudioSettingsForAssetWriterWithOutputFileType:"
  },
  "title" : "recommendedAudioSettingsForAssetWriter(writingTo:)"
}
-->

# recommendedAudioSettingsForAssetWriter(writingTo:)

Specifies the recommended settings for use with an `AVAssetWriterInput`.

```
func recommendedAudioSettingsForAssetWriter(writingTo outputFileType: AVFileType) -> [String : Any]?
```

## Parameters

`outputFileType`

Specifies the UTI of the file type to be written. See `File Format UTIs` for the defined UTIs.

## Return Value

A fully populated dictionary of keys and values that are compatible with [`AVAssetWriter`](/documentation/AVFoundation/AVAssetWriter).

## Discussion

The value of this property is an `NSDictionary` containing values for compression settings keys defined in [Audio settings](/documentation/AVFoundation/audio-settings). This dictionary is suitable for use as the [`assetWriterInputWithMediaType:outputSettings:`](/documentation/AVFoundation/AVAssetWriterInput/assetWriterInputWithMediaType:outputSettings:) method’s `outputSettings` parameter when creating an [`AVAssetWriterInputPixelBufferAdaptor`](/documentation/AVFoundation/AVAssetWriterInputPixelBufferAdaptor); for example,

```objc
[AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeAudio outputSettings:outputSettings sourceFormatHint:hint];
```

The dictionary returned contains all necessary keys and values needed to create an [`AVAssetWriter`](/documentation/AVFoundation/AVAssetWriter) instance; see the [`init(mediaType:outputSettings:)`](/documentation/AVFoundation/AVAssetWriterInput/init(mediaType:outputSettings:)) method for a more in depth discussion. For QuickTime movie and ISO files, the recommended audio settings will always produce output comparable to that of [`AVCaptureMovieFileOutput`](/documentation/AVFoundation/AVCaptureMovieFileOutput).

The dictionary of settings is dependent on the current configuration of the receiver’s [`AVCaptureSession`](/documentation/AVFoundation/AVCaptureSession) and its inputs. The settings dictionary may change if the session’s configuration changes. As such, you should configure your session first, then query the recommended audio settings.

---

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)