2.2.2.5 TrackElement

The TrackElement field and related fields encapsulate metadata that is required to play a specific track in the stream.

TrackElement (variable): An XML element that encapsulates all metadata that is required by the client to play a track.

TrackAttributes (variable): The collection of XML attributes for TrackElement. Attributes can appear in any order. However, the following fields are required and MUST be present in TrackAttributes: IndexAttribute and BitrateAttribute. If the track is contained in a stream whose Type is video, the following additional fields are also required and MUST be present in TrackAttributes: MaxWidthAttribute, MaxHeightAttribute, and CodecPrivateDataAttribute. If the track is contained in a stream whose Type is audio, the following additional fields are also required and MUST be present in TrackAttributes: MaxWidthAttribute, MaxHeightAttribute, CodecPrivateDataAttribute, SamplingRateAttribute, ChannelsAttribute, BitsPerSampleAttribute, PacketSizeAttribute, AudioTagAttribute, and FourCCAttribute.

Index (variable): An ordinal that identifies the track and MUST be unique for each track in the stream. Index SHOULD start at 0 and increment by 1 for each subsequent track in the stream.

Bitrate (variable): The average bandwidth that is consumed by the track, in bits per second (bps). The value 0 MAY be used for tracks whose bit rate is negligible relative to other tracks in the presentation.

MaxWidth (variable): The maximum width of a video sample, in pixels.

MaxHeight (variable): The maximum height of a video sample, in pixels.

SamplingRate (variable): The Sampling Rate of an audio track, as defined in [ISO/IEC-14496-12].

Channels (variable): The Channel Count of an audio track, as defined in [ISO/IEC-14496-12].

AudioTag (variable): A numeric code that identifies which media format and variant of the media format is used for each sample in an audio track. The following range of values is reserved with the following semantic meanings:

  • "1": The sample media format is Linear 8 or 16-bit pulse code modulation.

  • "353": Microsoft Windows Media Audio v7, v8 and v9.x Standard (WMA Standard)

  • "353": Microsoft Windows Media Audio v9.x and v10 Professional (WMA Professional).

  • "85": International Organization for Standardization (ISO) MPEG-1 Layer III (MP3).

  • "255": ISO Advanced Audio Coding (AAC).

  • "65534": Vendor-extensible format. If specified, the CodecPrivateData field SHOULD contain a hexadecimal-encoded version of the WAVE_FORMAT_EXTENSIBLE structure [WFEX].

BitsPerSample (variable): The sample size of an audio track, as defined in [ISO/IEC-14496-12].

PacketSize (variable): The size of each audio packet, in bytes.

FourCC (variable): A four-character code that identifies which media format is used for each sample. The following range of values is reserved with the following semantic meanings:

  • "H264": Video samples for this track use Advanced Video Coding, as described in [ISO/IEC-14496-15].

  • "WVC1": Video samples for this track use VC-1, as described in [VC-1].

  • "AACL": Audio samples for this track use AAC (Low Complexity), as specified in [ISO/IEC-14496-3].

  • "WMAP": Audio samples for this track use WMA Professional.

  • A vendor extension value containing a registered with MPEG4-RA, as specified in [ISO/IEC-14496-12].

CodecPrivateData (variable): Data that specifies parameters that are specific to the media format and common to all samples in the track, represented as a string of hexadecimal-coded bytes. The format and semantic meaning of byte sequence varies with the value of the FourCC field as follows:

  • The FourCC field equals "H264": The CodecPrivateData field contains a hexadecimal-coded string representation of the following byte sequence, specified in ABNF [RFC5234]:

 %x00 %x00 %x00 %x01 SPSField %x00 %x00 %x00 %x01 PPSField
  • SPSField contains the Sequence Parameter Set (SPS).

  • PPSField contains the Picture Parameter Set (PPS).

  • The FourCC field equals "WVC1": The CodecPrivateData field contains a hexadecimal-coded string representation of the VIDEOINFOHEADER structure, specified in [MSDN-VIH].

  • The FourCC field equals "AACL": The CodecPrivateData field SHOULD be empty.

  • The FourCC field equals "WMAP": The CodecPrivateData field contains the WAVEFORMATEX structure, specified in [WFEX], if the AudioTag field equals "65534". Otherwise, it SHOULD be empty.

  • The FourCC field is a vendor extension value: The format of the CodecPrivateData field is also vendor-extensible. Registration of the FourCC field value with MPEG4-RA, as specified in [ISO/IEC-14496-12], can be used to avoid collision between extensions.

NALUnitLengthField (variable): The number of bytes that specifies the length of each Network Abstraction Layer (NAL) unit. This field SHOULD be omitted unless the value of the FourCC field is "H264". The default value is 4.

The syntax of the fields that are defined in this section, specified in ABNF [RFC5234], is as follows.

  
 Track = TrackWithoutContent / TrackWithContent                                                          
 TrackWithoutContent = "<" TrackElementName S TrackAttributes S "/>"                                                          
 TrackWithContent = "<" TrackElementName S TrackAttributes S ">"                                                          
                    S TrackContent S "</" TrackElementName ">"                                                          
 TrackElementName = "QualityLevel"                                                          
 TrackAttributes = *(                                                           
                      IndexAttribute                                                           
                      / BitrateAttribute                                                          
                      / CodecPrivateDataAttribute                                                          
                      / MaxWidthAttribute                                                          
                      / MaxHeightAttribute                                                          
                      / SamplingRateAttribute                                                          
                      / ChannelsAttribute                                                          
                      / BitsPerSampleAttribute                                                          
                      / PacketSizeAttribute                                                          
                      / AudioTagAttribute                                                          
                      / FourCCAttribute                                                          
                      / NALUnitLengthFieldAttribute                                                          
                      / VendorExtensionAttribute                                                          
                    )                                                          
 IndexAttribute = S IndexAttributeName S Eq S                                                           
                  (DQ Index DQ) / (SQ Index SQ) S                                                          
 IndexAttributeName = "Index"                                                          
 Index = STRING-UINT32                                                          
 BitrateAttribute = S BitrateAttributeName S Eq S                                                           
                   (DQ Bitrate DQ) / (SQ Bitrate SQ) S                                                          
 BitrateAttributeName = "Bitrate"                                                          
 Index = STRING-UINT32                                                          
 MaxWidthAttribute = S MaxWidthAttributeName S Eq S                                                           
                     (DQ MaxWidth DQ) / (SQ MaxWidth SQ) S                                                          
 MaxWidthAttributeName = "MaxWidth"                                                          
 MaxWidth = STRING-UINT32                                                          
 MaxHeightAttribute = S MaxHeightAttributeName S Eq S                                                           
                      (DQ MaxHeight DQ) / (SQ MaxHeight SQ) S                                                          
 MaxHeightAttributeName = "MaxHeight"                                                          
 MaxHeight = STRING-UINT32                                                          
 CodecPrivateDataAttribute = S CodecPrivateDataAttributeName S Eq S                                                           
                            (DQ CodecPrivateData DQ) / (SQ CodecPrivateData SQ) S                                                          
 CodecPrivateDatatAttributeName = "CodecPrivateData"                                                          
 CodecPrivateData = *HEXCODED-BYTE                                                           
 SamplingRateAttribute = S SamplingRateAttributeName S Eq S                                                           
                        (DQ SamplingRate DQ) / (SQ SamplingRate SQ) S                                                          
 SamplingRateAttributeName = "SamplingRate"                                                          
 SamplingRate = STRING-UINT32                                                          
 ChannelsAttribute = S ChannelsAttributeName S Eq S                                                           
                        (DQ Channels DQ) / (SQ Channels SQ) S                                                          
 ChannelsAttributeName = "Channels"                                                          
 Channels = STRING-UINT16                                                          
 BitsPerSampleAttribute = S BitsPerSampleAttributeName S Eq S                                                           
                          (DQ BitsPerSample DQ) / (SQ BitsPerSample SQ) S                                                          
 BitsPerSampleAttributeName = "BitsPerSample"                                                           
 BitsPerSample = STRING-UINT16                                                          
 PacketSizeAttribute = S PacketSizeAttributeName S Eq S                                                           
                          (DQ PacketSize DQ) / (SQ PacketSize SQ) S                                                          
 PacketSizeAttributeName = "PacketSize"                                                          
 PacketSize = STRING-UINT32                                                          
 AudioTagAttribute = S AudioTagAttributeName S Eq S                                                           
                     (DQ AudioTag DQ) / (SQ AudioTag SQ) S                                                          
 PacketSizeAttributeName = "AudioTag"                                                          
 AudioTag = STRING-UINT32                                                          
 FourCCAttribute = S FourCCAttributeName S Eq S                                                           
                     (DQ FourCC DQ) / (SQ FourCC SQ) S                                                          
 FourCCAttributeName = "AudioTag"                                                          
 FourCC = 4*4 ALPHA                                                          
 NALUnitLengthFieldAttribute = S NALUnitLengthFieldAttributeName S Eq S                                                           
                              (DQ NALUnitLengthField DQ)                                                           
                              / (SQ NALUnitLengthField SQ) S                                                          
 NALUnitLengthFieldAttributeName = "NALUnitLengthField"                                                          
 NALUnitLengthField = STRING-UINT16                                                          
 TrackContent = *1CustomAttributes