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
func recommendedMovieMetadata(forVideoCodecType videoCodecType: AVVideoCodecType, assetWriterOutputFileType outputFileType: AVFileType) -> [AVMetadataItem]?Parameters
- videoCodecType:
The desired Avvideocodeckey to be used for compression (see Video Settings).
- outputFileType:
Specifies the UTI of the file type to be written (see Avfiletype).
Return Value
A fully populated array of AVMetadataItem objects compatible with AVAssetWriter.
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.
See Also
Configuring video capture
videoSettingsVideo settingsalwaysDiscardsLateVideoFramesautomaticallyConfiguresOutputBufferDimensionsdeliversPreviewSizedOutputBufferspreparesCellularRadioForNetworkConnectionpreservesDynamicHDRMetadatarecommendedMediaTimeScaleForAssetWriterrecommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:)recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:outputFileURL:)recommendedVideoSettingsForAssetWriter(writingTo:)