Generate a Gstreamer pipeline diagram - Dieptranivsr/DroneIVSR GitHub Wiki

Generate a Gstreamer pipeline diagram

  1. Install Dot
$ sudo apt-get install graphviz
  1. In the target, run:
$ export GST_DEBUG_DUMP_DOT_DIR=/tmp/

This will place the .dot generated files in your /tmp/ directory, you can change that directory if you need to.

  1. Run your pipeline, for example:
$ gst-launch-1.0 audiotestsrc num-buffers=1000 ! fakesink sync=false

After the pipeline is over, you can see the .dot generated files, and the "PLAYING_PAUSED" one is typically used to generate the diagram.

$ ls /tmp
0.00.00.972540004-gst-launch.NULL_READY.dot
0.00.01.051387461-gst-launch.READY_PAUSED.dot
0.00.01.074729712-gst-launch.PAUSED_PLAYING.dot
0.00.12.187852589-gst-launch.PLAYING_PAUSED.dot
0.00.12.201485839-gst-launch.PAUSED_READY.dot
 etc ...
  1. In your host machine, generate the diagram from the dot file

This step implies that you know how to transfer the .dot file from your target to your host machine. Once you've done that, you can generate the .png image using the "dot" command in your host:

$ dot -Tpng 0.00.24.846778049-gst-launch.PLAYING_PAUSED.dot > pipeline.png
  1. Open up your image

Once the image has been created, you can open it with your favorite image viewer, for example:

$ eog pipeline.png

Example: Capture from webcam every 10 second pipeline2