The options for specifying media type characteristics.
- iOS 11.0+
- macOS 10.13+
- tvOS 11.0+
Each track of .mov files and .m4v files (that is, files of type
m4v) can optionally carry one or more tagged media characteristics, each of which declares a purpose, a trait, or some other distinguishing property of the track's media.
For example, tag a track containing audio that mixes original program content with additional narrative descriptions of visual action with the media characteristic
public in order to distinguish it from other audio tracks stored in the same file that do not contain additional narrative.
Each tagged media characteristic in
.m4v files is stored in track user data as a user data item of type
'tagc' (represented as a
Four) that consists of a standard atom header (size and type) followed by an array of US-ASCII characters (8-bit, high bit clear) comprising the value of the tag. The character array is not a C string; there is no terminating zero. The user data item atom size is sum of the standard atom header size (8) and the size of the US-ASCII character array.
You can inspect the tagged media characteristics of a track as follows:
You can use
has to determine whether a track has a particular media characteristic, whether to infer the characteristic from its media type or format descriptions (such as
contains) or requires explicit tagging (such as
easy). You can't use explicit tagging to override inferences from tracks' media types or format descriptions; for example, the following returns false for any audio track, even when tagging the the track with the visual characteristic.
You can write tagged media characteristics to the QuickTime user data of an output track associated with an
AVAsset object as follows, provided that the output file type of the asset writer is either