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

Multi CPL DCP: Warnings output needs to address target CPL #152

Closed jamiegau closed 4 years ago

jamiegau commented 4 years ago

I find it strange that the results of the CHECK function do not indicate the target CPL the issues is connected to.

For example:

python3 -m clairmeta.cli check -type dcp -progress GF_TLR-F1REV_F-S_EN-XX_INTL_51
2020-08-03 12:35:32,304 - Clairmeta - INFO - Probing DCP : /opt/dcinenet/storage/assetlib/by_code/UxbYy43wLRou5xg2GipNTP/a/GF_TLR-F1REV_F-S_EN-XX_INTL_51
2020-08-03 12:35:34,587 - Clairmeta - INFO - Total time : 2.28 seconds
2020-08-03 12:35:34,776 - Clairmeta - INFO - Checking DCP : /opt/dcinenet/storage/assetlib/by_code/UxbYy43wLRou5xg2GipNTP/a/GF_TLR-F1REV_F-S_EN-XX_INTL_51
[  130.00 MiB in 0.24 sec (at 574.75 MBytes/s)     ] 100.00% - Goldfinch_TLR-F1REV-2D_S_EN-XX_INTL-NO-GB_51_2K_WR_20190516_MPI_OV_audio_01.mxf
[  1.90 GiB in 4.12 sec (at 496.18 MBytes/s)       ] 100.00% - Goldfinch_TLR-F1REV-2D_S_EN-XX_INTL-NO-GB_51_2K_WR_20190516_MPI_OV_01.mxf
[  9.40 kiB in 0.00 sec (at 88.15 MBytes/s)        ] 100.00% - CPL_Goldfinch_TLR-F1REV-2D_S_EN-XX_INTL-NO-GB_51_2K_WR_20190516_MPI_OV.xml
[  130.00 MiB in 0.23 sec (at 582.97 MBytes/s)     ] 100.00% - Goldfinch_TLR-F1REV-2D_F_EN-XX_INTL-NO-GB_51_2K_WR_20190516_MPI_OV_audio_01.mxf
[  2.46 GiB in 5.50 sec (at 480.94 MBytes/s)       ] 100.00% - Goldfinch_TLR-F1REV-2D_F_EN-XX_INTL-NO-GB_51_2K_WR_20190516_MPI_OV_01.mxf
[  9.40 kiB in 0.00 sec (at 26.51 MBytes/s)        ] 100.00% - CPL_Goldfinch_TLR-F1REV-2D_F_EN-XX_INTL-NO-GB_51_2K_WR_20190516_MPI_OV.xml
2020-08-03 12:35:44,972 - Clairmeta - INFO - DCP : /opt/dcinenet/storage/assetlib/by_code/UxbYy43wLRou5xg2GipNTP/a/GF_TLR-F1REV_F-S_EN-XX_INTL_51
2020-08-03 12:35:44,972 - Clairmeta - INFO - Size : 4.62 GiB
2020-08-03 12:35:44,972 - Clairmeta - INFO - Warning(s) :
    check_dcnc_compliance - ContentTitle must have 12 parts, 11 found
ContentTitle Part TLR-F1REV-2D not matching any naming convention field
Field ContentType not found in ContentTitle
ContentTitle Part INTL-NO-GB not matching any naming convention field
Field TerritoryRating not found in ContentTitle
Field Standard not found in ContentTitle
    check_dcnc_compliance - ContentTitle must have 12 parts, 11 found
ContentTitle Part TLR-F1REV-2D not matching any naming convention field
Field ContentType not found in ContentTitle
ContentTitle Part INTL-NO-GB not matching any naming convention field
Field TerritoryRating not found in ContentTitle
Field Standard not found in ContentTitle
2020-08-03 12:35:44,972 - Clairmeta - INFO - Total check : 86
2020-08-03 12:35:44,972 - Clairmeta - INFO - Total time : 10.18 sec
2020-08-03 12:35:44,973 - Clairmeta - INFO - Validation : Success

This is an example of a Flat/Scope bundled Trailer DCP. In this case, it found common issues with the DCNC in both CPLs, but there is no indication to which CPL they refer..

Even when utilising python code itself.. the report object returned has a list that contains the WARNING list, however, no indication of CPL ContentTitleText or uuid is in the data returned.

I cannot be the first to notice this??

jamiegau commented 4 years ago

Oh, while I remember, is there any specific naming convention against the DCP AnnotationText? In my experience, it's commonly got the CPL ContentTitleText in it, but when more then one CPL is in the DCP, that makes no sense. Is this field actually being used in the real world in anyway?

I have seen it commonly set to Empty.

matmat commented 4 years ago

Yes. AnnotationText is used prominently in the ingest manager of Doremi-derived GUI:s (DCP2000, IMSx000, ...). Each package is shown in a tree-like stucture in the GUI. If I remember correctly, for each package the AnnotationText (from the PKL?) is used as the root node with each corresponding CPL ContentTitleText as leaf nodes.

remia commented 4 years ago

Thanks for the report, I added a prefix with the CPL names in those messages.

See #153

jamiegau commented 4 years ago

Seeings as your kicking around in that code. Another small extra I would like is for .. def console_progress_bar(file_path, progress, elapsed, done) be enhanced to have def console_progress_bar(file_path, progress_dcp, dcp_size, progress_file, file_size, elapsed, done) So you can display overall progress, file progress and ETA for completion based on how long its been taking to process data up until that time.

remia commented 4 years ago

Closing this issue as this is already discussed in #151