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 779088 - videoencoder: produces incorrect dts with vtenc, when crossing segment boundary
videoencoder: produces incorrect dts with vtenc, when crossing segment boundary
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.11.1
Other Mac OS
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-22 17:53 UTC by Nick Kallen
Modified: 2018-11-03 11:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nick Kallen 2017-02-22 17:53:45 UTC
This bug is subtle and involves segment boundaries:

GstVideoEncoderBase, if dts == -1, will attempt to set it to a sane value.

In one case, it picks the "lowest unsent PTS". However, consider the case where there are e.g. 2 outstanding frames: one from one segment and another in a different segment. You cannot compare the PTS of these frames without factoring in the segment base. However, the code does not do that at all:

https://github.com/GStreamer/gst-plugins-base/blob/master/gst-libs/gst/video/gstvideoencoder.c#L2114
Comment 1 Tim-Philipp Müller 2017-02-22 18:15:13 UTC
Just for additional context, input to vtenc is something like this (conceptually):

SEGMENT event, start=0s, base=0s, ...
...
BUFFER pts=14.7s
BUFFER pts=14.8s
BUFFER pts=14.9s

SEGMENT event, start=0s, base=15s, ...

BUFFER pts=0.0s
BUFFER pts=0.1s
...
Comment 2 Nicolas Dufresne (ndufresne) 2017-02-22 20:13:25 UTC
I guess a quick hack would be to drain the encoder on new segments, but I don't like much this solution, since it will introduce spurious keyframes. Maybe we should also store the stream-time and search in stream-time ?
Comment 3 GStreamer system administrator 2018-11-03 11:54:52 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/gst-plugins-base/issues/339.