After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 631703 - [oggdemux] sintel ogv delay when playing
[oggdemux] sintel ogv delay when playing
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-08 18:40 UTC by David Schleef
Modified: 2010-10-12 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (4.17 KB, patch)
2010-10-11 00:32 UTC, David Schleef
none Details | Review
patch (1.54 KB, patch)
2010-10-11 00:32 UTC, David Schleef
none Details | Review
patch (955 bytes, patch)
2010-10-11 00:33 UTC, David Schleef
none Details | Review

Description David Schleef 2010-10-08 18:40:59 UTC
The Sintel medium ogv takes 15-ish seconds to start playing:

http://www.sintel.org/wp-content/content/download.html

I did not check if this was an oggdemux problem or a problem with the file.
Comment 1 Sebastian Dröge (slomo) 2010-10-10 16:29:47 UTC
I looked at it shortly some time ago and the Skeleton stream here has weird values for the granulerate. All streams including the audio have a granulerate of 24/1. Might be that this is the problem
Comment 2 David Schleef 2010-10-11 00:31:38 UTC
That could likely be a problem as well.

There are several problems that somewhat interact.  oggdemux parses until it finds a data packet for each stream.  For Sintel, the kate subtitles don't start until 1:45 or so, so it takes a while to parse to that point.  That is fixed by not waiting for data packets on sparse streams (patches 1&2).

Another related problem is that there isn't a vorbis granulepos until about 1.5 seconds into the stream, which queues up a lot of buffers trying to find the start timestamp for vorbis.

Yet another problem is that the kate subtitles are not compatible with katedec, and cause a decode error.

Yet another problem, apparently interacting with the delay at startup, is that sometimes decodebin2/totem don't get a good duration query back from oggdemux.  This is intermittent and is more obvious when GST_DEBUG is high.

Yet another problem is that duration calculation doesn't always use the last page.
Comment 3 David Schleef 2010-10-11 00:32:12 UTC
Created attachment 172075 [details] [review]
patch
Comment 4 David Schleef 2010-10-11 00:32:30 UTC
Created attachment 172076 [details] [review]
patch
Comment 5 David Schleef 2010-10-11 00:33:31 UTC
Created attachment 172078 [details] [review]
patch

I would appreciate someone looking over these.
Comment 6 Wim Taymans 2010-10-12 11:45:15 UTC
patch 1&2 look ok. I don't understand path 3 (yet)
Comment 7 Wim Taymans 2010-10-12 11:50:47 UTC
Ah yes, patch3 also does the right thing. The problem is that it compares the granulepos of different streams to find the max one while it should unconditionally keep the last granulepos it can read.
Comment 8 Wim Taymans 2010-10-12 14:07:21 UTC
commit fea50233bb0d2ba54b142e735fa300e2191f3dbd
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Tue Oct 12 16:03:36 2010 +0200

    oggdemux: only keep last valid granulepos
    
    Only keep the last valid granulepos we see when scanning the last
    pages. It is possible that the last page that we inspect has a -1 granulepos, in
    which case we want to keep the previous valid time instead.
    
    Fixes #631703

commit 9dc59cff151bf578012a735d0791ab4767debda6
Author: David Schleef <ds@schleef.org>
Date:   Sun Oct 10 15:22:52 2010 -0700

    oggdemux: Fix check for last page

commit 64dfad46f29799f99cfe10178556c361bd9918ff
Author: David Schleef <ds@schleef.org>
Date:   Sun Oct 10 15:22:04 2010 -0700

    oggdemux: change checks from is_skeleton to is_sparse

commit 5ae2f04856c2b138df35647cf00a49a38261c730
Author: David Schleef <ds@schleef.org>
Date:   Sun Oct 10 15:17:31 2010 -0700

    oggdemux: move is_sparse into stream map