Python DeepStream program not generating dot file

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
T4
• DeepStream Version
5.0
• JetPack Version (valid for Jetson only)
NA
• TensorRT Version
7.0.0.11
• NVIDIA GPU Driver Version (valid for GPU only)
440.64.00
• Issue Type( questions, new requirements, bugs)
I am trying to run deepstream_test_3.py.

export GST_DEBUG_DUMP_DOT_DIR=/tmp/
python3 deepstream_test_3.py input.h264

This is not generating the dot files to /tmp/. Graphviz is installed.

os.environ["GST_DEBUG_DUMP_DOT_DIR"] = "/tmp"
os.putenv('GST_DEBUG_DUMP_DIR_DIR', '/tmp')

I tried adding the above code into the test python program. But still the dot files are not getting generated.

I also tried installing graphviz-dev apt package and the pygraphviz pip package. Still no dot files are getting generated.

1 Like

In c++ sample, it needs to call “GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(gst_objs.pipeline), GST_DEBUG_GRAPH_SHOW_ALL, “demo-app-pipeline”);” to enable the dot file output.
I think you need to call the equivalent GST python API

1 Like

I think GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS is a C macro and cannot be directly used in python.

that’s why I said the equivalent GST python API, please note!

In python it’s:

Gst.debug_bin_to_dot_file(pipeline, Gst.DebugGraphDetails.ALL, filename)

5 Likes

Good to know, thanks @nors

Thanks ! It worked. Just for reference below are the things I did.

As early in the program as possible, add the following:-

os.environ["GST_DEBUG_DUMP_DOT_DIR"] = "/tmp"
os.putenv('GST_DEBUG_DUMP_DIR_DIR', '/tmp')

Once the graph is fully created and just before triggering the main loop do the following:

Gst.debug_bin_to_dot_file(pipeline, Gst.DebugGraphDetails.ALL, "pipeline")

This creates /tmp/pipeline.dot when the program is run.

6 Likes