Ymagis / ClairMeta

Clairmeta is a python package for Digital Cinema Package (DCP) probing and checking.
BSD 3-Clause "New" or "Revised" License
84 stars 22 forks source link

`MainCaption` not examined #239

Open overlookmotel opened 11 months ago

overlookmotel commented 11 months ago

I have been sent 2 SMPTE VF DCPs. The 1st has CCAP captions, the 2nd has OCAP captions.

From looking at the captions XML (extracted from the MXFs with asdcp-unwrap), both contain invalid IDs (<Id> should start with urn:uuid:).

<?xml version="1.0" encoding="UTF-8"?>
<SubtitleReel xmlns="http://www.smpte-ra.org/schemas/428-7/2014/DCST">
  <Id>1efc5617-194b-4039-a6f3-c7c89849ca05</Id>

With the CCAP VF DCP, clairmeta check correctly catches this and emits a schema validation error.

However, with the OCAP VF DCP, clairmeta check gives it a pass (wrongly).

I suspect the reason is that it's not examining captions when they're included as MainCaption. I edited the CPL to change MainCaption to MainSubtitle, and clairmeta then does examine the captions and emits a schema validation error.

Or is MainCaption not legal in SMPTE DCPs? If so, I guess that should be produce a schema validation error on the CPL.

The film is not my work, so unfortunately I'm unable to share them as a repro case. But very happy to test a fix and confirm if it works.

Also would be happy to make a PR, if someone could point me to where to look in the code.

remia commented 10 months ago

This looks like an overlook, I would check if adding OpenCaption in the filters in https://github.com/Ymagis/ClairMeta/blob/develop/clairmeta/dcp_check_subtitle.py#L173 would fix the issue. Thanks for reporting!