absolute buffer timestamp from src element

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

absolute buffer timestamp from src element

Antoine Martin
Hi,

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:
http://gstreamer-devel.966125.n4.nabble.com/latency-queries-tt4676750.html#none

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?

Thank
Antoine
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: absolute buffer timestamp from src element

Mikl

Hello, Antoine


I am using subtitles inside of matroska for the same task.


Mikl


From: gstreamer-devel <[hidden email]> on behalf of Antoine Martin <[hidden email]>
Sent: Wednesday, February 15, 2017 12:11:10 PM
To: [hidden email]
Subject: absolute buffer timestamp from src element
 
Hi,

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:
http://gstreamer-devel.966125.n4.nabble.com/latency-queries-tt4676750.html#none

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?

Thank
Antoine
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel