Skip to content

video files that once passed policy now fail policy? #223

Open
@genfhk

Description

@genfhk

Curious issue where MC seems to be failing MKVs but I can't exactly pinpoint why... Not the most helpful issue, I know, but I can send policy and sample files via email which would be more useful.

Screen Shot 2020-12-23 at 12 43 39 PM

vs.

Screen Shot 2020-12-23 at 12 44 14 PM

Activity

dericed

dericed commented on Dec 23, 2020

@dericed
Contributor

can you share the output of mediaconch -mt failfailfail.mkv and your policy

dericed

dericed commented on Dec 23, 2020

@dericed
Contributor

Seems like a bug in the conditional logic. The xml of the policy result is at https://gist.github.com/dericed/bee9a592c9a5b96803770e6279902a7d.

https://gist.github.com/dericed/bee9a592c9a5b96803770e6279902a7d#file-ghk-xml-L27-L31

<policy name="Pixel Aspect Ratio is D1?" type="or" rules_run="3" fail_count="1" pass_count="2" outcome="fail">
  <rule name="NTSC D1?" value="PixelAspectRatio" tracktype="Video" occurrence="*" operator="=" xpath="mi:MediaInfo/mi:track[@type='Video'][*]/mi:PixelAspectRatio='0.900'" outcome="pass"/>
  <rule name="PAL D1?" value="PixelAspectRatio" tracktype="Video" occurrence="*" operator="=" xpath="mi:MediaInfo/mi:track[@type='Video'][*]/mi:PixelAspectRatio='1.067'" actual="0.900" outcome="fail"/>
  <rule name="FFV1 is encoded in GOP size of 1?" value="Format_Settings_GOP" tracktype="Video" occurrence="*" operator="=" xpath="mi:MediaInfo/mi:track[@type='Video'][*]/mi:Format_Settings_GOP='N=1'" outcome="pass"/>
</policy>

This is an 'or' policy with 2 passing rules and a failing rules, but the whole policy fails.

At https://gist.github.com/dericed/bee9a592c9a5b96803770e6279902a7d#file-ghk-xml-L53-L56

<policy name="Video Sample Range clarified?" type="or" rules_run="2" fail_count="0" pass_count="2" outcome="fail">
  <rule name="Range data is stored?" scope="mmt" value="Segment/Tracks/TrackEntry/Video/Colour/Range/" occurrence="*" xpath="mmt:MicroMediaTrace/mmt:b[@n='Segment']/mmt:b[@n='Tracks']/mmt:b[@n='TrackEntry']/mmt:b[@n='Video']/mmt:b[@n='Colour']/mmt:b[@n='Range']" outcome="pass"/>
  <rule name="Range data is not Unspecified?" scope="mmt" value="Segment/Tracks/TrackEntry/Video/Colour/Range/Data" occurrence="*" operator="!=" xpath="mmt:MicroMediaTrace/mmt:b[@n='Segment']/mmt:b[@n='Tracks']/mmt:b[@n='TrackEntry']/mmt:b[@n='Video']/mmt:b[@n='Colour']/mmt:b[@n='Range']/mmt:d!='o2'" outcome="pass"/>
</policy>

all the rules of the policy pass but the policy itself fails. :-/

g-maxime

g-maxime commented on Dec 24, 2020

@g-maxime
Contributor

type='or' refers to an exclusive or.

<aliasxsl:when test="$type = 'or' and $pass_count = 1">pass</aliasxsl:when>
(I can't find the original xsl in the sources tree.)

Maybe add more precise nor/xor options and keep current 'or' behaviour for compatibility .

JeromeMartinez

JeromeMartinez commented on Dec 24, 2020

@JeromeMartinez
Member

thanks @g-maxime for the catch.
So the workaround is to have a rule which is also false, and we fix the the 'or' (IMO no need to keep compatibility, the only known usage is e.g. DAR is 4:3 or 16:9 so "or" or "xor" have same result).

g-maxime

g-maxime commented on Nov 25, 2022

@g-maxime
Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

    Participants

    @dericed@JeromeMartinez@genfhk@g-maxime

    Issue actions

      video files that once passed policy now fail policy? · Issue #223 · MediaArea/MediaConch