Instance Method


Associates the track corresponding to the specified input with the track corresponding with the receiver.


- (void)addTrackAssociationWithTrackOfInput:(AVAssetWriterInput *)input type:(NSString *)trackAssociationType;



The instance of AVAssetWriterInput with a corresponding track to associate with track corresponding with the receiver.


The type of track association to add. Common track association types, such as AVTrackAssociationTypeTimecode are defined in Track Association Types.


If the type of association requires tracks of specific media types that don't match the media types of the inputs, or if the output file type does not support track associations, an NSInvalidArgumentException is raised.

See Also

Managing Track Associations

- canAddTrackAssociationWithTrackOfInput:type:

Validates the association between the tracks and their corresponding pair of inputs.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software