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 is erroring out if the CPL is missing audio tracks #308

Open MagedMYoussef opened 2 years ago

MagedMYoussef commented 2 years ago

I'm getting the following error, when I run Photon on a CPL with no audio tracks.

ERROR-The Composition represented by Id XXXX does not contain a single audio essence in its first segment, one or more is required [Photon version: 4.7.0-SNAPSHOT]

According to the SMPTE ST 2067-2:2020 standard, audio tracks are not mandatory and IMP can contain video only. So, I think Photon shouldn't be throwing a FATAL error in this case.

image

Is there a plan for fixing this anytime soon?

fschleich commented 2 years ago

HI @MagedMYoussef - What is the value of ApplicationIdentification in your CPL? You should not see this error for App 2E 2020 CPLs (http://www.smpte-ra.org/ns/2067-21/2020), because the App 2E 2020 standard normatively references the version of Core Constraints you're quoting (ST 2067-2:2020). Older versions of App 2E, however, reference a version of Core Constraints that does require one or more Audio Virtual Tracks to be present.

MagedMYoussef commented 2 years ago

Hi @fschleich - Here's the value of ApplicationIdentification in the CPL <ApplicationIdentification xmlns="http://www.smpte-ra.org/ns/2067-2/2020">http://www.smpte-ra.org/ns/2067-21/2020</ApplicationIdentification> I can see it's the same as you mentioned, but somehow it still shows the "Missing Audio Virtual Tracks" error.

fschleich commented 2 years ago

Can you share the CPL for troubleshooting @MagedMYoussef ?

MagedMYoussef commented 2 years ago

Here you go @fschleich : CPL_V30425662_TB_DTO_IMFA_HD-SDR_23_zxx-178_TVMN3U5TB.txt

P.S. I changed the file extension from .xml to .txt for github to attach it.

fschleich commented 2 years ago

Thanks, @MagedMYoussef. I'm unfortunately not able to reproduce the issue, the current master branch provides the following results:

fschleich@fschleich-macpro photon % photon_imp_validator.sh /Users/fschleich/Downloads/CPL_V30425662_TB_DTO_IMFA_HD-SDR_23_zxx-178_TVMN3U5TB.xml 
+ java -cp '/Users/fschleich/Developer/github/Netflix/photon/build/libs/*:*' com.netflix.imflibrary.app.IMPAnalyzer /Users/fschleich/Downloads/CPL_V30425662_TB_DTO_IMFA_HD-SDR_23_zxx-178_TVMN3U5TB.xml
2022-05-10 21:42:57,806  INFO [main] (IMPAnalyzer.java:627) - ==========================================================================

2022-05-10 21:42:57,809  INFO [main] (IMPAnalyzer.java:628) - Analyzing file CPL_V30425662_TB_DTO_IMFA_HD-SDR_23_zxx-178_TVMN3U5TB.xml
2022-05-10 21:42:57,809  INFO [main] (IMPAnalyzer.java:629) - ==========================================================================

2022-05-10 21:42:58,648  INFO [main] (IMPAnalyzer.java:581) - CPL_V30425662_TB_DTO_IMFA_HD-SDR_23_zxx-178_TVMN3U5TB.xml has no errors or warnings 

I'm now seeing that you seem to be running v4.7.0, you might have to update to v4.7.2 or later for the 2020 features.

MagedMYoussef commented 2 years ago

Hi @fschleich , Thanks for checking. I did indeed run photon_imp_validator.sh on the CPL and it passed without errors successfully. However, in our use-case we are actually using Photon as an SDK and it produces the following errors when trying to parse the same CPL.

ERROR-Unsupported sequence type or schema Tag: cc:MainImageSequence URI: http://www.smpte-ra.org/ns/2067-2/2020 [Photon version: 4.7.2],ERROR-Missing ApplicationIdentification in CPL [Photon version: 4.7.2],ERROR-The Composition represented by Id cd2ee0cf-1131-4726-89bb-399aa782ad1c does not contain a single image essence in its first segment, exactly one is required [Photon version: 4.7.2],ERROR-The Composition represented by Id cd2ee0cf-1131-4726-89bb-399aa782ad1c does not contain a single audio essence in its first segment, one or more is required [Photon version: 4.7.2]

We are using this function to parse the CPL from Photon SDK which seems to have issues with 2020 features: com.netflix.imflibrary.st2067_2.ApplicationCompositionFactory.getApplicationComposition

MagedMYoussef commented 2 years ago

Hi @fschleich , any update on this?

FadyFahmy commented 1 year ago

Hello @fschleich ,

I am facing the same issue with the spring SDK version 4.9.3

any updates with this?