[Bug 787206] New: matroska-demux.c incorrectly interprets FlagInterlaced-field

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Sep 3 09:25:39 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=787206

            Bug ID: 787206
           Summary: matroska-demux.c incorrectly interprets
                    FlagInterlaced-field
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: gnome-bugzilla at mazdermind.de
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

matroska-demux.c interprets the FlagInterlaced-field as if it was a boolean
value, interpreting absence and a value of 0 as "progressive", while other
values are interprered as "interlaced":
https://github.com/GStreamer/gst-plugins-good/blob/286df32e038c803fa40e89d48a7fc3e53f899601/gst/matroska/matroska-demux.c#L676


This is contrary to the specification, which states
> FlagInterlaced	A flag to declare is the video is known to be progressive or interlaced and if applicable to declare details about the interlacement. (0: undetermined, 1: interlaced, 2: progressive)
https://www.matroska.org/technical/specs/index.html#FlagInterlaced


I prepared Matroska-Fiels with the corresponding values in the interlaced
field:
https://c3voc.mazdermind.de/permanent/voctomix-issue-137-ffmpeg-interlaced-mkv/all-mode-mkvs.zip

They can be analyzed using `mkvinfo file.mkv | grep -iA5 "+ Video track"` for
their actual header value.

The following code can be used to test gstreames interpretation of them (tested
on git master):

> TESTFILES="no-interlaced-field.mkv interlaced-0.mkv interlaced-1.mkv interlaced-2.mkv"
> 
> for file in $TESTFILES; do
>   echo $file
>   GST_DEBUG=matroskademux:4 gst-launch-1.0 -q filesrc location=$file ! matroskademux ! video/x-raw ! fakesink 2>&1 | grep interlace-mode
>   echo ""
> done

Which produces (shortend)
> no-interlaced-field.mkv
> video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
> 
> interlaced-0.mkv
> video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
> 
> interlaced-1.mkv
> video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
> 
> interlaced-2.mkv
> video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1

More information regarding ffmpeg's handling of this field can be read in the
original bug report against voctomix:
https://github.com/voc/voctomix/issues/137

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list