---
title: "recommendedMovieMetadata(forVideoCodecType:assetWriterOutputFileType:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcapturevideodataoutput/recommendedmoviemetadata(forvideocodectype:assetwriteroutputfiletype:)"
---

# recommendedMovieMetadata(forVideoCodecType:assetWriterOutputFileType:)

Recommends movie-level metadata for a particular video codec type and output file type, to be used with an asset writer input.

## Declaration

```swift
func recommendedMovieMetadata(forVideoCodecType videoCodecType: AVVideoCodecType, assetWriterOutputFileType outputFileType: AVFileType) -> [AVMetadataItem]?
```

## Parameters

- `videoCodecType`: The desired doc://com.apple.avfoundation/documentation/AVFoundation/AVVideoCodecKey to be used for compression (see doc://com.apple.documentation/documentation/AVFoundation/video-settings).
- `outputFileType`: Specifies the UTI of the file type to be written (see doc://com.apple.documentation/documentation/AVFoundation/AVFileType).

## Return Value

Return Value A fully populated array of AVMetadataItem objects compatible with AVAssetWriter.

## Discussion

Discussion The value of this property is an array of AVMetadataItem objects representing the collection of top-level metadata to be written in each output file. This array is suitable to use as the metadata property before you have called startWriting(). For more details see startWriting(). The videoCodecType string you provide must be present in availableVideoCodecTypesForAssetWriter(writingTo:) array, or an NSInvalidArgumentException is thrown. For clients writing files using a ProRes Raw codec type, white balance must be locked (call setWhiteBalanceModeLocked(with:completionHandler:)) before querying this property, or an NSIvalidArgumentException is thrown. note: The array of metadata is dependent on the current configuration of the receiver’s AVCaptureSession and its inputs. The array may change when the session’s configuration changes. As such, you should configure and start your session first, then query this method.

## 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)
- [recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:)](avfoundation/avcapturevideodataoutput/recommendedvideosettings(forvideocodectype:assetwriteroutputfiletype:).md)
- [recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:outputFileURL:)](avfoundation/avcapturevideodataoutput/recommendedvideosettings(forvideocodectype:assetwriteroutputfiletype:outputfileurl:).md)
- [recommendedVideoSettingsForAssetWriter(writingTo:)](avfoundation/avcapturevideodataoutput/recommendedvideosettingsforassetwriter(writingto:).md)
