GNOME Bugzilla – Bug 690152
baseparse: invalid timestamps in pull mode
Last modified: 2018-11-03 12:16:41 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.
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.
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.
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.
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.
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?
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
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 ...
-- 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.