Code Monkey home page Code Monkey logo

Comments (6)

dericed avatar dericed commented on July 18, 2024

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

from mediaconch.

genfhk avatar genfhk commented on July 18, 2024

https://drive.google.com/drive/folders/1LaQdx2_JoDK7L-eFDmY69pMcVfzxNTWi?usp=sharing

from mediaconch.

dericed avatar dericed commented on July 18, 2024

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. :-/

from mediaconch.

g-maxime avatar g-maxime commented on July 18, 2024

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 .

from mediaconch.

JeromeMartinez avatar JeromeMartinez commented on July 18, 2024

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).

from mediaconch.

g-maxime avatar g-maxime commented on July 18, 2024

Fixed by MediaArea/MediaConch_SourceCode#692 closing?

from mediaconch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.