absolute buffer timestamp from src element

Antoine Martin antoine at nagafix.co.uk
Wed Feb 15 11:11:10 UTC 2017


I have a simple pipeline that looks like this:
pulsesrc ! queue ! opusenc ! oggmux ! appsink
I would like to capture the absolute unix timestamp of the buffers as
they get captured by pulsesrc.
I can get the "timestamp" property of the buffers, but this starts at zero..

I need this timestamp in a format that I can reconcile with external
data that will captured around the same time, but not through gstreamer.

I guess we could use the pipeline latency to retroactively calculate the
actual absolute timestamp, but I could never figure out how to get the
pipeline latency using the python bindings:

The only other solution I can think of would be to write a filter that
adds a property or keeps track of the delta between the buffer timestamp
and a point of reference. (would this property be preserved through the
encoder and muxer?)

Is there a better way?


More information about the gstreamer-devel mailing list