---
title: "recommendedVideoSettingsForAssetWriter(writingTo:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcapturevideodataoutput/recommendedvideosettingsforassetwriter(writingto:)"
---

# recommendedVideoSettingsForAssetWriter(writingTo:)

Specifies the recommended settings for use with an AVAssetWriterInput.

## Declaration

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

## Parameters

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

## Return Value

Return Value A fully populated dictionary of keys and values that are compatible with AVAssetWriter.

## Discussion

Discussion This dictionary contains keys and values described in Video settings and is suitable for use when creating an AVAssetWriterInput with the init(mediaType:outputSettings:) initializer. For QuickTime movie and ISO file types, the recommended video settings produce output comparable to that of AVCaptureMovieFileOutput. Note that the dictionary of settings is dependent on the current configuration of the output’s 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. note: This method returns appropriate settings based on the device’s default video recording codec, but that default can differ between devices. Use the recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:) method to obtain video settings appropriate for a specific codec.

## See Also

### Configuring video capture

- [videoSettings](avfoundation/avcapturevideodataoutput/videosettings.md)
- [Video settings](avfoundation/video-settings.md)
- [alwaysDiscardsLateVideoFrames](avfoundation/avcapturevideodataoutput/alwaysdiscardslatevideoframes.md)
- [automaticallyConfiguresOutputBufferDimensions](avfoundation/avcapturevideodataoutput/automaticallyconfiguresoutputbufferdimensions.md)
- [deliversPreviewSizedOutputBuffers](avfoundation/avcapturevideodataoutput/deliverspreviewsizedoutputbuffers.md)
- [preparesCellularRadioForNetworkConnection](avfoundation/avcapturevideodataoutput/preparescellularradiofornetworkconnection.md)
- [preservesDynamicHDRMetadata](avfoundation/avcapturevideodataoutput/preservesdynamichdrmetadata.md)
- [recommendedMediaTimeScaleForAssetWriter](avfoundation/avcapturevideodataoutput/recommendedmediatimescaleforassetwriter.md)
- [recommendedMovieMetadata(forVideoCodecType:assetWriterOutputFileType:)](avfoundation/avcapturevideodataoutput/recommendedmoviemetadata(forvideocodectype:assetwriteroutputfiletype:).md)
- [recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:)](avfoundation/avcapturevideodataoutput/recommendedvideosettings(forvideocodectype:assetwriteroutputfiletype:).md)
- [recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:outputFileURL:)](avfoundation/avcapturevideodataoutput/recommendedvideosettings(forvideocodectype:assetwriteroutputfiletype:outputfileurl:).md)
