bavc / qctools

QCTools (Quality Control Tools for Video Preservation) is a free and open source software tool that helps users analyze and understand their digitized video files through use of audiovisual analytics and filtering. QCTools is funded by the National Endowment for the Humanities and the Knight Foundation, and is developed by the Bay Area Video Coalition.
http://www.bavc.org/qctools
Other
306 stars 41 forks source link

matroska panel track metadata #636

Open dericed opened 3 years ago

dericed commented 3 years ago

This issue is upon https://github.com/bavc/qctools/pull/627.

When I run mkvalidator FILE.mov.qctools.mkv I get this output:

ERR0E2: Video track #1 at 358 has an implied non pixel width
ERR0E2: Video track #1 at 358 has an implied non pixel height
ERR0E7: Video track #1 at 358 has a null display height
ERR0E7: Video track #1 at 358 has a null display width
ERR0E5: Video track #1 is cropping too many vertical pixels 0 vs 0 + 0
ERR0E6: Video track #1 is cropping too many horizontal pixels 0 vs 0 + 0
ERR0E2: Video track #2 at 448 has an implied non pixel width
ERR0E2: Video track #2 at 448 has an implied non pixel height
ERR0E7: Video track #2 at 448 has a null display height
ERR0E7: Video track #2 at 448 has a null display width
ERR0E5: Video track #2 is cropping too many vertical pixels 0 vs 0 + 0
ERR0E6: Video track #2 is cropping too many horizontal pixels 0 vs 0 + 0
ERR0E2: Video track #3 at 541 has an implied non pixel width
ERR0E2: Video track #3 at 541 has an implied non pixel height
ERR0E7: Video track #3 at 541 has a null display height
ERR0E7: Video track #3 at 541 has a null display width
ERR0E5: Video track #3 is cropping too many vertical pixels 0 vs 0 + 0
ERR0E6: Video track #3 is cropping too many horizontal pixels 0 vs 0 + 0
ERR0E2: Video track #4 at 639 has an implied non pixel width
ERR0E2: Video track #4 at 639 has an implied non pixel height
ERR0E7: Video track #4 at 639 has a null display height
ERR0E7: Video track #4 at 639 has a null display width
ERR0E5: Video track #4 is cropping too many vertical pixels 0 vs 0 + 0
ERR0E6: Video track #4 is cropping too many horizontal pixels 0 vs 0 + 0
WRN0C2: The timecode of the Cluster at 5996298 is not incrementing (may be intentional)
WRN0C2: The timecode of the Cluster at 6036833 is not incrementing (may be intentional)
WRN0C2: The timecode of the Cluster at 6313856 is not incrementing (may be intentional)
WRN311: The Cues entry for timecode 0 ms is listed after entry 3589586 ms.............................................................................
WRN311: The Cues entry for timecode 0 ms is listed after entry 3075072 ms
WRN311: The Cues entry for timecode 0 ms is listed after entry 3075072 ms

In the qctools report, the track entry for the panels are like this

  <TrackEntry>
    <TrackNumber>2</TrackNumber>
    <TrackUID>8652427909472762517</TrackUID>
    <FlagLacing>0</FlagLacing>
    <Name>Horizontal Blur</Name>
    <Language>und</Language>
    <FlagDefault>0</FlagDefault>
    <CodecID>V_MJPEG</CodecID>
    <TrackType>1</TrackType>
    <DefaultDuration>16683333</DefaultDuration>
    <Video>
      <PixelWidth>1024</PixelWidth>
      <PixelHeight>180</PixelHeight>
      <DisplayUnit>4</DisplayUnit>
    </Video>
  </TrackEntry>

DisplayUnit=4, means that the display size is unknown. Fortunately most players will default to using the pixel width and height, but I suggest we be more clear and set the display aspect ratio to each track as width / height or set the sample aspect ratio of each track to 1/1.

dericed commented 3 years ago

The DisplayUnit=4 (unknown) seems to be set at https://github.com/FFmpeg/FFmpeg/blob/1ec2b3de5a074ccce555e33d7f282bbbb6d963d7/libavformat/matroskaenc.c#L1292

sample_aspect_ratio.num and sample_aspect_ratio.den should be set to 1.