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
239 stars 78 forks source link

Possible false error on OPL validation #287

Open cfadamp opened 4 years ago

cfadamp commented 4 years ago

I run the following command line validation to verify the whole package: java -cp "/photon/photon/build/libs\*;" com.netflix.imflibrary.app.IMPAnalyzer "\imp\OPL1_FTR_C_EN-XX_US-NR_51_HD_20201123_OV\"

and I get the following report with errors for my OPL file:

 ==========================================================================
23 Nov 2020 15:02:47,308 [INFO ] [IMPAnalyzer]: Analyzing IMF package OPL1_FTR_C_EN-XX_US-NR_51_HD_20201123_OV
23 Nov 2020 15:02:47,308 [INFO ] [IMPAnalyzer]: ==========================================================================
23 Nov 2020 15:02:49,602 [INFO ] [IMPAnalyzer]: OPL1_FTR_C_EN-XX_US-NR_51_HD_20201123_OV_01.mxf has no errors or warnings
23 Nov 2020 15:02:49,602 [INFO ] [IMPAnalyzer]: PKL_8aa31c9f-8a55-41f8-89ab-11c97703beb8.xml has no errors or warnings
23 Nov 2020 15:02:49,608 [INFO ] [IMPAnalyzer]: OPL_c71e6a4e-10c4-4014-b991-8c98b4964fe1.xml has 8 errors and 0 warnings
23 Nov 2020 15:02:49,608 [ERROR] [IMPAnalyzer]:                 ERROR-Invalid handle alias/ImageCropOutput in image-scale-1 macro [Photon version: 4.9.0-SNAPSHOT]
23 Nov 2020 15:02:49,609 [ERROR] [IMPAnalyzer]:                 ERROR-Invalid handle alias/CPLMainImage in image-crop-1 macro [Photon version: 4.9.0-SNAPSHOT]
23 Nov 2020 15:02:49,609 [ERROR] [IMPAnalyzer]:                 ERROR-Invalid handle macros/image-crop-1/inputs/images in alias [Photon version: 4.9.0-SNAPSHOT]
23 Nov 2020 15:02:49,611 [ERROR] [IMPAnalyzer]:                 ERROR-Invalid handle macros/image-scale-1/outputs/images in alias [Photon version: 4.9.0-SNAPSHOT]
23 Nov 2020 15:02:49,612 [ERROR] [IMPAnalyzer]:                 ERROR-Invalid handle macros/image-crop-1/outputs/images in alias [Photon version: 4.9.0-SNAPSHOT]
23 Nov 2020 15:02:49,615 [ERROR] [IMPAnalyzer]:                 ERROR-Invalid handle cpl/virtual-tracks/3209e477-fe6b-414c-b483-ee9c864c3447 in alias [Photon version: 4.9.0-SNAPSHOT]
23 Nov 2020 15:02:49,615 [ERROR] [IMPAnalyzer]:                 ERROR-Invalid handle macros/image-scale-1/inputs/images in alias [Photon version: 4.9.0-SNAPSHOT]
23 Nov 2020 15:02:49,616 [ERROR] [IMPAnalyzer]:                 ERROR-Invalid handle cpl/virtual-tracks/def69a32-eaf6-4525-9da8-89cf3984c304 in alias [Photon version: 4.9.0-SNAPSHOT]
23 Nov 2020 15:02:49,617 [INFO ] [IMPAnalyzer]: CPL_OPL1_FTR_C_EN-XX_US-NR_51_HD_20201123_OV.xml has no errors or warnings
23 Nov 2020 15:02:49,618 [INFO ] [IMPAnalyzer]: OPL1_FTR_C_EN-XX_US-NR_51_HD_20201123_OV_01_EN_51_A.mxf has no errors or warnings
23 Nov 2020 15:02:49,619 [INFO ] [IMPAnalyzer]: ASSETMAP.xml has no errors or warnings
23 Nov 2020 15:02:49,620 [INFO ] [IMPAnalyzer]:

I read the standards again and I cannot see yet why my OPL is not valid against the standards. Is it a Photon bug? I replaced my OPL with the one can be found in the source repository (photon\src\test\resources\TestIMP\OPL\OPL_8cf83c32-4949-4f00-b081-01e12b18932f.xml) and I get similar errors, so that is why I think the problem is not isolated to only my OPL file.

Attached are my XMLs for further investigation. opl_error_imp.zip

llamafilm commented 4 years ago

Hi Adam. I see one error in the OPL. The CPLMainImage alias references the segment Id instead of TrackId. Fixing that resolves 5 of these errors.

The other three errors seem to be caused by unused aliases: CPLMainAudio1, ImageCropInput, and ImageScaleInput. If I remove these aliases then it passes. I don't see anything in the spec requiring all aliases to be used, so this seems like a bug to me.

cfadamp commented 4 years ago

Hi Elliott,

thanks, these make sense, I already fixed them at our side.

Best, Adam