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 690152 - baseparse: invalid timestamps in pull mode
baseparse: invalid timestamps in pull mode
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-13 12:49 UTC by Arnaud Vrac
Modified: 2018-11-03 12:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Attempt to fix timestamp issues (1.70 KB, patch)
2012-12-13 12:49 UTC, Arnaud Vrac
committed Details | Review
Timestamps of video frames after parsing/decoding, after avidemux in pull mode (PTS are set). This log was recorded using gstreamer git master. (33.38 KB, text/plain)
2012-12-13 12:51 UTC, Arnaud Vrac
  Details
Timestamps of video frames after parsing/decoding, after avidemux in pull mode (PTS are set). This log was recorded using gstreamer git master with attached patches applied. (33.38 KB, text/plain)
2012-12-13 12:52 UTC, Arnaud Vrac
  Details
Timestamps of video frames after parsing/decoding, after avidemux in push mode (no PTS, only DTS). This log was recorded using gstreamer git master. (33.38 KB, text/plain)
2012-12-13 12:52 UTC, Arnaud Vrac
  Details
Timestamps of video frames after parsing/decoding, after avidemux in push mode (no PTS, only DTS). This log was recorded using gstreamer git master with attached patch applied. (33.38 KB, text/plain)
2012-12-13 12:53 UTC, Arnaud Vrac
  Details

Description Arnaud Vrac 2012-12-13 12:49:08 UTC
Created attachment 231465 [details] [review]
Attempt to fix timestamp issues

Commit 7518960829f5b32 makes baseparse output invalid timestamps in some cases. For example a lot of buffers are dropped when playing this file: 

http://streams.videolan.org/samples/Matroska/120fps-mkv/%5bKTKJ%5d%5bstratos4_advance%5d%5b01%5d%5bbig5%5d%5bE72C0C1D%5d.mkv

Before this commit timestamps were also wrong when only DTS was set on input buffers.

I have attached a few files:

 - a patch that attempts to correctly fix the issue (it needs review, I'm not sure of all the implications of the change)

 - logs to demonstrate the timestamp issues. The logs show the timestamps after parsing and decoding of an AVI/MPEG4 video. Before the faulty commit and my patch, video and audio sync was off after some time in push mode. With my patch it works fine in both pull and push modes, timestamps are the same.
Comment 1 Arnaud Vrac 2012-12-13 12:51:38 UTC
Created attachment 231466 [details]
Timestamps of video frames after parsing/decoding, after avidemux in pull mode (PTS are set). This log was recorded using gstreamer git master.
Comment 2 Arnaud Vrac 2012-12-13 12:52:17 UTC
Created attachment 231467 [details]
Timestamps of video frames after parsing/decoding, after avidemux in pull mode (PTS are set). This log was recorded using gstreamer git master with attached patches applied.
Comment 3 Arnaud Vrac 2012-12-13 12:52:55 UTC
Created attachment 231468 [details]
Timestamps of video frames after parsing/decoding, after avidemux in push mode (no PTS, only DTS). This log was recorded using gstreamer git master.
Comment 4 Arnaud Vrac 2012-12-13 12:53:18 UTC
Created attachment 231470 [details]
Timestamps of video frames after parsing/decoding, after avidemux in push mode (no PTS, only DTS). This log was recorded using gstreamer git master with attached patch applied.
Comment 5 Sebastian Dröge (slomo) 2012-12-17 11:27:16 UTC
commit 4a1ff7fa952a8b2195fe1b997e233c302e247098
Author: Arnaud Vrac <avrac@freebox.fr>
Date:   Thu Dec 13 13:47:29 2012 +0100

    baseparse: fix invalid output timestamps in some cases


But apart from that I think avidemux should put the same metadata on buffers in pull and push mode. Any idea what the problem there is?
Comment 6 Tim-Philipp Müller 2013-02-09 11:47:57 UTC
This might help / be related:


commit 314400d45af1a9718a7209a9c162c7a7ee9d95f7
Author: Mark Nauwelaerts <mnauw@users.sourceforge.net>
Date:   Sat Feb 9 12:32:02 2013 +0100

    baseparse: improve PTS interpolating

    ... and tracking of DTS.  Fixes cases where PTS is locked on to the
    DTS of an incoming buffer with no PTS with invalid data, leading to
    no outgoing PTS (since it is not allowed smaller than DTS).

    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691481
Comment 7 Mark Nauwelaerts 2013-02-09 20:34:57 UTC
The patch mentioned above is related and would help in these cases (particularly with valid DTS, no PTS).  There might still be some baseparse problems with no DTS, valid PTS input input though ...

Wrt Comment #5, avidemux can not really put the same metadata in push mode, since it might not have the index info available, which identifies key frames.  It could perhaps do a little bit better (e.g. DTS = PTS for all audio ?), but probably not all the way ...
Comment 8 GStreamer system administrator 2018-11-03 12:16:41 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/32.