gstreamer

Getting GStreamer latencies


I am trying to obtain latency stats for my GStreamer pipeline following documentation: Link However on my Yocto Linux machine running gst-launch-1.0 version 1.22.5 I can't seem to get any GST_TRACERS output even though pipeline runs normally.

When I try same exact commands on my other Ubuntu Linux machine with GStreamer gst-launch-1.0 version 1.20.3 I can get debug/tracers output normally.

Is there something system-related I need to enable/alter in order to get the GStreamer logging output?

Command I tried on both is following:

GST_DEBUG="GST_TRACER:7" GST_TRACERS=latency gst-launch-1.0 \
audiotestsrc num-buffers=10 ! audioconvert ! volume volume=0.7 ! \
autoaudiosink

Solution

  • You need to build gstreamer with coretracers enabled.

    To do this in meson use the extra parameter -Dgstreamer:coretracers=enabled.

    You can verify your build has coretracers enabled using the following command:

    $ gst-inspect-1.0 | grep coretracers
    

    If coretracers is not installed no output will be displayed, if it is installed you should get something like this:

    coretracers:  factories (GstTracerFactory)
    coretracers:  latency (GstTracerFactory)
    coretracers:  leaks (GstTracerFactory)
    coretracers:  log (GstTracerFactory)
    coretracers:  rusage (GstTracerFactory)
    coretracers:  stats (GstTracerFactory)