Netflix / photon

Photon is a Java implementation of the Interoperable Master Format (IMF) standard. IMF is a SMPTE standard whose core constraints are defined in the specification st2067-2:2013
Apache License 2.0
234 stars 77 forks source link

Photon allows violation of SMPTE ST 2067-3:2016 part 6.9.3 #195

Closed kmacrossplus closed 7 years ago

kmacrossplus commented 7 years ago

Specifically: "A given TrackId value shall be used by only one Sequence in each Segment and, if used in one Segment, it shall be used by exactly one Sequence in all other Segments."

For example, in the attached CPL file, there are 2 segments, but TrackId urn:uuid:1f5b6544-3572-4290-9ad9-b518214de94c is only used once.

CPL_IMF9774102_ALOHA_D_2D_UHD_16X9_LB_185_2398_48K_ENG_DS_ME_DS_ENG_51_OPT_M_OPT_M_ENG_9e3701c3-199e-4776-b5d8-7447c64de87a.txt

svenkatrav commented 7 years ago

Thanks for pointing this out. We will update Photon to add validation of sequence TrackId across segments.

svenkatrav commented 7 years ago

I do see following errors with the above CPL: 15 Jun 2017 23:56:08,926 [INFO ] [Composition]: CompositionPlaylist Document has 5 errors and 0 warnings 15 Jun 2017 23:56:08,931 [ERROR] [Composition]: ERROR-Unsupported/Missing ApplicationIdentification in CPL [Photon version: 0.0.0] 15 Jun 2017 23:56:08,931 [ERROR] [Composition]: ERROR-Segment represented by the ID urn:uuid:160098c5-e19a-46a8-8408-b73270bd76f9 in the Composition represented by ID 9e3701c3-199e-4776-b5d8-7447c64de87a contains virtual track represented by ID 105ae950-93e8-4206-80b0-5adc2c15e570, which does not appear in all the segments of the Composition, this is invalid [Photon version: 0.0.0] 15 Jun 2017 23:56:08,931 [ERROR] [Composition]: ERROR-Segment represented by the ID urn:uuid:160098c5-e19a-46a8-8408-b73270bd76f9 in the Composition represented by ID 9e3701c3-199e-4776-b5d8-7447c64de87a contains virtual track represented by ID 340a3572-7f94-4eb4-90ab-d2e225fa4840, which does not appear in all the segments of the Composition, this is invalid [Photon version: 0.0.0] 15 Jun 2017 23:56:08,931 [ERROR] [Composition]: ERROR-Segment represented by the ID urn:uuid:160098c5-e19a-46a8-8408-b73270bd76f9 in the Composition represented by ID 9e3701c3-199e-4776-b5d8-7447c64de87a contains virtual track represented by ID 3ff8a451-5544-4018-99ab-2aca1ac27d5a, which does not appear in all the segments of the Composition, this is invalid [Photon version: 0.0.0] 15 Jun 2017 23:56:08,931 [ERROR] [Composition]: ERROR-EssenceDescriptorList is either absent or empty. [Photon version: 0.0.0]

We do have validation SMPTE ST 2067-3:2016 part 6.9.3. If you do not have all the track IDs exactly once in each segment then one of the following errors will be seen:

  1. "Segment represented by the ID ... in the Composition represented by ID ... contains virtual track represented by ID ... which does not appear in all the segments of the Composition.
  2. "Number of distinct virtual trackIDs in a segment = ..., different from first segment ...