wolfgangw / backports

Deep inspection of digital cinema packages
27 stars 12 forks source link

DCSubtitle: Check presence of ReelNumber content, Language content #15

Closed wolfgangw closed 9 years ago

liloneum commented 9 years ago

Language seems to be necessary in a cinecanvas subtitle, even if <Language/> is declared.

Failed to parse subtitle file "//VBOXSVR/DCP_NO_ONE_WILL_PLAY_WITH_ME_su_2225\d0fd4a89-f48b-48b7-9a47-a3ac914dec28/d0fd4a89-f48b-48b7-9a47-a3ac914dec28_sub.xml". Language not set in Subtitles document. Warnings for CPL "//VBOXSVR/DCP_NO_ONE_WILL_PLAY_WITH_ME_su_2225\9b076147-cc88-4cec-a162-e3f54368e74c_cpl.xml": Skipping subtitle track file entry from CPL, because it is marked as corrupt in PKL.

wolfgangw commented 9 years ago

Thanks for the feedback.

For reference the related section in TI's Subtitle Specification (1.1) would be section 2.6 Language:

Language is required in Presentation Data files, and must precede any Subtitle elements.

Now, we do have

<xs:element name="Language" type="xs:string"/>

in the related XSD (DCSubtitle.v1.mattsson.xsd) so I would think that this should be caught. Not sure if the self-closing and empty element <Language/> shall ring a bell or not.

What produced the messages you quote above?

liloneum commented 9 years ago

EasyDCP Player did produce this message. Even though EasyDCP Creator did produce the package. I did not try on a server. TI's Subtitle Specification is ambiguous on this point. The Language tag is used to denote the language used in the subtitle file. Language is required in Presentation Data files, and must precede any Subtitle elements. If it is used "to denote", the language shall be present in my opinion. If it is empty, it does not denote anything.

wolfgangw commented 9 years ago

Agreed.

I presume dcp_inspect did not mention the empty element in its report, yes?

liloneum commented 9 years ago

Right: CPL 9b076147-cc88-4cec-a162-e3f54368e74c: Reel 1: DCSubtitle d0fd4a89-f48b-48b7-9a47-a3ac914dec28: Schema check: OK

wolfgangw commented 9 years ago

Ok.

In the above quoted output from FhG's player: Is there a hash mismatch as well or does it fail because of the empty element?

liloneum commented 9 years ago

There is no hash mismatch in this case.

wolfgangw commented 9 years ago

Last question: Have you tested ingesting on DCI systems?

liloneum commented 9 years ago

I said it this morning, unfortunately: "I did not try on a server." I have no possibility to check it on any DCI system. I you do, I can make a fake package, very small.

wolfgangw commented 9 years ago

Thanks, no need, might make one myself. Would be mere curiosity anyway.

A decision is required: We either classify this (empty Language/ReelNumber elements) as errors or as hints. Although it might resemble a false negative for some when they run into it (and ingest and playback just fine) I'm still leaning towards making it an error. I think the TI spec gives us that much leeway.

Your final say on this?

liloneum commented 9 years ago

Just because I can't test on servers, any strange thing is suspicious and considered as a potential error for me. If an error is detected by a server (or EasyDCP player), in a case of ambiguous DCI recommendation, I would consider it as an error anyway. Many servers can ingest content out of the DCI recommendations. As dcp_inspect is THE tool for deep and complete inspection, I would chose "error" in this case. Let's see the results of your tests...

wolfgangw commented 9 years ago

Done. See ed3fbb6bb3e94c132ffbde13616793d1fb176a1c.

If you could confirm that it does what it is supposed to so we can close this one. Thanks in advance.

liloneum commented 9 years ago

It seems to be OK:

Error: CPL cccec632-8677-4b0c-9092-c6a35d5ac2c5: Reel 1: DCSubtitle fc7b893c-2e79-4842-b5ad-6014ceb1d3e1: Language has no content Error: CPL cccec632-8677-4b0c-9092-c6a35d5ac2c5: Reel 2: DCSubtitle f46b5846-b55c-402b-a3a7-aedd01d56266: Language has no content

liloneum commented 9 years ago

Except that the schema check is OK in the CPL:

CPL cccec632-8677-4b0c-9092-c6a35d5ac2c5: Reel 1: DCSubtitle fc7b893c-2e79-4842-b5ad-6014ceb1d3e1: Schema check: OK CPL cccec632-8677-4b0c-9092-c6a35d5ac2c5: Reel 1: DCSubtitle fc7b893c-2e79-4842-b5ad-6014ceb1d3e1: Language has no content CPL cccec632-8677-4b0c-9092-c6a35d5ac2c5: Reel 2: DCSubtitle f46b5846-b55c-402b-a3a7-aedd01d56266: Schema check: OK CPL cccec632-8677-4b0c-9092-c6a35d5ac2c5: Reel 2: DCSubtitle f46b5846-b55c-402b-a3a7-aedd01d56266: Language has no content

Should it say error too?

wolfgangw commented 9 years ago

Note that the DTD in TI's document has

<!ELEMENT ReelNumber (#CDATA)>
<!ELEMENT Language (#CDATA)>

for those elements (I'm at a loss with the specific notation here, (#CDATA) as opposed to CDATA. I'll ask Tim Ryan).

In our XSD we have translated those specs to

<xs:element name="ReelNumber" type="xs:string"/>
<xs:element name="Language" type="xs:string"/>

Standard fare. While there could be a minimum length requirement of 1 attached I am extremely hesitant to do that. The DTD doesn't specify it and so I'd rather catch it in extra code then (which is what the patch does).

So validation against the XSD suceeds for the (empty) string but additional tests will ring the alarm. I think that's good enough -- we're already stretching it a bit by going for an error-class catch. Agree?

wolfgangw commented 9 years ago

Thought about it some more and I'm moving these one tier down to hints.

Also, Lilian, if at all possible, could you again make extra sure that the DCSubtitle in question failed in FhG's player exactly because of the empty Language element? Sorry for the inconvenience. If it is so indeed we should rather ask FhG to look at their code instead. Because TI's DTD and what Tim says about it just don't make this an error.

Sorry for the trouble. I want to be very careful about inventing homegrown specs, ok?

liloneum commented 9 years ago

OK for moving it to hint. I agree with the CDATA argument. I confirm that the empty language element prevents the subtitle opening in FhG's player 1.8 demo (Failed to parse subtitle file Language not set in Subtitles document) but not on the last demo 2.0.9 (I have this error: code 3 from mer. nov. 26 08:23:35 2014: Issues have been detected. For a full report, please license the commercial edition.)

wolfgangw commented 9 years ago

Thanks for checking again. Closing this one.