Measuring pipeline latency

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

Measuring pipeline latency

pisymbol .
I have Googled this topic extensively but I still don't have a clear answer yet.

I can use the "identity" function to try to come up with something adhoc but I see there is a "latency" plugin with almost zero doc. Can one use that to measure latency between source and sink? Another topic that comes up is the ability to query latency via the GstQuery object. But I couldn't find a real example and I'm not sure how ones uses it!?

I'm trying to measure two things:

1) Latency between one or more elements in my pipeline

2) Latency across my entire pipeline

I'm doing this in Python. What are the best practices here?

Thanks!

-aps



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

Re: Measuring pipeline latency

Guillaume Desmottes-2

Hi,

This is exactly what the latency tracer is for. It can provide the pipeline latency (sink to source), per element latency and the announced latency (from the LATENCY query).

See this example about how to use it:
https://gstreamer.freedesktop.org/documentation/additional/design/tracing.html?gi-language=c#print-all-type-of-latencies-for-a-pipeline

And some doc in its source file: https://gitlab.freedesktop.org/gstreamer/gstreamer/blob/master/plugins/tracers/gstlatency.c#L21

On 21/08/2019 00:45, pisymbol . wrote:
I have Googled this topic extensively but I still don't have a clear answer yet.

I can use the "identity" function to try to come up with something adhoc but I see there is a "latency" plugin with almost zero doc. Can one use that to measure latency between source and sink? Another topic that comes up is the ability to query latency via the GstQuery object. But I couldn't find a real example and I'm not sure how ones uses it!?

I'm trying to measure two things:

1) Latency between one or more elements in my pipeline

2) Latency across my entire pipeline

I'm doing this in Python. What are the best practices here?

Thanks!

-aps



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re[2]: Measuring pipeline latency

Daniel Rossi
i'm also looking to use python bindings. I think they  want to make async calls to obtain this information and not on stdout ?

------ Original Message ------
From: "Guillaume Desmottes" <[hidden email]>
Sent: 8/21/2019 1:52:24 PM
Subject: Re: Measuring pipeline latency

Hi,

This is exactly what the latency tracer is for. It can provide the pipeline latency (sink to source), per element latency and the announced latency (from the LATENCY query).

See this example about how to use it:
https://gstreamer.freedesktop.org/documentation/additional/design/tracing.html?gi-language=c#print-all-type-of-latencies-for-a-pipeline

And some doc in its source file: https://gitlab.freedesktop.org/gstreamer/gstreamer/blob/master/plugins/tracers/gstlatency.c#L21

On 21/08/2019 00:45, pisymbol . wrote:
I have Googled this topic extensively but I still don't have a clear answer yet.

I can use the "identity" function to try to come up with something adhoc but I see there is a "latency" plugin with almost zero doc. Can one use that to measure latency between source and sink? Another topic that comes up is the ability to query latency via the GstQuery object. But I couldn't find a real example and I'm not sure how ones uses it!?

I'm trying to measure two things:

1) Latency between one or more elements in my pipeline

2) Latency across my entire pipeline

I'm doing this in Python. What are the best practices here?

Thanks!

-aps



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Measuring pipeline latency

pisymbol .
In reply to this post by Guillaume Desmottes-2


On Tue, Aug 20, 2019 at 11:52 PM Guillaume Desmottes <[hidden email]> wrote:

Hi,

This is exactly what the latency tracer is for. It can provide the pipeline latency (sink to source), per element latency and the announced latency (from the LATENCY query).

See this example about how to use it:
https://gstreamer.freedesktop.org/documentation/additional/design/tracing.html?gi-language=c#print-all-type-of-latencies-for-a-pipeline

And some doc in its source file: https://gitlab.freedesktop.org/gstreamer/gstreamer/blob/master/plugins/tracers/gstlatency.c#L21

First off thanks!

But it crashes gstreamer:

sudo env GST_DEBUG="GST_TRACER:7" GST_TRACERS="latency(flags=reported)" myapp
...start pipeline...
...after about a second...
0:00:04.976342329  5832      0x13c6de0 TRACE             GST_TRACER :0:: latency, src=(string)nvcam1_src, sink=(string)mfsink_sink, time=(guint64)93748468;

(earheight:5832): GStreamer-CRITICAL **: gst_event_get_structure: assertion 'GST_IS_EVENT (event)' failed

(earheight:5832): GStreamer-CRITICAL **: gst_structure_id_get: assertion 'GST_IS_STRUCTURE (structure)' failed
Segmentation fault (core dumped)

?

-aps

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

Re: Measuring pipeline latency

pisymbol .


On Wed, Aug 21, 2019 at 7:00 AM pisymbol . <[hidden email]> wrote:


On Tue, Aug 20, 2019 at 11:52 PM Guillaume Desmottes <[hidden email]> wrote:

Hi,

This is exactly what the latency tracer is for. It can provide the pipeline latency (sink to source), per element latency and the announced latency (from the LATENCY query).

See this example about how to use it:
https://gstreamer.freedesktop.org/documentation/additional/design/tracing.html?gi-language=c#print-all-type-of-latencies-for-a-pipeline

And some doc in its source file: https://gitlab.freedesktop.org/gstreamer/gstreamer/blob/master/plugins/tracers/gstlatency.c#L21

First off thanks!

But it crashes gstreamer:

sudo env GST_DEBUG="GST_TRACER:7" GST_TRACERS="latency(flags=reported)" myapp
...start pipeline...
...after about a second...
0:00:04.976342329  5832      0x13c6de0 TRACE             GST_TRACER :0:: latency, src=(string)nvcam1_src, sink=(string)mfsink_sink, time=(guint64)93748468;

(earheight:5832): GStreamer-CRITICAL **: gst_event_get_structure: assertion 'GST_IS_EVENT (event)' failed

(earheight:5832): GStreamer-CRITICAL **: gst_structure_id_get: assertion 'GST_IS_STRUCTURE (structure)' failed
Segmentation fault (core dumped)


Is this a bug in gstreamer or nvcamerasrc?

-aps

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

Re: Measuring pipeline latency

Guillaume Desmottes-2
On 21/08/2019 23:53, pisymbol . wrote:
Is this a bug in gstreamer or nvcamerasrc?

If it crashes only when the tracer is enabled then it's likely the tracer.
Please open a ticket and attach the stack trace.

    G.

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