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 76 forks source link

Photon ignores the absence of ContentVersion Id elements #227

Open dtatut opened 5 years ago

dtatut commented 5 years ago

In SMPTE 2067-2:2016, section 6.7, the presence of at least one ContentVersion element is mandatory. However, in SMPTE ST 2067-3:2016, section 6.1, the XSD defines the ContentVersionList element as optional:

Photon seems to rely on the schema only and ignores the mandatory aspect of a minimum of one ContentVersion element in the CPL, as stated in App #2/#2E, App #4 and App #5
MarcAntoine-Arnaud commented 5 years ago

I don't see any restriction into App 2 and 2E regarding this field. I have checked 2064-20:2016 and 2064-21:2016, no minimal occurence are mentioned.

Regarding the App 4, it requires 1 occurence, but Photon don't support this application right now. So for me it's a normal behavior.

dtatut commented 5 years ago

It's in SMPTE 2067-2:2016, section 6.7

2067-20:2016, section 4.1 says: "All provisions of SMPTE ST 2067-2 shall apply."

While SMPTE ST 2067-3:2016, section 6.1 creates the confusion with the optional nature of the ContentVersionList element.

In other words App 2 must follow the core constraints in full, no choice. If Photon validates App 2/2E then it must complain in the absence of the ContentVersionList.

Same goes with App 4 and 5, because of the core constraints. Photon should detect that anyway, regardless of the support of App 4 or 5.

MarcAntoine-Arnaud commented 5 years ago

So do you think it can be great to open the discussion to change that in the 2067-3 ? It needs to update the schema with:

<xs:element name="ContentVersionList" minOccurs="1">

which should fix the misunderstanding.

dtatut commented 5 years ago

Content version IDs are usually dictated by delivery specifications. I don't think the standard should make such IDs mandatory but rather optional and let the delivery specifications deal with them.

This discussion exists here:

https://github.com/SMPTE/st2067-2/issues/28

And should also probably exist within the IMF User Group.

Regardless of the final decision, Photon should be compliant with whatever is in force.

remia commented 5 years ago

I'm looking into App # 4 support right now and face the same issue.

As I see it, the ContentVersionType class object is only available through the generated classes from the ST2067-2-2013 and ST2067-2-2016 schemas. I wonder how we can easily import this as a field in the IMFCompositionPlaylistType class, probably must redefine this type manually as a non-auto generated class ?

Not sure what's the correct way to proceed here.