A group of tracks in a mutually exclusive relationship.


@interface AVAssetWriterInputGroup : AVMediaSelectionGroup


Use this class to associate tracks corresponding to multiple AVAssetWriterInput instances as mutually exclusive to each other for playback or other processing.

For example, if you are creating an asset with multiple audio tracks using different spoken languages—and only one track should be played at a time—group the inputs corresponding to those tracks into a single instance of AVAssetWriterInputGroup and add the group to the AVAssetWriter instance using the AVAssetWriter method addInputGroup:. If the output format supports mutually exclusive relationships among tracks, the AVAssetWriter marks the tracks as mutually exclusive to each other.

Because AVAssetWriterInputGroup is a subclass of AVMediaSelectionGroup, clients can examine the media selection options that are available on the output asset before writing the asset. Obtain the best results by examining the options of the AVAssetWriterInputGroup after associating the AVAssetWriterInput instances of the AVAssetTrack objects as appropriate using the AVAssetWriterInput method addTrackAssociationWithTrackOfInput:type: and by initializing each AVAssetWriterInput with a source format hint, where appropriate.


Creating an Asset Writer Input Group

+ assetWriterInputGroupWithInputs:defaultInput:

Creates and initializes an instance of an asset writer input group.

- initWithInputs:defaultInput:

Creates an instance of an asset writer input group.

Getting the Asset Writer Input Group Settings


The default input of the receiver.


An array of inputs from which the asset writer receives media data.


See Also

File Export

Exporting Video to Alternative Formats

Convert an existing movie file to a different format.


An object that transcodes the contents of an asset source object to create an output of the form described by a specified export preset.


An object used to write media data to a new file of a specified audiovisual container type.


A writer used to append media samples to a single track of an asset writer's output file.


The transfer function for the ITU_R BT.2100 color space.


An object that specifies a set of parameters for configuring objects that use output settings dictionaries.


An object that defines an interface for writing metadata packaged as timed metadata groups into a single asset writer input.


An object that defines an interface for querying about the requirements of the current pass.


A buffer used to append video samples packaged as pixel buffers to a single asset writer input.