MediaInfo
MediaInfo copied to clipboard
StreamOrder missing in ST 436 tracks in MXF
I have an XML output from an MXF and QuickTime version of the same media file with a EIA 708 CDP stream with cc1, cc3, service 1 and service 2. The QuickTime version has the StreamOrder enumerated for the text streams (they are all in the same QuickTime c708 track) but it is missing on the text track in the MXF version.
QuickTime:
<track type="Text" typeorder="4">
<Count>301</Count>
<StreamCount>4</StreamCount>
<StreamKind>Text</StreamKind>
<StreamKind_String>Text</StreamKind_String>
<StreamKindID>3</StreamKindID>
<StreamKindPos>4</StreamKindPos>
<StreamOrder>8</StreamOrder>
MXF:
<track type="Text" typeorder="4">
<Count>301</Count>
<StreamCount>4</StreamCount>
<StreamKind>Text</StreamKind>
<StreamKind_String>Text</StreamKind_String>
<StreamKindID>3</StreamKindID>
<StreamKindPos>4</StreamKindPos>
Is StreamOrder anything but a zero-based media file track order? I.e. is it the same as ignoring e.g. timecode tracks and enumerating all the tracks in order in the file starting from zero? I see a few other tickets e.g. #201 and #186 but I wasn't completely clear on the derivation of this value or if there's a specific reason the MXF doesn't have it.
em06_prores_final_cut_pro.xml.txt em06_evs_2_7_4.mxf.xml.txt
Is StreamOrder anything but a zero-based media file track order?
For MXF, it is the order in the "Multiple File Descriptor" element.
I.e. is it the same as ignoring e.g. timecode tracks and enumerating all the tracks in order in the file starting from zero?
In practice it excludes timecode tracks (no dedicated descriptor) and enumerating all the tracks in order in the "Multiple File Descriptor" element starting from zero. Definitely something arbitrary, it does not show the order in the body partition, and also ignore e.g. the SDTI timecode position. Maybe not the smarter choice... Not sure about what is the most relevant (and I bet that the order is same in practice).
The lack of this MediaInfo field for the text track was not wanted, it is due to the lack of implementation of the filling for compound tracks i.e. ANC track may contain several items, it could be added.
Note that this is not a track ID order, the track ID could be random, the StreamOrder field enumerate the "Multiple File Descriptor" order, not the trackID order.
It seems like the ID field uses the MXF Track ID in the source package - if the descriptor happened to be in a different order it would not match the track order?
Looking at the QuickTime example, since all the ancillary streams are in a QuickTime c708 track, they all have the same StreamOrder. I would think all the ancillary streams in an MXF file would also have the same stream order number since they are in the same track. I think it would be helpful to have this exposed for consistency between the formats.
Also curious on the definition of StreamKindID vs StreamKindPos. For the MXF and QuickTime files I looked at, it seems that StreamKindID = typeorder - 1
and StreamKindPos = typeorder
, but not sure if these values are getting pulled from somewhere.
<track type="Text" typeorder="4">
<Count>301</Count>
<StreamCount>4</StreamCount>
<StreamKind>Text</StreamKind>
<StreamKind_String>Text</StreamKind_String>
<StreamKindID>3</StreamKindID>
<StreamKindPos>4</StreamKindPos>