Which tools are available to debug pipelines?
Gstreamer is a widely used open source platform and there are many tools to debug and profile Gstreamer’s performance.
More detailed explanation and examples can be found in TAPPAS debugging manual
Basic option: gst-top
The most simple one is gst-top from GitHub - kirushyk/gst-instruments: Easy-to-use profiler for GStreamer
This is already installed in your TAPPAS environment.
To run add gst-top-1.0 to your CLI Gstreamer pipeline or executable.
For example:
gst-top-1.0 gst-launch-1.0 videotestsrc ! autovideosink
This will create a gst-top.gsttrace
file.
To read the file use:
gst-report-1.0 gst-top.gsttrace
Example output:
gst-report-1.0 gst-top.gsttrace
ELEMENT %CPU %TIME TIME
autovideosink0-actual-sink-xvimage 0.8 90.1 23.4 ms
videotestsrc0 0.1 9.9 2.56 ms
pipeline0 0.0 0.0 0 ns
autovideosink0 0.0 0.0 0 ns
This will give you a rough understanding of which part of the pipeline is using most of your reasources.
Advanced option: Gst-Shark
RidgeRun implemented excellent tools and documentation for debugging Gstreamer.
See the link above for lots of useful information, it is a great resource.
It allows you to get graphic description for your pipeline with lots of additional graphs like: CPU usage, Framerate, Queue Level, InterLatency, Bitrate and more.
gst-shark is also pre-installed in you TAPPAS environment with shortcuts and scripts.
See TAPPAS debugging manual for more information.
On Hailo-15, if you want to generate the graph of the pipeline in form of a dot file, you’ll need to set the following environment variables after logging on to the board:
export HAILO_PROFILE_LOCATION=/tmp/profile
export GST_DEBUG=”GST_TRACER:7”
export GST_DEBUG_NO_COLOR=1
export GST_TRACERS="cpuusage;proctime;interlatency;framerate;queuelevel;bufferdrop;graphic"
export GST_DEBUG_FILE=/tmp/tappas_traces.log
Run your Gstreamer pipeline and you’ll see that a pipeline_<timestamp>.dot
file being generated in /tmp/profile/graphic
Download that file over your host machine and use the command
dot pipeline_<timestamp>.dot -T x11
to visualize it or dot -Tpng pipeline_<timestamp>.dot > output.png
to convert to png file.