<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureVideoDataOutput/recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureVideoDataOutput(im)recommendedVideoSettingsForVideoCodecType:assetWriterOutputFileType:"
  },
  "title" : "recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:)"
}
-->

# recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:)

Returns a video settings dictionary appropriate for capturing video to a file with the specified codec and type.

```
func recommendedVideoSettings(forVideoCodecType videoCodecType: AVVideoCodecType, assetWriterOutputFileType outputFileType: AVFileType) -> [String : Any]?
```

## Parameters

`videoCodecType`

The video codec type to write.

`outputFileType`

The Uniform Type Identifier of the file type to write. See `File Format UTIs` for supported types.

## Return Value

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

## Discussion

This dictionary contains keys and values described in [Video settings](/documentation/AVFoundation/video-settings) and is suitable for use when creating an [`AVAssetWriterInput`](/documentation/AVFoundation/AVAssetWriterInput) with the [`init(mediaType:outputSettings:)`](/documentation/AVFoundation/AVAssetWriterInput/init(mediaType:outputSettings:)) initializer.

For QuickTime movie and ISO file types, the recommended video settings produce output comparable to that of [`AVCaptureMovieFileOutput`](/documentation/AVFoundation/AVCaptureMovieFileOutput).

Note that the dictionary of settings is dependent on the current configuration of the output’s [`AVCaptureSession`](/documentation/AVFoundation/AVCaptureSession) and its inputs. The settings dictionary may change if the session’s configuration changes. As such, configure your session first, then query the recommended video 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)