GStreamer - How to get the values negotiated for the caps

GStreamer negotiates the caps for components in a pipeline automatically. This will often result in a working pipeline but sometimes it is not exactly what you may want. So, how can we find out what values were negotiated?

GStreamer can output graphs that show the pipeline including the values negotiated for the caps. This can be enabled by setting a variable before running the application.

export GST_DEBUG_DUMP_DOT_DIR="/local/shared_with_docker/"

When you run your GStreamer pipeline, this will create multiple DOT files at different states during runtime in the folder specified above. The shared_with_docker folder was chosen for this example so the files can be opened outside of the Hailo Software Suite or TAPPAS docker. The files will be named like this:

These files can be converted to PDF, PNG and JPG by running the dot tool.

General format

dot -T$format $dot_file > $output_file

The file with PLAYING_PAUSED in the name is the file you want in most cases.

PDF example (names shortened for readability)

dot -Tpdf >

The output files look like the following image and show the caps values negotiated between all components including format, width, height and framerate.

If you want to find out what formats are supported by your camera have a look at the following post.

v4l2 - How can I find all formats supported by my web camera

1 Like