[Bug 790696] matroskademux: seek ends up in cluster with no key-frame

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Aug 27 21:11:44 UTC 2018


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

Tim-Philipp Müller <t.i.m at zen.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|git master                  |1.15.1

--- Comment #33 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
commit 9d6621a30dad77b69afd24e6b25792a2dcf78da9
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Wed Aug 15 12:53:34 2018 +0100

    matroskademux: implement keyframe search also without cluster prev size

    If we have cluster prev size (GStreamer muxer will write it by default),
    we can go back to the previous cluster efficiently, but if we don't then
    just search backwards until we find a cluster ebml identifier, like we
    do when searching for clusters in the bisection loop.

commit 2d6efbbae20a2f53bed19eb76643b45ee4a8756a
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Wed Aug 15 12:14:24 2018 +0100

    matroskademux: make max backtrack distance for keyframe search configurable

    Add property instead of hardcoding it in the code.

    In some scenarios such as CCTV variable fps and extra long GOPs are
    used to minimise storage space, for example. In those cases there might
    not be any keyframes for many minutes, so provide a property to override
    the max allowed distance.

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

commit 2990f0730ae5428aed890d3d754b987be69aa175
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Wed Aug 15 11:49:57 2018 +0100

    matroskademux: set limit how much to backtrack to find a keyframe

    If we seek without an index and land on a cluster that starts
    with a delta frame.

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

commit ffb4533137405585d526f365ba204bd2fc023f67
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Wed Aug 15 11:25:21 2018 +0100

    matroskademux: no need to search for keyframes for intra-only streams

    If the video streams are all I-frame only then we don't need to look
    for a cluster with a keyframe, we can just assume there will be one.

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

commit 694631520ddedabc2bd7a4a65691989249b8143e
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Wed Aug 15 01:10:32 2018 +0100

    matroskademux: figure out if we have prev_size when starting up

    This is useful to know in case someone initiates a seek or
    direction change before we reach the second cluster.

commit 43ce85f794f7599e81483c75c0e31147189755e3
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Wed Aug 8 12:37:54 2018 +0100

    matroskademux: try to ensure keyframe when seeking without index

    When seeking in pull mode without an index (because there is no index
    or the file is still being written to) we bisect to find the right
    cluster to jump to. However, it's possible the cluster we found doesn't
    start with a keyframe, which leads to decoding errors, so if we know
    that the found cluster starts with a delta frame try to scan back to
    previous clusters until we find one that starts with a keyframe or
    we are back at the beginning. Theoretically it's possible that all
    clusters but the first one do not start with a keyframe and the
    keyframes are in the middle of clusters, but this is extremely
    unusual, so we will cover this case with a basic sanity check.

    This problem is especially problematic with content recorded with
    dynamic GOP and FPS, where long GOP lengths and low FPS may cause a
    large set of clusters to lack key frames. Playback would then be
    started on a non-keyframe cluster, and the large number of such frames
    would make the content impossible to decode fo a long stretch of time.

    Based on patch by: Mats Lindestam <matslm at axis.com>

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

commit 93ddea2a70991f24f2b4de81d2d9beb0136c9a5e
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Wed Jan 18 10:27:38 2017 +0000

    matroskademux: extract cluster prevsize if available

    This is useful for reverse playback/trickmodes
    without an index, and will also be useful in the
    seek handler if we need to scan back to find a cluster
    that starts with a keyframe.

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

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


More information about the gstreamer-bugs mailing list