Instance Method


Specifies the recommended settings for use with an AVAssetWriterInput.


- (NSDictionary *)recommendedAudioSettingsForAssetWriterWithOutputFileType:(AVFileType)outputFileType;



Specifies the UTI of the file type to be written. See File Format UTIs for the defined UTIs.

Return Value

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


The value of this property is an NSDictionary containing values for compression settings keys defined in Audio Settings and Formats. This dictionary is suitable for use as the assetWriterInputWithMediaType:outputSettings: method’s outputSettings parameter when creating an AVAssetWriterInputPixelBufferAdaptor; for example,

[AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeAudio outputSettings:outputSettings sourceFormatHint:hint];

The dictionary returned contains all necessary keys and values needed to create an AVAssetWriter instance; see the initWithMediaType:outputSettings: method for a more in depth discussion. For QuickTime movie and ISO files, the recommended audio settings will always produce output comparable to that of AVCaptureMovieFileOutput.

The dictionary of settings is dependent on the current configuration of the receiver's AVCaptureSession and its inputs. The settings dictionary may change if the session's configuration changes. As such, you should configure your session first, then query the recommended audio settings.

See Also

Configuring Audio Capture


The settings used to decode or re-encode audio before it is output.