<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureVideoDataOutput/recommendedMovieMetadata(forVideoCodecType:assetWriterOutputFileType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureVideoDataOutput(im)recommendedMovieMetadataForVideoCodecType:assetWriterOutputFileType:"
  },
  "title" : "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.

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

## Parameters

`videoCodecType`

The desired [`AVVideoCodecKey`](/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

A fully populated array of [`AVMetadataItem`](/documentation/AVFoundation/AVMetadataItem) objects compatible with [`AVAssetWriter`](/documentation/AVFoundation/AVAssetWriter).

## Discussion

The value of this property is an array of [`AVMetadataItem`](/documentation/AVFoundation/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`](/documentation/AVFoundation/AVAssetWriter/metadata) property before you have called [`startWriting()`](/documentation/AVFoundation/AVAssetWriter/startWriting()). For more details see <doc://com.apple.documentation/documentation/AVFoundation/AVAssetWriter/startWriting()>.

The `videoCodecType` string you provide must be present in [`availableVideoCodecTypesForAssetWriter(writingTo:)`](/documentation/AVFoundation/AVCaptureVideoDataOutput/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:)`](/documentation/AVFoundation/AVCaptureDevice/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 ``doc://com.apple.avfoundation/documentation/AVFoundation/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.

---

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)