[Bug 698748] mpegtsmux: improper timestamping of output packets
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Dec 18 22:46:40 PST 2013
https://bugzilla.gnome.org/show_bug.cgi?id=698748
GStreamer | gst-plugins-bad | 1.x
--- Comment #14 from Jan Schmidt <thaytan at noraisin.net> 2013-12-19 06:46:38 UTC ---
Using either your supplied test file or videotestsrc, the only thing I really
see wrong with avenc_mpeg2video is that all output buffers have PTS == DTS,
which isn't right. Otherwise though, all buffers do have timestamps, and
mpegtsmux produces a stream with incrementing output timestamps.
I get the same behaviour with both 1.2.1 and git master.
gst-launch-1.0 filesrc location=./bug-698748.ts ! tsdemux ! mpeg2dec ! queue !
avenc_mpeg2video ! fakesink silent=false -v 2>&1 |less
-> all buffers have incrementing output timestamps
gst-launch-1.0 filesrc location=./bug-698748.ts ! tsdemux ! mpeg2dec ! queue !
avenc_mpeg2video ! mpegtsmux ! fakesink silent=false -v 2>&1 |less
-> all buffers have incrementing output timestamps
This however, does generate 0 output timestamps:
gst-launch-1.0 -e -v filesrc location=./bug-698748.ts ! tsdemux name=demux
demux. ! audio/x-ac3 ! tee name=audiotee1 demux. ! audio/x-ac3 ! tee
name=audiotee2 mpegtsmux name=mux_320x240 ! fakesink silent=false
audiotee1. ! queue ! mux_320x240. audiotee2. ! queue ! mux_320x240. 2>&1
|less
Eventually, I tracked it to this collectpads commit in core:
commit f671bd27548f2e5f7db0e475aeb450d794ba697d
Author: David Schleef <ds at schleef.org>
Date: Fri Feb 22 14:56:49 2013 -0800
collectpads: take DTS into account
Importantly, this patch converts DTS to running time. Less importantly,
and possibly a problem for some muxers, is that it orders buffers by
DTS (if it is valid, otherwise PTS). This is generally correct, but
might be somewhat surprising to muxers.
Also note that once converted to running time, DTS can end up negative.
That commit, for some reason, calls the clip function, passing a buffer with
PTS = DTS = segment start time, thus confusing and disrupting mpegtsmux's
timestamp tracking when none of the incoming buffers have a DTS.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list