Synchronizing buffers with absolute date-timestamps

Josh Doe josh at joshdoe.com
Mon Jun 11 18:52:49 PDT 2012


Suppose I have two or more videos which have date-timestamps
associated with each frame, how do I synchronize the frames? The
date-timestamps are all UTC, typically based off IRIG-B, PTP, or GPS
and can come from various sources, such as the camera itself, a second
device which "burns in" a date-timestamp [1], or a framegrabber which
latches the time when the first pixel of a frame appears [2], or in
software via a callback which grabs time from a timing card [3]. And
then of course there can be file-based sources which associate a
date-timestamp to each frame (e.g. MXF).

So the question is how to convert date-timestamps to PTS, in some
standardized way. Some options include:
1) Have each element provide a start-time property, which applications
could query to then modify buffer timestamps. But how can downstream
elements save this date-time to file?
2) Send a start-time event after each segment event, so that a
downstream element can adjust timestamps based on a global start
date-time set by the application.
3) As above, but using "datetime" tag event, though "limited" to
microsecond precision.
4) Subclass GstClock to provide an application-set global start
date-time, which sources and decoders/parsers can use to adjust
timestamps. Downstream elements can reconstruct the date-timestamp
from the buffer timestamp and this global start date-time.

Any opinions on this?
Thanks,
-Josh

[1]: http://ionetrics.com/hardware_annotator_cl_gps.htm
[2]: http://www.edt.com/news_irigb.html
[3]: http://www.meinberg.de/english/products/gps180pex.htm


More information about the gstreamer-devel mailing list